Skip to main content
Glama

convert_document

Read-only

Convert a user-supplied PDF or DOCX into structured JSON, Markdown, and tables. v1 reads a digital text layer only; scanned PDFs and images are rejected until OCR is added. Price is 0.02 USDC per successful call on Base.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "convert_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputNoResult shape. Default is both JSON fields and Markdown.
filenameNoOriginal filename, used to help detect type.
media_typeNoOptional MIME type, for example application/pdf.
source_urlNoPublic http(s) URL of a PDF or DOCX. Do not send both this and content_base64.
content_base64NoBase64-encoded PDF or DOCX bytes. Prefer this for private documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, openWorldHint=false), yet the description still adds real behavioral context: the OCR limitation, the rejection behavior for scans, and a per-successful-call price of 0.02 USDC on Base. That cost and failure-mode disclosure goes meaningfully beyond the annotations. It does not describe failure handling for malformed or unreachable URLs, which leaves a small gap.

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?

Three short sentences: capability first, limitation second, pricing last. Nothing is redundant, and the most decision-relevant constraint (digital text layer only) appears before the cost note.

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 five-parameter, zero-required tool with no output schema, it covers inputs, output shapes, and the OCR boundary well enough to call correctly. Minor gaps remain around how partial conversions or invalid documents are reported back, but the core picture is complete.

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 every parameter is already documented in the schema, including the source_url vs content_base64 exclusivity. The description mentions accepted formats (PDF/DOCX) and output shapes, but adds no format syntax, size limits, or encoding guidance beyond what the schema states. 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?

The description opens with a specific verb and resource ('Convert a user-supplied PDF or DOCX') and names the concrete outputs ('structured JSON, Markdown, and tables'). There is no ambiguity about what the tool produces, and the unrelated sibling price_info means no differentiation burden is required.

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?

It states the applicability boundary explicitly: 'v1 reads a digital text layer only; scanned PDFs and images are rejected until OCR is added.' That tells the agent when not to call it. It stops short of naming alternative paths or prerequisites for supplying documents, but no sibling alternative exists to route to.

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