Skip to main content
Glama

evaluate_expression

Evaluates a C expression or symbol in the current GDB debugging context to inspect values, types, and program state during firmware debugging.

Instructions

Evaluate a C expression or symbol in the current GDB context.

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": {
      "expression": "<expression>"
    },
    "name": "evaluate_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden and falls short. It doesn't disclose that C expressions can call functions and thus have side effects on the target, doesn't state the connection/prerequisite requirement explicitly, and says nothing about the return value or error behavior.

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?

A single front-loaded sentence with no wasted words; the verb and scope come first. It is lean, though the terseness is partly under-specification rather than achieved precision.

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

Completeness2/5

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

The tool is simple (one parameter), but with no annotations and no output schema, the description should explain the prerequisite of an active GDB session and the side-effect/return behavior of expression evaluation. Neither is covered, leaving key operational details to inference.

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 0%, so the description must compensate for the single 'expression' parameter. It does add real meaning by specifying the language (C) and that a bare symbol name is acceptable in addition to an expression, but it gives no examples or formatting guidance.

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?

States a specific verb and resource: 'Evaluate a C expression or symbol', scoped to 'the current GDB context'. An agent can tell this is an expression-evaluation tool rather than a raw command executor, though it doesn't explicitly name how it differs from execute_gdb_command or get_gdb_info.

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?

'In the current GDB context' implies a debug session must already be connected, which is useful implied guidance. However, there is no explicit when-to-use versus execute_gdb_command or get_gdb_info, and no statement of when this tool is not appropriate.

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