Skip to main content
Glama

trace_cone

Read-onlyIdempotent

Trace transitive combinational fanin or fanout from a net or term, crossing hierarchy and stopping at flops, ports, and black boxes; returns node counts and frontier endpoints for logic reachability.

Instructions

Trace the combinational fanin/fanout cone of a term/net via naja's LogicCone. Use this for transitive logic reachability; use get_drivers or get_loads for only immediate endpoints. direction: fanin|fanout. The cone crosses hierarchy and combinatorial arcs and always stops at flops, top ports, and opaque black-box cells. Returns node_count, counts_by_kind, counts_by_model, and a frontier of {flops, ports, blackboxes} with exact counts and lists capped at max_frontier (<=200) with a truncation marker. cross_hierarchy groups the flop frontier by top-level submodule and, under outside_root_subtree, names the frontier registers that live OUTSIDE the cone root's own subtree (the cross-hierarchy answer) — read it directly.

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>",
      "direction": "<direction>"
    },
    "name": "trace_cone"
  }
}

Input Schema

NameRequiredDescriptionDefault
bitNoBus bit index, separate from the literal name; omit for the whole object.
pathYesExact hierarchical path to the cone's root term or net.
directionYesTraverse upstream fanin or downstream fanout logic.
max_frontierNoMaximum listed endpoints per frontier kind; clamped to 1..200.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.0
    • addedInput schema / properties / bit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Bus bit index, separate from the literal name; omit for the whole object.",
      +  "title": "Bit"
      +}
    • addedInput schema / properties / path / items
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / path / type
      Previous value: -"string"New value: +"array"
  2. Changed1 schema field changedv0.1.25
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "trace_coneOutput",
      +  "type": "object"
      +}
  3. Changed4 schema fields changedv0.1.9
    • addedInput schema / properties / direction / description
      Added value: +"Traverse upstream fanin or downstream fanout logic."
    • addedInput schema / properties / direction / enum
      Added value: +[
      +  "fanin",
      +  "fanout"
      +]
    • addedInput schema / properties / max_frontier / description
      Added value: +"Maximum listed endpoints per frontier kind; clamped to 1..200."
    • addedInput schema / properties / path / description
      Added value: +"Exact hierarchical path to the cone's root term or net."
  4. First observedv0.1.8

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, it discloses real traversal semantics: the cone crosses hierarchy and combinatorial arcs and always terminates at flops, top ports, and opaque black-box cells. It also describes frontier truncation behavior and the cross_hierarchy grouping, though it does not mention cost or performance characteristics of a potentially large traversal.

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 and the sibling alternative are front-loaded, and the remaining sentences carry substantive behavioral detail. It is somewhat dense and repeats the max_frontier <=200 limit already in the schema, which is minor waste.

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

Completeness5/5

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

For a graph-traversal tool with four parameters, the description covers termination conditions, hierarchy crossing, frontier truncation, and how to read the cross-hierarchy answer. With an output schema present, return-value explanation is optional, and what is given is more than sufficient.

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 coverage is 100%, so path, bit, direction, and max_frontier are already documented, including the 1..200 clamp. The description restates direction values and the max_frontier cap rather than adding new parameter meaning, so the baseline 3 applies.

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

Purpose5/5

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

The opening sentence names a specific verb and resource ('Trace the combinational fanin/fanout cone of a term/net') and immediately contrasts it with get_drivers/get_loads, so an agent can distinguish it from siblings without opening a schema.

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

Usage Guidelines5/5

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

It states the selecting condition explicitly: use this for transitive logic reachability, use get_drivers or get_loads for only immediate endpoints. That is a direct when-to-use/when-not-to-use rule with named alternatives.

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