Skip to main content
Glama

read_variable

Read-onlyIdempotent

Reads the value of a C variable currently in scope during STM32 firmware debugging, allowing AI agents to inspect live target state without parsing raw GDB output.

Instructions

Reads the value of a C variable currently in scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the variable to read.
sessionNoOptional debug-session name. Omit for the default target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is fully covered. The description's only added behavioral detail is the scoping requirement ('currently in scope'), which usefully implies the target must be halted/at a stop; it says nothing about failure modes such as optimized-out or out-of-scope variables.

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?

A single tight sentence with no filler, and the key qualifier ('currently in scope') is placed where it will be read. Nothing is padded or restated from the schema.

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?

No output schema exists, so return-format explanation would be welcome but is absent; the tool is simple and annotations cover safety, so the description is adequate. It stops short of noting prerequisites (halted session, symbols loaded) or what happens when the variable cannot be resolved.

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?

With 100% schema description coverage, both parameters ('name' and optional 'session') are already documented in the schema. The description adds no additional parameter meaning such as name syntax, fully-qualified paths, or session default behavior, so the 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 gives a specific verb and resource ('Reads the value of a C variable') plus a scope qualifier ('currently in scope'), so an agent knows exactly what it returns. It does not differentiate itself from closely related siblings like track_variable, inspect_symbol, or expressions, which an agent might otherwise confuse it with.

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?

The phrase 'currently in scope' implicitly tells the agent the variable must exist at the current execution point, which is a real usage constraint. However, there is no explicit when-to-use/when-not guidance and no routing to alternatives such as track_variable for ongoing monitoring or expressions for computed values.

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