Skip to main content
Glama

trace_in_stack

Read-onlyIdempotent

Locate a symbol or file path in the compiler stack via abstraction-card or path-prefix matching to return the owning pipeline stage only. Use trace_contract for full cross-layer traces.

Instructions

Lightweight stack location: matched abstraction card or path-prefix pipeline stage only.

No contract artifacts or PR links. Use trace_contract for the enriched cross-layer trace.

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": {
      "symbol_or_path": "<symbol_or_path>"
    },
    "name": "trace_in_stack"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbol_or_pathYesSymbol name or file path to locate in the pypto→PTOAS→pto-isa→simpler stack. Path prefix matching is used for file paths; abstraction card matching for concept names.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so safety and side-effect behavior are covered by structured data. The description adds genuine value by bounding the output ('no contract artifacts or PR links'), which tells the agent what it will not get back. It does not mention performance characteristics or matching ambiguity (e.g. multiple matches), so the addition is modest.

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?

Three short lines, front-loaded with the scope statement, followed by the output exclusion and the sibling pointer. Every clause carries information: scope, negative output contract, and alternative routing. No filler or restatement of the tool name.

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 annotations cover the safety profile. Given a one-parameter lookup tool, the description supplies the essential scope, the output exclusion, and the sibling routing. Only a note on behavior with ambiguous or non-matching inputs is missing.

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% and the single parameter already documents both matching modes (path-prefix for file paths, abstraction-card for concept names). The description's 'matched abstraction card or path-prefix pipeline stage only' restates that semantics rather than extending it. With the schema doing the heavy lifting, baseline 3 applies.

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 description states a specific scope: locate a symbol or path within the pypto→PTOAS→pto-isa→simpler stack via abstraction-card match or path-prefix match. It explicitly narrows itself against the sibling trace_contract ('lightweight' vs 'enriched cross-layer'), so an agent can distinguish the two without opening schemas. The only weakness is that the action is nominalized as 'stack location' rather than stated as an explicit verb.

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?

It names the alternative explicitly ('Use trace_contract for the enriched cross-layer trace') and implies the selecting condition: choose this when a lightweight, match-only result suffices. It stops short of stating a positive trigger such as 'use when you only need to know which stage/layer a symbol lives in', so the when-to-use side is inferred rather than spelled out.

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