Skip to main content
Glama

Validate markdown

validate_markdown
Read-onlyIdempotent

Validate a markdown document for PDF/UA-1 accessibility issues (heading hierarchy, missing alt text). Cheap — no rendering. Returns JSON { valid, issues: [{ severity, message, path, rule }], summary: { errors, warnings } }; valid is false when any issue has severity 'error'. Mirrors POST /api/v1/md/validate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "<markdown>"
    },
    "name": "validate_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
markdownYesThe GitHub-flavored markdown document to check, exactly as it would be passed to render_markdown. Up to 200KB of text; inline data: image payloads do not count toward that.

Output Schema

NameRequiredDescriptionDefault
validYesFalse when any issue has severity 'error'; warnings alone leave it true.
issuesYesEvery problem found, errors and warnings together.
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "issues": {
      +      "description": "Every problem found, errors and warnings together.",
      +      "items": {
      +        "properties": {
      +          "message": {
      +            "description": "What is wrong and, usually, how to fix it.",
      +            "type": "string"
      +          },
      +          "path": {
      +            "description": "Location in the document tree (e.g. 'kids[0].kids[2]'); empty when it applies to the whole document.",
      +            "type": "string"
      +          },
      +          "rule": {
      +            "description": "Identifier of the check that raised the issue.",
      +            "type": "string"
      +          },
      +          "severity": {
      +            "enum": [
      +              "error",
      +              "warning"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "severity",
      +          "message",
      +          "path",
      +          "rule"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "summary": {
      +      "properties": {
      +        "errors": {
      +          "description": "Number of issues with severity 'error'.",
      +          "type": "integer"
      +        },
      +        "warnings": {
      +          "description": "Number of issues with severity 'warning'.",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "errors",
      +        "warnings"
      +      ],
      +      "type": "object"
      +    },
      +    "valid": {
      +      "description": "False when any issue has severity 'error'; warnings alone leave it true.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "valid",
      +    "issues",
      +    "summary"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / markdown / description
      Previous value: -"GitHub-flavored markdown source. Max 200KB of text; inline data: image payloads are excluded from that budget."New value: +"The GitHub-flavored markdown document to check, exactly as it would be passed to render_markdown. Up to 200KB of text; inline data: image payloads do not count toward that."
  3. Changed2 schema fields changed
    • changedInput schema / properties / markdown / description
      Previous value: -"GitHub-flavored markdown source."New value: +"GitHub-flavored markdown source. Max 200KB of text; inline data: image payloads are excluded from that budget."
    • removedInput schema / properties / markdown / maxLength
      Removed value: -200000
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: it is non-rendering, it names the backend route it mirrors, and it explains that `valid` is false exactly when any issue has severity 'error'. It stops short of noting issue volume or limits on how many issues are returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences: purpose and scope first, cost hint second, contract third. Nothing is repeated from the title, and even the output shape is given as a single dense inline spec rather than a bulleted restatement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read-only validator the definition covers purpose, cost model, backend equivalent, and the shape and pass/fail semantics of the result, including the error/warning distinction. An agent could call this correctly and interpret the response without further reference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With a single parameter at 100% schema description coverage, the schema already carries the 200KB cap, the data:-payload exemption, and the GitHub-flavored requirement. The description's only addition on this axis is restating that the input is passed to render_markdown exactly as given, which is marginal over the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Validate a markdown document") plus the exact rule domain (PDF/UA-1 accessibility: heading hierarchy, missing alt text). It also marks the boundary against the sibling renderer by noting "Cheap — no rendering," so an agent can separate it from render_markdown without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The "Cheap — no rendering" note gives an implicit decision rule: run this before paying for a render pass. Combined with the schema's reference to render_markdown, the intended workflow is clear. There is no explicit "do not use when..." exclusion, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources