Skip to main content
Glama

flatmark

Convert a document to Markdown in one call

convert_document
Read-only

Convert a document up to 8 MB to Markdown and return it directly.

Pass the file as base64 in content_base64, or as a download link in file, and its name in filename. The extension decides the type: .pdf, .docx, .pptx, .xlsx, .html, .htm or .txt. Returns markdown and meta (filename, length in characters). PDFs come back as plain text without headings and without OCR. For scans, tables and page numbers, use submit_conversion_job. Works without an API key at the anonymous rate limit.

Credits: 1 per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoThe file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.
filenameYesThe file name with its extension (.pdf, .docx, .pptx, .xlsx, .html, .htm or .txt). The extension decides how the file is read.
content_base64NoThe file content, base64-encoded. Up to 8 MB before encoding.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / content_base64 / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / content_base64 / default
      Added value: +null
    • removedInput schema / properties / content_base64 / type
      Removed value: -"string"
    • addedInput schema / properties / file
      Added value: +{
      +  "default": null,
      +  "description": "The file as a download link, instead of `content_base64`. In ChatGPT, pass the user's uploaded file here. Other clients can set `download_url` to a public https URL.",
      +  "properties": {
      +    "download_url": {
      +      "description": "A public https URL of the file.",
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "description": "An identifier for the file. ChatGPT sets it; other clients may pass any label, such as the file name.",
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "content_base64",
      -  "filename"
      -]New value: +[
      +  "filename"
      +]
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds substantial context beyond them: the 8 MB size cap, supported extensions, PDF plain-text limitations without headings or OCR, returned fields, anonymous auth behavior, and credit cost. No annotation contradiction.

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?

Front-loaded with the core action and size limit, then structured details on inputs, outputs, limitations, and alternatives. Every sentence contributes unique operational 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?

Given an output schema exists, the description need not define return structure but still names the markdown and meta outputs. It covers size limits, supported formats, PDF caveats, alternative tool routing, authentication, and cost, leaving no meaningful gap for correct invocation.

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 schema already documents all three parameters. The description adds useful selection semantics by explaining the two input modes: base64 via content_base64 or a download link via file, plus that filename's extension determines the parser.

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 and resource: convert a document up to 8 MB to Markdown and return it directly. It clearly distinguishes itself from submit_conversion_job by naming that sibling for scans, tables, and page numbers.

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?

Explicitly covers when to use this tool versus the alternative, including the exact conditions for choosing submit_conversion_job. It also states the anonymous rate-limit availability and the 1-credit cost.

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.