Skip to main content
Glama

Document to Markdown (parse)

doc_parse
Read-only

Document parser: turn a document into clean, agent-ready Markdown with metadata: DOCX, ODT, EPUB, RTF, HTML, RST, LaTeX and more. Returns title, author, date, language, word count, heading outline, table and image counts and the Markdown (headings and tables preserved). For PDF use pdf-extract; PPTX and XLSX are not supported. Params: file_base64 or url or content (one required), from (optional), max_chars (1000 to 200000, default 50000). Price: $0.009 USDC per call, paid inside this MCP call via x402 (USDC on Base, Solana, Polygon or Arbitrum). x402 MCP clients such as @x402/mcp pay automatically. Free sample: call with the example input {"url":"https://agentsvc.io/docs","max_chars":5000}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
fromNo
contentNo
max_charsNo
file_base64NoDocument as base64 (max 10 MB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds substantial context beyond them: per-call pricing ($0.009 USDC), the x402 payment mechanism and supported chains, a 10 MB size cap, char-range limits, and which clients pay automatically. This is exactly the extra behavioral context annotations cannot carry.

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?

Front-loaded with purpose and format scope, then the routing rule, then params, pricing, and a sample. Dense but almost every clause carries decision-relevant information; the free-sample sentence is arguably promotional but does help an agent test the tool.

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

Completeness4/5

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

With no output schema, the description fully specifies the return shape (title, author, date, language, word count, heading outline, table/image counts, Markdown) and covers payment prerequisites. Only the undefined 'from' parameter keeps it from being complete.

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 only 20%, so the description compensates by explaining the one-of constraint across file_base64/url/content ('one required'), marking 'from' optional, and restating max_chars bounds and default. The 'from' parameter's meaning is still left unexplained, which is the only gap.

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+resource ('turn a document into clean, agent-ready Markdown'), enumerates supported formats, and names the return payload. It actively differentiates from siblings by routing PDF to pdf-extract and declaring PPTX/XLSX unsupported.

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?

Explicit when-not guidance ('For PDF use pdf-extract; PPTX and XLSX are not supported') plus a one-of input rule and a concrete example invocation. It stops short of mentioning the close sibling doc_convert, which an agent could confuse with parsing.

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