Skip to main content
Glama

Convert a document

convert_document
Read-onlyIdempotent

Convert a document from one format to another, for example Word to markdown, markdown to Word, or HTML to plain text. Supply the document as text, base64 or a public URL. Costs 1 credit.

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": {
      "to_format": "<to_format>",
      "from_format": "<from_format>"
    },
    "name": "convert_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic URL to download the document from (maximum 10 MB).
textNoThe document itself, for text formats. Give exactly one of text, content_base64 or url.
to_formatYesFormat to produce. docx, odt and epub come back base64-encoded; the rest come back as text.
from_formatYesFormat of the input document.
content_base64NoThe document as base64, for binary formats such as docx, odt or epub.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive behavior, so the bar is lower. The description adds real value beyond them by disclosing the 'Costs 1 credit' charge and that the URL must be public, both of which affect whether an agent should invoke it.

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, front-loaded with the core action and examples, followed by the input options and cost. Nothing is redundant or buried.

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, 100% param coverage and rich annotations, the description needs only to add what structured fields cannot: cost and public-URL expectations, which it does. Minor gap is not pointing to list_formats for enumerating supported format pairs.

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% and each parameter (url, text, content_base64, to_format, from_format) is documented in the schema, so baseline 3 applies. The description restates the three input mechanisms but adds no format-compatibility or syntax detail beyond the schema, such as the base64 return caveat for docx/odt/epub which lives only in the schema.

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 names a specific verb and resource ('Convert a document from one format to another') and grounds it with concrete example conversions (Word to markdown, HTML to plain text). An agent immediately understands the transformation semantics, which are distinct from the credit/order/list_formats siblings.

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?

It gives input-mechanism guidance ('Supply the document as text, base64 or a public URL') but no explicit when-to-use vs. alternatives, no mention of the list_formats sibling for discovering supported formats, and no when-not-to-use condition. Usage is implied rather than spelled out.

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