Skip to main content
Glama

digest_file

Ask a question about a text, source, log, JSON, or PDF file instead of reading it all; get bounded answers with line references and file-checked quotes.

Instructions

Ask a question about a file (text, source, log, JSON, PDF) instead of reading it.

The executor reads the whole file, in parts sized to its context, and answers in at most max_words with line references and quotes. The server checks every quote against the file and lists the numbers of the answer that are not in the file. grep: optional regular expression; only matching lines (with context) are read, which is faster on large files when you know what to look for.

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>",
      "question": "<question>"
    },
    "name": "digest_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
grepNo
pathYes
modelNo
questionYes
max_wordsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses how the file is read (whole file, chunked to context), the output budget (max_words with line references and quotes), and a non-obvious server-side verification step that flags quoted numbers not present in the file. It omits cost/latency profile and does not state the read-only nature explicitly.

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?

The purpose is front-loaded in the first sentence and each subsequent sentence adds a distinct fact (execution behavior, answer format, quote verification, grep). Slightly dense prose and a grep explanation appended after behavioral details rather than grouped with parameter guidance keep it from a 5.

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?

An output schema exists, so return values need not be described, and the description covers execution model, output constraints, and verification behavior well. The unexplained 'model' parameter and unstated read-only/cost characteristics are the remaining gaps for a five-parameter tool.

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 description coverage is 0%, so the description must compensate, and it does for four of five parameters: path and question are evident from the framing, max_words is explained as an answer-length cap, and grep gets a full explanation of what it does and when to use it. The 'model' parameter is never mentioned, leaving one gap.

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-plus-resource ('ask a question about a file') and enumerates the file kinds it handles, plus the core value proposition ('instead of reading it'). It does not name or distinguish itself from plausible siblings such as extract_from_file or digest_command, so it stops short of 5.

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?

The phrase 'instead of reading it' gives an implicit use condition, and the grep sentence explicitly says when the parameter pays off ('faster on large files when you know what to look for'). There is no explicit when-not guidance and no named alternative tool to route to.

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