Skip to main content
Glama

Process File

process_file
Read-only

Convert PDF, Word, Excel, PowerPoint, or ZIP files into markdown from a URL or local path, with retries for blocked downloads and an option to save the full markdown to disk.

Instructions

Convert PDF, Word, Excel, PowerPoint, ZIP to markdown. A refused download is retried in a headless browser; error_code download_blocked means the site serves the file to neither, and not_a_document means the URL is a web page (use crawl_url). Use output_path to persist the full unsliced converted markdown to disk and receive a slim response.

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": {
      "url": "<url>"
    },
    "name": "process_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFile URL or local path (PDF, Office, ZIP). Supports http/https URLs (no file extension needed; Speaker Deck and Docswell deck pages and arXiv abstract pages lead to their PDF), file:// URIs, and absolute paths.
llm_modelNoLLM model
overwriteNoOverwrite an existing output file at output_path. Defaults to False.
max_size_mbNoMax file size in MB
output_pathNoAbsolute file path (auto .md extension) to persist the full unsliced converted markdown. When set, the response is slimmed to metadata+file path. content_limit/content_offset still affect the response copy but not the on-disk file.
llm_providerNoLLM provider
content_limitNoMax characters to return (0=unlimited)
auto_summarizeNoAuto-summarize large content
content_offsetNoStart position for content (0-indexed)
summary_lengthNo'short'|'medium'|'long'medium
include_metadataNoInclude metadata
max_content_tokensNoMax tokens before summarization
extract_all_from_zipNoExtract ZIP contents
include_content_in_responseNoWhen True (with output_path set), keep content in the response too. Note: the response copy is still subject to content_limit/content_offset slicing; only the on-disk file holds the full unsliced payload. Defaults to False.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / url / description
      Previous value: -"File URL or local path (PDF, Office, ZIP). Supports http/https URLs, file:// URIs, and absolute paths."New value: +"File URL or local path (PDF, Office, ZIP). Supports http/https URLs (no file extension needed; Speaker Deck and Docswell deck pages and arXiv abstract pages lead to their PDF), file:// URIs, and absolute paths."
  2. Addedv0.3.2
  3. Removedv0.1.6
  4. First observedv0.1.7

TDQS

A4/5.0
Behavior2/5

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

Rich behavioral detail beyond the annotations: silent headless-browser retry on refused downloads, distinct error_code taxonomies (download_blocked vs not_a_document), and response slimming when output_path is set. However, the description states the tool will 'persist the full unsliced converted markdown to disk' and exposes an overwrite behavior, which conflicts with the supplied readOnlyHint=true — an agent trusting the annotation could overwrite files assuming no side effects.

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?

Four dense sentences with no filler; the capability statement is first, error semantics second, and the output_path workflow last. Every sentence carries non-obvious information an agent needs before calling.

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 14 parameters, an output schema, and a single required argument, the description covers entry points, failure modes, and persistence well. It does not touch auto_summarize or llm_model/provider behavior, but those are documented in the schema and output schema, so the remaining gap is small.

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. The description goes beyond it by explaining the interaction semantics: output_path returns a slimmed response, while content_limit/content_offset still slice the response copy but never the on-disk file. That cross-parameter relationship is the kind of meaning a schema alone rarely conveys.

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?

Opens with a specific verb and enumerated resource set: 'Convert PDF, Word, Excel, PowerPoint, ZIP to markdown.' It also names the sibling it is not (crawl_url) for the HTML-page case, so an agent can distinguish it from crawl_url_with_fallback and get_supported_file_formats without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given for two conditions: a failed download is retried headlessly, and not_a_document means the URL is a web page that should go to crawl_url instead. It explains when to set output_path. It does not address the large-content siblings (enhanced_process_large_content) or how auto_summarize relates to output_path, so routing among all siblings is incomplete.

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