Skip to main content
Glama

Convert document

mcpConvert
Read-only

Create a document in another format: docx, pptx, xlsx, odt, odp, ods, html, md or qmd. To write a new document, write Markdown and send it as content with filename "notes.md" (in pptx the content is laid out on slides and continues onto new slides when it does not fit). To convert an existing document, give it ONE way: fileRef: a file the user uploaded (mcp-file://docparse/file_...). file: in ChatGPT, the file the user attached (ChatGPT fills it in). content + filename: the document itself; binary files base64-encoded with contentEncoding="base64", text as plain text. input: an https:// URL of a publicly reachable document, or a sample id from mcpFormats. Which way to send a file: a file in your sandbox or workspace: call createUpload (one token PER FILE; set count for several) and run its curl line, then pass the fileRef here. curl fails with a network error, or the user wants to pick a file: call uploadDocument (the user chooses it in the AILANG Parse card). The card parses the file; it does not convert or edit it. a public https:// link; short text as content. In ChatGPT, file. Never parse the file yourself (your own script, or your own reading of it) and present that as this tool's result: if the file cannot be sent, tell the user. The result carries download_url, a link to the generated file valid for one hour: give it to the user. It also carries the file as base64 in content (encoding "base64"; text formats come back as utf8). Leave outputPath empty: the server cannot write to your filesystem.

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": {
      "outputFormat": "<outputFormat>"
    },
    "name": "mcpConvert"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNo
inputNo
apiKeyNo
contentNo
fileRefNo
filenameNo
outputPathNo
outputFormatYes
contentEncodingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / fileRef
      Added value: +{
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / content
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / contentEncoding
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "input",
      -  "outputFormat"
      -]New value: +[
      +  "outputFormat"
      +]
  3. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "input",
      -  "outputFormat",
      -  "outputPath",
      -  "apiKey"
      -]New value: +[
      +  "input",
      +  "outputFormat"
      +]
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses the return payload (download_url valid for one hour, plus base64/utf8 content), the pptx slide-overflow behavior, the base64 encoding requirement, and the constraint that outputPath must stay empty because the server cannot write to the caller's filesystem. That last point usefully reconciles 'create' with readOnlyHint=true, so there is no contradiction. Minor gap: nothing on size limits or failure modes.

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?

Front-loaded with the purpose, then organized into labeled input modes and a decision list, which suits a 9-parameter tool. A few parentheticals ('in pptx the content is laid out on slides...', '(ChatGPT fills it in)') add bulk, but nearly every line carries operational value.

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 complex, nested-input tool with no output schema and no schema descriptions, the definition covers input selection, encoding, and return values including link lifetime. An agent could call this correctly without additional reference material.

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 0% across 9 parameters, so the description must carry the load, and it does for fileRef, file, content+filename, contentEncoding, input, and outputPath. The `outputFormat` values are implied by the format list rather than tied to the parameter name, and `apiKey` is never mentioned, so coverage is strong but not complete.

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 opening sentence gives a specific verb and resource ('Create a document in another format') and enumerates the exact output formats accepted. It also distinguishes this tool from relatives: uploadDocument 'parses the file; it does not convert or edit it,' and mcpFormats supplies sample ids for the `input` parameter.

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?

Provides explicit routing rules: use createUpload for sandbox/workspace files, uploadDocument when curl fails or the user wants to pick, a public https URL or short text otherwise, and `file` in ChatGPT. It also states a clear prohibition — never parse the file yourself and present that as the tool's result — leaving little to infer.

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.