Skip to main content
Glama

debug_get_scopes

Retrieve variable scopes (locals, globals) for a stack frame in a debug session. Use session and frame IDs to inspect scope contents.

Instructions

Get variable scopes for a stack frame (locals, globals, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frame_idYesStack frame ID
session_idYesDebug session ID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It communicates that the operation is read-only ('Get'), but it does not disclose whether the debug session must be paused, whether the returned scopes include variable values, or what happens for invalid frame/session IDs. This is minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It states the action, target resource, and examples in a concise and scannable way.

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 and the two parameters are fully schema-covered, but there is no output schema and no annotations, so the description should clarify enough of the result shape and workflow. It partially does by listing 'locals, globals, etc.,' but it omits the relationship to sibling tools and session-state requirements. Adequate for a minimal invocation, with clear gaps.

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 the schema already documents frame_id and session_id. The description adds only that the target is a stack frame, which is already implied by the parameter names. No additional parameter-specific meaning or format details are provided beyond the schema.

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 states a specific verb and resource: 'Get variable scopes for a stack frame,' with examples like 'locals, globals, etc.' It is clearly distinct from sibling tools such as debug_get_variables because it concerns scopes rather than variables, but it does not explicitly differentiate itself from that sibling.

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?

The description does not explain when to use this tool versus debug_get_variables, debug_get_stack_trace, or other siblings. It implies a stack-frame context but provides no workflow guidance, such as 'call after debug_get_stack_trace' or 'use debug_get_variables to inspect values within a scope.'

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

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/ztripez/mcp-dap'

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