Skip to main content
Glama

inspect_tape

Query a recorded tape with one engine-grammar request to get a text answer and parsed header, enabling inspection of stats, leaves, branches, source lines, value origins, uses, and dependency cones.

Instructions

Ask the tape one question in the engine's own grammar and get its text answer plus the parsed header. Verbs: 'stats' | 'leaves [kind=input|constant] [by=leaf] [limit=N]' | 'branches order=margin [limit=N]' | 'sites [file=NAME] [limit=N]' | 'at FILE:LINE [context=N]' (source with the recorded values; hash=ok means the file shown is the one compiled) | 'find value=X' (where a printed number was computed) | 'origin #N' (the formula behind a value) | 'uses #N' | 'cone #N' (which leaves can move a value, by derivative or only by a branch) | 'source root=COMPILED=LOCAL' (map compiled paths to a local source tree) | 'replay ...' (prefer the replay tool). Ids are #N from earlier answers. A malformed request answers status=error in the header, never an exception.

Input Schema

NameRequiredDescriptionDefault
requestYes
tape_idYes
max_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.4/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 burden, and it does disclose real behavior: malformed requests return status=error in the header rather than raising, and hash=ok certifies that the displayed source is the compiled one. It never states that this is a non-mutating query, nor does it describe the header's other fields, output size limits, or cost, leaving meaningful behavioral ground uncovered.

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?

Purpose is front-loaded in the first sentence, followed by a compact verb table where each entry pairs a verb with its qualifiers and a parenthetical hint. The density is high and almost every clause earns its place; the parenthetical glosses on 'cone' and 'source' are the only places that could be trimmed.

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

Completeness3/5

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

For a tool with no annotations and no output schema, the description explains the return shape only loosely (text answer plus header, with status and hash singled out). It omits how to obtain a valid tape_id and what max_lines bounds, both of which an agent needs before its first successful call.

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 0%, so the description must compensate, and it does so thoroughly for `request` by spelling out the grammar and the limit=N modifier. However, `tape_id` is never mentioned (the agent must infer it comes from earlier load_tape/list_tapes results) and `max_lines` (default 40) is entirely unexplained, leaving two of three parameters undocumented in both schema and prose.

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?

The first sentence names a specific action (ask the tape one question) and states exactly what comes back: the text answer plus the parsed header. The enumerated verb list makes the resource concrete and separable from siblings like trace_script or replay. It stops short of 5 only because 'tape' and the surrounding domain vocabulary are never grounded for a newcomer.

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?

One explicit routing rule is given: "replay ... (prefer the replay tool)", which correctly steers the agent away from this tool for that verb. For the rest there is no guidance on when to reach for inspect_tape versus load_tape, trace_script, or list_tapes, so the choice is left to inference.

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