Skip to main content
Glama

evaluate

Inspect and test expressions in a stopped debug session to check variable values or run code in repl, watch, or hover contexts.

Instructions

Evaluate an expression in the context of a stopped debug session.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoEvaluation context (default: repl)
frameIdNoStack frame ID (uses topmost frame if omitted)
sessionIdNoSession ID (omit if only one session is active)
expressionYesExpression to evaluate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.19

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does add the important constraint that the session must be stopped. It does not disclose side-effect risk (arbitrary expressions may invoke functions and mutate program state), error behavior for invalid expressions, or whether the session is resumed/unchanged afterward.

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 scope qualifier is placed where it matters. It is arguably too terse rather than padded, so nothing needs trimming.

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?

There is no output schema, yet the description says nothing about what comes back — value, type, or a variables reference for expansion — which an agent needs to decide follow-up calls. For a 4-parameter evaluation tool with no annotations, the definition leaves meaningful gaps despite strong schema coverage.

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 100%, so expression, context, frameId, and sessionId are all documented in the schema, establishing a baseline of 3. The description adds no meaning beyond that — it does not explain what the repl/watch/hover contexts yield or how frameId affects resolution.

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?

Specific verb plus resource ("Evaluate an expression") with a clear scope qualifier ("in the context of a stopped debug session"). It does not distinguish itself from likely-overlapping siblings such as debug_inspect or debug_at, so an agent must still guess which evaluation/inspection entry point applies.

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 context of a stopped debug session" implicitly states a precondition (the session must be paused), which is genuinely useful routing information. However, there is no explicit when-to-use vs. when-not, and no mention of alternatives like debug_inspect for reading variables or debug_at for evaluating at a location.

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