Skip to main content
Glama
phryniszak

stm32-stlink-mcp

by phryniszak

Evaluate an expression

evaluate_expression

Evaluate C expressions in the current STM32 debug frame to inspect globals, locals, struct fields, array elements, and pointer dereferences via GDB.

Instructions

Symbol-aware expression evaluation in the current frame via gdb's -data-evaluate-expression — reads globals/locals by name, struct/array member access, pointer dereference, arithmetic, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes
expressionYese.g. 'my_global', 'some_struct.field', '*(int*)0x20000000', 'my_array[3]'
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral transparency. It mentions that evaluation happens via gdb's -data-evaluate-expression, which hints at potential side effects, but does not disclose whether this operation is read-only or may alter state. It also does not mention error conditions, permission requirements, or whether the evaluation could change program state. For an expression evaluation tool, this is a notable gap.

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 description is concise, single-sentence, and includes the tool's mutation of using gdb's command. It is efficient in conveying the core purpose. It loses a point because it could be more front-loaded with usage guidance, but the length is appropriate for an evaluation tool.

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?

The tool has only 2 parameters, both required, with partial schema description. The description is complete enough for a simple evaluator, but since there is no output schema and no annotations, it should describe more about return values and potential side effects. Contextual signals show a medium complexity tool (expression evaluation), and the description covers its main parameters but lacks behavioral depth.

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 50%, meaning the 'expression' parameter has a description with examples, and the 'sessionId' parameter is only noted as a string with no additional details. The description provides examples for the expression parameter, adding some value beyond the schema. However, it does not explain the sessionId parameter's semantics; but since sessionId is a common pattern, the baseline of 3 is appropriate when schema partially covers parameters.

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 clearly states the tool evaluates an expression in the current frame using gdb's -data-evaluate-expression, listing examples of supported expressions. It distinguishes itself from sibling tools like memory_read and register_read by focusing on symbol-aware expression evaluation. A score of 5 is not given because the exact scope of 'symbol-aware' could be clearer, but it is unambiguous enough for an agent.

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 description implies usage when you need to evaluate expressions, but does not explicitly state when to use this tool versus alternatives like memory_read or register_read. Sibling tools are present, but the description does not provide direct comparison or exclusion criteria. However, the expression context (e.g., dereferencing pointers) suggests a clear use case that goes beyond memory_read or register_read.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phryniszak/stmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server