Skip to main content
Glama

Convert Any Document to Markdown

convert_document
Read-onlyIdempotent

Convert a document file (base64-encoded bytes) to Markdown or text.

Dispatches on the filename extension. Supported: PDF, images (OCR), spreadsheets (CSV, XLSX, XLSM, XLS, ODS), DOCX, PPTX, RTF, EPUB, TXT, MD, HTML, JSON, XML.

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": {
      "file_base64": "<file_base64>",
      "filename": "<filename>"
    },
    "name": "convert_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesOriginal filename (its extension selects the converter).
file_base64YesThe file contents, base64-encoded.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description's main contribution is that conversion dispatches on the filename extension and that images go through OCR. It adds nothing about payload size limits (relevant for base64 input), error behavior on an unsupported extension, or what determines whether Markdown versus plain text is returned, leaving a mutation-free but non-trivial tool partly opaque.

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?

Two short sentences plus a compact format list; the core action is front-loaded and the enumeration is scannable. The phrase 'Markdown or text' is left unexplained, a small but real source of ambiguity rather than padding.

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 a full output schema, complete parameter descriptions, and annotations covering the safety profile, the definition supplies what is needed to call the tool with valid input. The remaining gap is routing guidance against overlapping siblings, which is useful but not required to invoke 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 coverage is 100% and both parameter descriptions already explain base64 encoding and that the extension selects the converter. The description's 'Dispatches on the filename extension' largely restates the schema, so the baseline 3 applies.

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 file ... to Markdown or text') and enumerates the supported input formats, so the agent knows exactly what it does. It does not, however, distinguish itself from the format-specific siblings (pdf_to_markdown, ocr_image, parse_spreadsheet), which overlap with the formats listed here.

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 is only implied: the agent can infer this is the general-purpose entry point when it holds a base64 file and its extension, but there is no explicit when-to-use/when-not-to-use statement and no routing to the specialized siblings for PDFs, images, or spreadsheets.

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