Skip to main content
Glama

Convert a document to Markdown in one call

convert_document
Read-only

Convert a document up to 8 MB to Markdown and return it directly.

Pass the file as base64 in content_base64, or as a download link in file, and its name in filename. The extension decides the type: .pdf, .docx, .pptx, .xlsx, .html, .htm or .txt. Returns markdown and meta (filename, length in characters). PDFs come back as plain text without headings and without OCR. For scans, tables and page numbers, use submit_conversion_job. Works without an API key at the anonymous rate limit.

Credits: 1 per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
filenameYesThe file name with its extension (.pdf, .docx, .pptx, .xlsx, .html, .htm or .txt). The extension decides how the file is read.
content_base64NoThe file content, base64-encoded. Up to 8 MB before encoding.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: states the 8 MB cap, that PDFs return plain text without headings or OCR, the 1-credit cost per call, and the anonymous rate-limit behavior. These are exactly the operational facts 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.

Conciseness5/5

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

Front-loads the core action and size limit, then input methods, then limitations, then cost. Every sentence carries distinct information; no repetition of schema text.

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?

With an output schema present, the description needn't enumerate return fields, yet it still mentions `markdown` and `meta`, and covers the size cap, format limits, alternatives and cost. Nothing needed 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%, so baseline is 3, but the description adds real value by framing the either/or of `content_base64` vs `file` and explaining that the extension in `filename` decides the type and the supported extensions.

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 (convert a document to Markdown), plus scope (up to 8 MB) and behavior (return it directly), which distinguishes it from the async submit_conversion_job sibling without opening any schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use submit_conversion_job 'for scans, tables and page numbers', and notes this tool works at the anonymous rate limit without an API key. Both a when-to-use and a when-to-use-something-else are present.

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.