Skip to main content
Glama

get_file_summary

Retrieve a compact summary of a file before reading its full content to understand its purpose, exports, imports, symbols, dependencies, and side effects.

Instructions

Get a compact machine-oriented summary of a file. Use this BEFORE reading full file content to understand file purpose and structure. Returns exports, imports, symbols, dependencies, and side effects. Much smaller than full file read.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile path to get summary for
projectNoProject namedefault

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does add real value by describing the response payload and its relative size ('Much smaller than full file read'), which sets expectations about cost. It omits behavior an agent may need: read-only nature is only implied, and nothing is said about error handling for missing files, project scoping, or whether output is truncated for large files.

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 short sentences, front-loaded with the action and immediately followed by the ordering constraint and the payload description. No filler, and the final size comparison earns its place by justifying the pre-read recommendation.

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?

No output schema exists, so the description must describe returns — and it does, listing the five summary components. For a two-parameter read tool this is nearly complete; the only meaningful gaps are the read-only/error behavior and any notion of summary fidelity or truncation.

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 both 'path' and 'project' are already documented in the schema, establishing the baseline of 3. The description adds no semantics beyond the schema — notably nothing about whether 'project' scopes to a registered project or what the default resolves to.

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?

Specific verb and resource ('Get a compact machine-oriented summary of a file') with an explicit enumeration of what the summary contains: exports, imports, symbols, dependencies, side effects. It clearly positions itself against a full file read, though it does not differentiate against similarly named siblings such as summarize_file or get_symbol_info.

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?

Gives a concrete sequencing rule: 'Use this BEFORE reading full file content to understand file purpose and structure.' That is clear when-to-use guidance and an implied when-not (skip it if you already need full content). It stops short of naming sibling alternatives or stating exclusions for cases where a symbol-level tool would be better.

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