Skip to main content
Glama

Document (PDF, DOCX, XLSX, CSV) to Markdown

doc_markdown
Read-only

Markdown of a document at a public URL, up to 10 MB: PDF (page count, title, created and modified dates from its metadata), DOCX, ODT, XLSX/XLS, ODS, Numbers (sheet names), CSV, XML or HTML; plain text is returned as served. Returns file name, MIME type, size, Markdown, word count, token estimate and truncation flag. Images are not converted. Conversion: Cloudflare Workers AI toMarkdown; fetch via validated redirects, DNS checks via Cloudflare DoH. Price: $0.005 per successful call, paid in USDC with x402 v2; failed calls and calls that match nothing are not charged.

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": "doc_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttp or https URL of a PDF, DOCX, ODT, XLSX, XLS, ODS, Numbers, CSV, XML or HTML file (at most 10 MB). Default ports only; credentials, IP addresses, localhost and private or single-label names are rejected.
max_charsNoMaximum characters of Markdown returned, 1000 to 100000. Default 20000. Longer output is cut at a line boundary and flagged truncated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, but the description adds substantial context: rich return fields (file name, MIME type, size, Markdown, word count, token estimate, truncation flag), that images are not converted, that plain text is served as-is, the conversion engine and fetch hardening (validated redirects, DoH DNS checks), and a pricing model of $0.005 per successful call with failed calls free. The billing and truncation behavior are exactly the traits an agent could not derive from the annotations.

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

Conciseness4/5

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

Content is front-loaded logically: purpose and formats, then return fields, then conversion/security, then pricing. It is dense but nearly every clause carries usable information; the only cost is that the single long sentence listing formats makes it slightly harder to scan than a bulleted structure would be.

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?

There is no output schema, so the description takes on the burden of describing return values and does so explicitly, plus limits, failure/billing semantics, and content exclusions. For a two-parameter read-only conversion tool, an agent has everything needed to call it correctly and interpret the result.

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 description coverage is 100%, so both url and max_chars semantics are already fully documented in the schema, establishing a baseline of 3. The description reinforces this with the 10 MB cap and the truncation-at-line-boundary/flag behavior, adding slight corroboration without new syntax detail, so it sits just above baseline.

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 ("Markdown of a document at a public URL") and enumerates the exact input formats handled (PDF, DOCX, ODT, XLSX/XLS, ODS, Numbers, CSV, XML, HTML), which lets an agent tell it apart from a generic web-page converter. It stops short of explicitly naming the sibling web_markdown as the alternative for plain web pages, so differentiation is implied rather than stated.

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?

Usage constraints are present in the form of preconditions (public URL, at most 10 MB, default ports, no credentials/IPs/localhost/private names), which imply when the tool is applicable. However, there is no explicit when-to-use/when-not guidance and no statement routing the agent to web_markdown or web_check for ordinary web pages, so the agent must infer the boundary.

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