Skip to main content
Glama

Convert document to markdown

convert_document_to_markdown

Convert a document you already have (PDF, DOCX, HTML, plain text) to clean, LLM-ready markdown. Pass the file contents as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base64YesBase64-encoded file contents
filenameNoOriginal filename, e.g. report.pdf — helps format detection

TDQS

A4/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the full behavioral burden. It does add useful context: input must be base64-encoded, and output is deliberately formatted for LLM consumption. But it does not disclose what the tool returns (raw markdown string? wrapped object?), conversion fidelity for complex documents (tables, images), or any size limits — meaningful gaps for a tool with zero annotation coverage.

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?

Two sentences with zero waste. The first front-loads the core purpose and scope (formats, output); the second delivers the single critical invocation requirement. No filler, no repetition of schema content.

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?

For a simple 2-param tool with 100% schema coverage and no nested objects, the description covers purpose, supported formats, and input encoding. The main gap is that no output schema exists and the description never states the return shape, though 'clean, LLM-ready markdown' strongly implies the converted text is returned directly. The sibling distinction, while implicit, is sufficient for routing.

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 100%, so the schema already documents base64 ('Base64-encoded file contents') and filename ('helps format detection'). The description restates the base64 requirement but adds nothing beyond the schema — it doesn't explain why base64 is needed or elaborate on how filename influences format detection. Baseline 3 is appropriate since the schema carries the parameter documentation burden.

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 (convert), resource (a document), supported source formats (PDF, DOCX, HTML, plain text), and output (clean, LLM-ready markdown). The phrase 'you already have' subtly distinguishes it from the sibling convert_url_to_markdown, so an agent can tell them apart at a glance.

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?

The phrasing 'a document you already have' clearly implies this tool is for local file contents rather than URLs, providing implicit routing against the sibling tool. It also instructs the agent on the invocation mechanism ('Pass the file contents as base64'). However, it never explicitly names convert_url_to_markdown or states a when-not-to-use condition, leaving the contrast to inference.

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.

TDQS

A4.1/5.0
Disambiguation5/5

The two tools are clearly distinguished by input source: one converts locally provided file contents, while the other fetches and converts a URL. There is no meaningful overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow the exact same convert_{source}_to_markdown pattern. The naming is perfectly consistent and immediately conveys the action and input type.

Tool Count3/5

With only two tools, the server feels minimal, though the pair covers the two primary input modes for markdown conversion. The count is borderline but not unreasonable for such a focused purpose.

Completeness5/5

The domain is document-to-markdown conversion, and the two tools cover both local files and remote URLs, including web pages, PDFs, DOCX, HTML, and plain text. No significant gaps are apparent for the stated purpose.