Skip to main content
Glama

doc_to_markdown

Document to clean markdown for AI agents, $0.05 per file: PDF, DOCX, XLSX, ODT, ODS, CSV, HTML or XML in, LLM-ready markdown (or plain text) out. One call: send a url or the file as base64 (max 10 MB) — no upload step, no polling. A PDF without a text layer (a scan) returns 400 and you pay nothing; use /doc/ocr for images. USDC on Base, no account, no API key.

Input Schema

NameRequiredDescriptionDefault
urlNohttp(s) link to the file; we fetch it. Send this OR file_base64.
formatNomarkdown
filenameNoOptional original filename of file_base64 (its extension helps detect the type)
max_charsNoTruncate the output to this many characters
media_typeNoOptional MIME type of file_base64 (helps tell DOCX/XLSX apart)
file_base64NoThe file bytes, base64-encoded. Send this OR url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: cost ($0.05/file), payment (USDC on Base, no account, no API key), input size cap (10 MB), single-call no-polling semantics, and the failure behavior (scan returns 400 and you pay nothing). This is exactly the operational context an agent needs.

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 the core purpose and format list, then pricing and workflow details. Dense but nearly every clause carries information (cost, size cap, error handling). Slightly crowded with payment/branding detail, keeping it from a 5.

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 moderate-complexity conversion tool with no output schema, the description covers inputs, formats, size limits, cost, payment, and error routing to doc_ocr. An agent has everything needed to call it correctly.

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?

Schema description coverage is 83%, so the schema already documents url/file_base64 (send one OR the other), filename, media_type, and max_chars. The description restates the url-or-base64 choice and adds the 10 MB limit, but adds little parameter-level meaning beyond the structured fields. 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+resource (document to clean markdown) and enumerates the exact input formats (PDF, DOCX, XLSX, ODT, ODS, CSV, HTML, XML) and outputs (markdown or plain text). It also differentiates from siblings by naming doc_ocr for images, so an agent can route without opening the 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?

Explicitly covers the when-not case: a scan without a text layer returns 400 and the agent should use doc_ocr for images. It also clarifies the workflow ('one call, no upload step, no polling'), giving strong context. It stops short of a fully framed when-to-use statement beyond the implied 'you have a document, you want markdown'.

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