Skip to main content
Glama

rr_evaluate

Evaluates one C/C++ expression in the current frame during rr debugging, returning its value without running a GDB console command.

Instructions

Evaluate one C/C++ expression in the current frame; does not run a GDB console command.

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

Input Schema

NameRequiredDescriptionDefault
expressionYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it only discloses one boundary ('does not run a GDB console command'). It says nothing about whether evaluating an expression can invoke functions or otherwise mutate the debuggee, what happens if the session is not stopped or has no frame, or how failures are reported. For an evaluator in a debugger, side-effect behavior is the key missing disclosure.

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 filler; the verb and resource come first and the constraint follows. Its brevity is efficient, though it borders on under-specification rather than being purely economical.

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 is simple (two params, no output schema, no nesting), and the description covers the core action and its frame scoping. It is nonetheless incomplete on the return value (what the evaluation result looks like) and on side effects and error conditions, which the absent annotations do not cover.

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 schema alone does not explain either parameter. The description partially compensates by constraining 'expression' to one C/C++ expression and scoping evaluation to 'the current frame', but it never explains what session_id denotes (a live rr replay/record session) or what a missing frame implies.

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?

Names a specific verb (evaluate) and resource (one C/C++ expression in the current frame), plus an explicit negative boundary ('does not run a GDB console command') that separates it from generic command-execution behavior. It is clear what the tool does, though it never names an actual sibling as an alternative.

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 'in the current frame' implies the tool is only meaningful when stopped in a live frame within a session, and the negative clause hints that console-command execution belongs elsewhere. However, no sibling tool is named and no explicit 'use this when / not when' routing is given.

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