Skip to main content
Glama

debug_scopes

Retrieve debugger scopes and variablesReference handles for a stack frame so coding agents can inspect local variables during a paused debugging session.

Instructions

Return debugger scopes for a stack frame, including variablesReference handles.

Input Schema

NameRequiredDescriptionDefault
frameIdYes
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It does add real value by revealing that the response contains variablesReference handles, which tells the agent this is a read-side enumeration feeding debug_variables. However it says nothing about read-only safety, behavior on a stale or invalid frameId, or whether sessionId must be an active session.

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 the verb, resource, scope, and payload all present; no filler or repetition. It is efficient, though the terseness leaves no room for the usage or parameter detail the tool needs.

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?

For a 2-parameter read tool with no output schema and no annotations, the description is only partially sufficient. It covers what is returned but omits the sessionId concept, the prerequisite frameId source, and the handoff to debug_variables, leaving meaningful gaps an agent must guess at.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both required parameters. The description implies frameId is a stack-frame identifier, but adds no format, origin, or validity guidance, and completely ignores sessionId (whether it is a debug session handle, how to obtain it, or whether it must be active). Well below the point where the schema could compensate.

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 ('Return debugger scopes for a stack frame'), which is clearly distinct from debug_stack (frames) and debug_variables (variable values). It also names the key output artifact, variablesReference handles, giving an agent a concrete reason to call it. It stops short of explicitly contrasting itself with siblings, so not a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus debug_variables or debug_stack, and no mention that frameId must come from a prior debug_stack call. The only usable hint is implicit: scopes are per-frame and yield variablesReference handles. An agent must infer the workflow entirely.

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