Skip to main content
Glama

get_intent

Read-onlyIdempotent

Retrieve source-level intent erased by netlist lowering, including enum/typedef state names, encodings, and symbolic parameter or generic expressions from RTL declarations.

Instructions

Retrieve source-level intent that netlist lowering erases (warm-only). Use when the answer is in the SystemVerilog or VHDL type/declaration, not the flattened gates: enum/typedef state names + encodings (incl. PACKAGE typedefs whose members live in another file), and symbolic PARAMETER or generic expressions (the formula behind a baked-in width). ref: an exact-name list (["cva6", "csr_regfile_i", "priv_lvl_q"]), a package member (["riscv::PLEN"]), a parameter (["top", "inst", "PARAM"]), an instance list for its parameters, or ["pkg"] to list package parameters. want: auto | type | fsm_states | parameters. If the intent layer is not loaded, returns a note and you should fall back to get_source.

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": {
      "ref": "<ref>"
    },
    "name": "get_intent"
  }
}

Input Schema

NameRequiredDescriptionDefault
bitNoBus bit index, separate from the literal name; omit for the whole object.
refYesList of exact object/instance/parameter names. Package name or pkg::NAME is a single-element list.
wantNoIntent fact to retrieve; auto selects from the reference.auto

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 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"
      +}
    • changedInput schema / properties / ref / description
      Previous value: -"Hierarchical object/instance path or package parameter path (top.inst.PARAM), package name, or member such as pkg::NAME."New value: +"List of exact object/instance/parameter names. Package name or pkg::NAME is a single-element list."
    • addedInput schema / properties / ref / items
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / ref / type
      Previous value: -"string"New value: +"array"
  2. Changed2 schema fields changedv0.1.25
    • changedInput schema / properties / ref / description
      Previous value: -"Hierarchical object/instance path or package member such as pkg::NAME."New value: +"Hierarchical object/instance path or package parameter path (top.inst.PARAM), package name, or member such as pkg::NAME."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "get_intentOutput",
      +  "type": "object"
      +}
  3. Changed3 schema fields changedv0.1.9
    • addedInput schema / properties / ref / description
      Added value: +"Hierarchical object/instance path or package member such as pkg::NAME."
    • addedInput schema / properties / want / description
      Added value: +"Intent fact to retrieve; auto selects from the reference."
    • addedInput schema / properties / want / enum
      Added value: +[
      +  "auto",
      +  "type",
      +  "fsm_states",
      +  "parameters"
      +]
  4. First observedv0.1.8

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), so this description's contribution is the preconditions and failure mode: it is warm-only, and if the intent layer is not loaded it returns a note rather than data. That is exactly the kind of operational context annotations cannot express. It stops short of describing costs, coverage limits, or what happens with partial matches.

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?

The most important constraint (what the tool returns and when to prefer it) is front-loaded, and the ref:/want: labeling makes a dense parameter discussion scannable. Some phrasing is packed tightly, and the fallback sentence trails after parameter detail where it would read better next to the warm-only caveat.

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?

With an output schema present the description need not explain return values, and it still covers purpose, selection criteria, prerequisite state, and the degraded-response case. For a read-only, three-parameter lookup with full schema coverage, nothing an agent needs in order to call it correctly appears to be 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 coverage is 100%, so the schema already documents all three parameters; the description's added value comes from worked examples of the ref shapes (exact-name list, ["riscv::PLEN"] package member, ["top","inst","PARAM"] parameter, ["pkg"] listing) and the meaning of each want value. The bit parameter is not mentioned at all in the description, so the addition is real but partial, keeping this near the baseline.

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 definition opens with a specific verb and resource ("Retrieve source-level intent") and immediately scopes it against the alternative data source: intent that "netlist lowering erases," i.e., the SystemVerilog/VHDL type/declaration rather than flattened gates. The enumerated payload (enum/typedef encodings, package typedefs, symbolic parameter expressions) makes the purpose concrete enough to distinguish it from get_source without opening either schema.

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 gives an explicit selection rule ("Use when the answer is in the ... type/declaration, not the flattened gates") and a named fallback (get_source) for the unloaded-layer case. The gap is that "warm-only" is stated as a constraint but the agent is never told how to satisfy it or that a loading step may be a prerequisite, so the guidance is clear but not fully actionable.

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