Skip to main content
Glama

get_intent

Read-onlyIdempotent

Retrieve SystemVerilog source intent erased by netlist lowering: enum/typedef state names, encodings, and symbolic parameter expressions from hierarchical paths or package members.

Instructions

Retrieve source-level intent that netlist lowering erases (warm-only). Use when the answer is in the SystemVerilog type/declaration, not the flattened gates: enum/typedef state names + encodings (incl. PACKAGE typedefs whose members live in another file), and symbolic PARAMETER expressions (the formula behind a baked-in width). ref: a hierarchical path ('cva6.csr_regfile_i.priv_lvl_q'), a package member ('riscv::PLEN'), or an instance path for its 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesHierarchical object/instance path or package member such as pkg::NAME.
wantNoIntent fact to retrieve; auto selects from the reference.auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. First observedv0.1.8

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered. The description adds genuinely new behavioral context: the 'warm-only' precondition (requires the intent layer to be loaded) and the explicit degraded-return behavior ('returns a note') with a fallback instruction. This is meaningful disclosure beyond the annotations.

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?

Front-loaded with the core concept, then scoped to specifics, then parameter guidance and fallback. Dense but each sentence carries weight; slightly heavy prose keeps it from a 5.

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?

No output schema exists, yet the description adequately characterizes what is returned (state names + encodings, symbolic parameter formulas) and the degraded-case behavior. An agent has enough to call it correctly and know when to switch tools.

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

Parameters4/5

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

Schema coverage is already 100%, so baseline is 3, but the description adds value by enumerating the ref forms (hierarchical path, package member 'riscv::PLEN', instance path for parameters) and clarifying that 'auto selects from the reference', which enriches the enum semantics.

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?

States a specific verb+resource ('Retrieve source-level intent') and pinpoints exactly what it returns: enum/typedef state names with encodings and symbolic PARAMETER expressions. It clearly distinguishes itself from get_source and get_module_card by naming the 'type/declaration, not the flattened gates' scope.

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?

Explicitly states when to use it ('when the answer is in the SystemVerilog type/declaration') and provides the alternative path: if the intent layer is not loaded it returns a note and you should fall back to get_source. Both the when and the when-not are covered.

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