Skip to main content
Glama

summarize_file

Reads a file from the workspace and returns raw content for AI summarization before storing the summary as codebase memory.

Instructions

Read a file from the codebase and return its raw content (LLM should summarize and then call store_memory)

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to workspace root
max_linesNoMax lines to return; default 500

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.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 burden. It usefully discloses the key behavioral trait that raw content is returned rather than a summary, but omits error behavior for missing/large/binary files, whether output is truncated silently, and whether any workspace permission scoping applies.

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 plus a short parenthetical workflow note, with zero filler. The most decision-relevant fact (returns raw content) comes first.

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?

For a two-parameter read tool with no output schema and full schema coverage, the description covers purpose and downstream workflow adequately. It leaves minor gaps around truncation semantics and failure modes, but nothing that would prevent a correct invocation.

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%, with both 'path' (relative to workspace root) and 'max_lines' (default 500) documented in the schema. The description adds no meaning beyond that, so the baseline of 3 applies even though nothing is actively missing.

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: read a file and return its raw content, and explicitly clarifies that summarization is the caller's job followed by store_memory. This resolves the tension between the name 'summarize_file' and the actual behavior, though it never explicitly says the tool does not summarize for you or how it differs from get_file_summary.

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 parenthetical implies workflow context (read, then summarize, then persist via store_memory), which is usable guidance. However, it gives no when-not-to-use guidance and does not distinguish this from siblings like get_file_summary, get_code_snippet, or search_codebase, which an agent could plausibly pick instead.

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