Developer Tools
Markdown Inspect, Normalize & Policy Guard
Inspect bounded caller-supplied CommonMark, conservatively normalize line endings, extract structure, compare versions, batch-inspect, and apply explicit HTML, destination, outline, media, code, metadata, and count policy.
CONTRACT
Predictable for agents. Legible for reviewers.
- REST
POST /v1/markdown/policy-check- MCP tool
check_markdown_policy- Inputs
- Caller-supplied UTF-8 Markdown up to 256 KiB; batches accept up to 500 documents, and comparisons accept two bounded documents.
- Returns
- CLEAR, REVIEW_REQUIRED, or BLOCKED with hashes, counts, headings, parsed destinations, code-block evidence, exact policy findings, and an agent-readable next action.
- Latency
- Synchronous
- Usage unit
- Markdown operation
The suite also exposes /v1/markdown/inspect, /normalize, /extract, /compare, and /batch-inspect plus /mcp/markdown. It uses a pinned markdown-it-py 4.2 CommonMark baseline and intentionally makes no GFM compatibility or semantic-equivalence guarantee. It fetches no URL, reads no file, renders or sanitizes no HTML, executes no code, and stores no payload. Its RapidAPI release is queued for final external publication.
AGENT-READABLE EXCEPTIONS
MARKDOWN_INPUT_TOO_LARGEMARKDOWN_TOKEN_LIMIT_EXCEEDEDMARKDOWN_URL_INVALIDMARKDOWN_RAW_HTML_BLOCKEDMARKDOWN_LINK_SCHEME_NOT_ALLOWEDMARKDOWN_LINK_HOST_NOT_ALLOWEDMARKDOWN_IMAGE_SCHEME_NOT_ALLOWEDMARKDOWN_IMAGE_HOST_NOT_ALLOWEDMARKDOWN_SINGLE_H1_REQUIREDMARKDOWN_CODE_LANGUAGE_NOT_ALLOWEDMARKDOWN_OUTPUT_TOO_LARGEPOST /v1/markdown/policy-check
Authorization: Bearer apc_...
Content-Type: application/json
{
"input": {
"content": "# Runbook\n\nSee [status](https://status.example.com).\n\n```sh\ncurl -fsS https://status.example.com\n```"
},
"policy_name": "runbook-publish",
"allow_raw_html": false,
"allow_images": false,
"allow_relative_links": false,
"allowed_link_schemes": [
"https"
],
"allowed_link_hosts": [
"example.com"
],
"require_https_for_absolute_links": true,
"require_single_h1": true,
"require_code_language": true,
"allowed_code_languages": [
"sh"
]
}curl --request POST \
--url 'https://api-production-9502.up.railway.app/v1/markdown/policy-check' \
--header 'Authorization: Bearer ${AP_CONTROL_API_KEY}' \
--header 'Content-Type: application/json' \
--data '{
"input": {
"content": "# Runbook\n\nSee [status](https://status.example.com).\n\n```sh\ncurl -fsS https://status.example.com\n```"
},
"policy_name": "runbook-publish",
"allow_raw_html": false,
"allow_images": false,
"allow_relative_links": false,
"allowed_link_schemes": [
"https"
],
"allowed_link_hosts": [
"example.com"
],
"require_https_for_absolute_links": true,
"require_single_h1": true,
"require_code_language": true,
"allowed_code_languages": [
"sh"
]
}'{
"status": "COMPLETED",
"decision": "CLEAR",
"allowed_by_policy": true,
"policy_name": "runbook-publish",
"summary": {
"byte_count": 104,
"line_count": 7,
"token_count": 18,
"heading_count": 1,
"link_count": 1,
"image_count": 0,
"code_block_count": 1,
"raw_html_count": 0,
"blockquote_count": 0,
"list_count": 0,
"frontmatter_like_prefix": false,
"source_sha256": "8d97..."
},
"findings": [],
"ruleset_version": "MARKDOWN_IT_PY_4_2_COMMONMARK_2026_08",
"dialect": "COMMONMARK_BASELINE",
"scope": "CALLER_SUPPLIED_MARKDOWN_ONLY",
"network_accessed": false,
"url_fetched": false,
"file_read": false,
"code_executed": false,
"html_rendered": false,
"html_sanitized": false,
"gfm_compatibility_verified": false,
"semantic_equivalence_verified": false,
"payload_stored": false,
"next_action": "Use the document only inside the caller's authorized renderer, navigation, publication, or ingestion workflow."
}Try Markdown Inspect, Normalize & Policy Guard with your own workflow.
Start with the workspace, inspect the typed result, then integrate with REST or the focused MCP server.