Skip to main content
Glama

distill_file

Converts local PDF, Word, Excel, PowerPoint, ODF, and image files into token-lean Markdown for LLM use, paging large documents and reporting token savings.

Instructions

Convert a document (PDF, DOCX, PPTX, XLSX, ODF, image) to token-lean Markdown; large documents come back in pages

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": "distill_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path, or relative to the server's working directory
linguaNoCompress further with LLMLingua-2 when installed
offsetNoLine to start from, for documents too large to return at once; use the nextOffset from the previous call
boostersNoBoosters to apply: dedupe, media, tables, ws

Output Schema

NameRequiredDescriptionDefault
kindYes
noteNo
linesYes
pagesYes
tokensYes
savingsNo
markdownYes
truncatedNo
nextOffsetNo
continuationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the return format (Markdown, token-reduced) and the paging behavior for large inputs, but says nothing about read-only nature, size limits, failure modes, or what the reduction costs in fidelity.

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?

A single front-loaded sentence that names the operation, enumerates supported formats, and flags the paging outcome. No filler or redundant restatement.

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 input schema and an output schema present, the description only needs to frame purpose and the paging contract, which it does. It is slightly thin on format-fidelity expectations and on the batch alternative, but nothing essential to a correct call is missing.

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%, so all four parameters are already documented, giving a baseline of 3. The description adds only indirect meaning about paging (relevant to offset) and nothing about lingua or boosters beyond what the schema states.

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 (convert) and resource (document) plus the exact supported formats and the output form (token-lean Markdown). It is clear on its own, but it never names or contrasts with the sibling distill_files, so an agent must infer the single-vs-multiple distinction.

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 by the wording ('convert a document') and the note that large documents come back in pages hints at the paging workflow. There is no explicit when-to-use/when-not guidance and no routing to distill_files for batches or distill_capabilities for feature discovery.

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