Skip to main content
Glama

Convert Inline Content

convert_content

Convert a document inline — pass the content directly as a string (or base64 for binary inputs like .docx, .xlsx or .pptx). PREFERRED route for documents, and the one to use in sandboxed agent environments (claude.ai, Claude Desktop, Cursor): it runs entirely server-side, so it never needs the direct upload those sandboxes block. Limit: up to 4 MB of content — already huge (a 500-page book is ~1 MB of text). For anything larger, use convert_from_url with a public URL. Supported inputs: md, html, rst, txt (plain text); doc, docx, xlsx, ppt, pptx (base64). Supported outputs: docx (Word), pdf, html, txt, md, rst, xlsx. Office inputs render to PDF with their real page layout (Excel honors print areas); PowerPoint inputs convert to pdf only. Returns a job_id — poll get_job_status until 'complete', then get_output_content (inline bytes, sandbox-safe) or get_download_url (download link). Flat fee $0.05 per file. TIP: if you have shell access and are NOT sandboxed (e.g. a local coding agent), the botverse CLI (npx -p botverse-mcp botverse convert <file> --to <fmt>) is faster for local files — it streams from disk instead of re-emitting the content through the model.

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": {
      "content": "<content>",
      "input_format": "<input_format>",
      "output_format": "<output_format>"
    },
    "name": "convert_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe file content as a plain text string (for md, html, rst, txt) or base64-encoded bytes (for doc, docx, xlsx, ppt, pptx).
encodingNoEncoding of the content field. Defaults to "text". Required "base64" for binary inputs (doc, docx, xlsx, ppt, pptx).
input_formatYesSource format of the content.
output_formatYesTarget format: docx | html | txt | md | rst | pdf | xlsx
single_page_sheetsNoExcel to PDF only: scale each sheet onto exactly one PDF page. Default false (the workbook's own print areas and page setup are used).

Output Schema

NameRequiredDescriptionDefault
job_idYesUnique identifier for this job. Pass to get_job_status and get_download_url.
statusYesInitial job state — always queued or processing immediately after submission.
estimated_secondsNoRough estimated processing time in seconds. Actual time may vary.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"The file content as a plain text string (for md, html, rst, txt) or base64-encoded bytes (for docx)."New value: +"The file content as a plain text string (for md, html, rst, txt) or base64-encoded bytes (for doc, docx, xlsx, ppt, pptx)."
    • changedInput schema / properties / encoding / description
      Previous value: -"Encoding of the content field. Defaults to \"text\". Use \"base64\" for binary inputs like .docx."New value: +"Encoding of the content field. Defaults to \"text\". Required \"base64\" for binary inputs (doc, docx, xlsx, ppt, pptx)."
    • changedInput schema / properties / input_format / enum
      Previous value: -[
      -  "md",
      -  "html",
      -  "rst",
      -  "txt",
      -  "docx"
      -]New value: +[
      +  "md",
      +  "html",
      +  "rst",
      +  "txt",
      +  "doc",
      +  "docx",
      +  "xlsx",
      +  "ppt",
      +  "pptx"
      +]
    • addedInput schema / properties / single_page_sheets
      Added value: +{
      +  "description": "Excel to PDF only: scale each sheet onto exactly one PDF page. Default false (the workbook's own print areas and page setup are used).",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (which only flag non-readonly, open-world, non-idempotent), it discloses that execution is entirely server-side, the 4 MB input ceiling, a flat $0.05 fee, and the asynchronous job_id → get_job_status → get_output_content/get_download_url flow. It also states conversion-specific behavior such as Office inputs preserving real page layout and PowerPoint converting to PDF only.

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?

The critical routing and sandbox information is front-loaded and the format/limit/pricing/workflow details are packed efficiently. It is on the long side and the trailing CLI tip, while useful, could be trimmed without losing selection-relevant information.

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?

For a multi-step, costly, async conversion tool, it covers the size ceiling, cost, format matrix, execution environment, and the follow-up calls needed to retrieve results — even though an output schema exists. An agent could invoke and complete this workflow from the description alone.

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 the baseline is 3, and the description adds real meaning about the output_format choices: PPTX is PDF-only and Excel honors print areas, which constrains the enum in ways the schema does not. It does not, however, say anything extra about `encoding` or `single_page_sheets` beyond what the schema already declares.

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 document inline') and immediately states the defining mechanism ('pass the content directly as a string'), which cleanly separates it from convert_from_url and convert_file. Supported input/output format lists further pin down scope.

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?

It gives explicit when-to-use guidance ('PREFERRED route for documents, and the one to use in sandboxed agent environments'), names the condition that selects the alternative ('For anything larger, use convert_from_url'), and covers the non-sandboxed local case by pointing at the CLI.

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