Skip to main content
Glama

OnchainCheck Web

Document to markdown

document_to_markdown
Read-onlyIdempotent

Convert a document at a URL to Markdown for an LLM: PDF, Word (DOCX), Excel (XLSX, XLS), OpenDocument (ODT, ODS), CSV and XML, up to 20 MB. Returns the Markdown with character, word and token counts. Costs $0.005 USDC on Base via x402.

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": {
      "url": "<url>"
    },
    "name": "document_to_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic URL of the document

Output Schema

NameRequiredDescriptionDefault
urlNostring, e.g. "https://www.irs.gov/pub/irs-pdf/fw9.pdf"
typeNostring, e.g. "pdf"
bytesNonumber, e.g. 140815
wordsNonumber, e.g. 167
markdownNostring, e.g. "# document.pdf\n## Metadata\n- PDFFormatVersion=1.7\n- Lang
truncatedNoboolean, e.g. false
charactersNonumber, e.g. 1138
tokensEstimateNonumber, e.g. 285

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, and the description adds substantially more: a hard 20 MB size limit, an explicit payout requirement and price ($0.005 USDC on Base via x402), and what the response contains (Markdown plus character/word/token counts). The payment obligation is exactly the kind of behavioral detail an agent must know before calling.

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?

Two tight sentences: capability and constraints first, return shape and cost second. Every clause carries information — formats, size cap, output contents, price — with no filler.

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?

Although an output schema exists, the description still summarizes the return payload, and it covers format support, size limits, and the paid-call requirement. For a single-parameter conversion tool with full annotation coverage, nothing an agent needs in order to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% for the single 'url' parameter, so the baseline is 3, but the description adds real meaning by specifying the acceptable document types and the 20 MB size ceiling that constrain a valid URL. It goes beyond restating the schema without fully explaining URL accessibility requirements (e.g., authentication or redirects).

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

Purpose4/5

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

States a specific verb and resource ('Convert a document at a URL to Markdown') and enumerates the supported input formats (PDF, DOCX, XLSX/XLS, ODT, ODS, CSV, XML). It does not explicitly contrast itself with siblings like extract_tables or web_extract, so an agent must infer the boundary from the format list, but the core purpose is unambiguous.

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

Usage Guidelines3/5

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

The phrase 'for an LLM' and the format/size constraints imply when this tool is appropriate (already-published documents needing Markdown conversion). However, there is no explicit direction on when to choose this over extract_tables or web_extract, and no stated exclusions or prerequisites beyond the size cap.

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