Skip to main content
Glama

inspect_file

Check a file's token count and determine whether the guard would drop it when packing repository context.

Instructions

Token count for a file and whether the guard would drop it.

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

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/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 behavioral burden, and it does disclose the two pieces of information returned, which is useful since there is no output schema. It omits that this is a non-mutating inspection, what happens on a nonexistent or unreadable path, how large files are handled, and what format the token count or drop decision takes.

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?

A single front-loaded sentence with no filler, sized appropriately for a narrow inspection tool. The only cost is that the compression leaves 'guard' ambiguous rather than making the sentence cheaper to read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations mean the description is the sole source of truth, and it only sketches the returns without format, units, pagination/limits, or failure behavior. For a tool whose main value is its returned values, that leaves the agent guessing what it will actually receive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the single parameter 'path' is documented nowhere; the description adds no meaning such as whether the path is absolute, workspace-relative, or a glob. For a one-parameter tool this is a notable gap, though the parameter is fairly self-evident from the tool's file-scoped purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the two things it computes (token count for a file, and whether the guard would drop it), which is more than a restatement of the name. However, 'the guard' is undefined jargon the agent must infer from the sibling 'guard_context', and the phrase 'for a file' is the only clue to the resource. Purpose is identifiable but not crisply specified.

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

Usage Guidelines2/5

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

There is no statement of when to use this versus guard_context or savings_summary, no prerequisite, and no exclusion. The reader must guess that this is a per-file pre-check while guard_context is presumably a broader context check.

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