Skip to main content
Glama

Convert document to Markdown

convert_document
Read-onlyIdempotent

Convert local documents such as PDF, Word, Excel, or EPUB into Markdown so agents can read them. Tables keep their rows and columns, and long files can be read page by page.

Instructions

Convert a local document to Markdown.

path: the file to read (absolute, or relative to where the server was started). sections: which pages, slides or sheets to return, by their numbers in document_outline: "3" or "2-5". Leave out for the whole document. max_chars: the most characters of the document to return (default 100,000). A longer text is cut there, and a note after it says so.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
sectionsNo
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful context beyond that: path resolution relative to the server's start directory, and the fact that text longer than max_chars is truncated with a trailing note. It does not describe error behavior for unreadable files.

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 one-sentence purpose followed by three tight parameter lines, one per input. Minor redundancy in restating the max_chars default that already appears in the schema, but nothing is padded.

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 only three parameters, no output schema, and rich annotations, an agent has what it needs to call this correctly. The remaining gap is the return value's shape and failure modes, which the description only gestures at via the truncation note.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: it defines path as absolute or relative to the server's start directory, gives the concrete sections syntax ('3' or '2-5') and its anchor in document_outline, and states max_chars' unit, default and truncation consequence.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 local document to Markdown', with the scope limited to local files. It distinguishes itself indirectly by pointing at document_outline as the source of section numbering, though it never explicitly contrasts the two tools.

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?

Usage is implied through the parameter walkthrough: omit 'sections' for the whole document, pass page/slide/sheet numbers to narrow it. There is no explicit statement of when to use this tool versus document_outline, or of prerequisites such as supported file types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools