Skip to main content
Glama

get_state

Read-onlyIdempotent

Inspects the current debug session state: returns stack traces, scopes, and variables when stopped, or status and buffered output while running.

Instructions

Get the current state of a debug session. If stopped, returns full stack/scopes/variables. If running, returns status and buffered output.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoStack trace depth (default: 10)
detailNo'full' (default) or 'compact' (frame-local scopes only, slimmer JSON)
scopesNoScope names to fetch, e.g. ['Registers']. Default: every scope except CPU registers; skipped ones are listed in omittedScopes
timeoutNoIf running, wait up to this many milliseconds for the program to stop (default: 0 = don't wait)
threadIdNoThread ID (uses stopped thread if omitted)
sessionIdNoSession ID (omit if only one session is active)
variableDepthNoVariable expansion depth (default: 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.19

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavioral context: the return payload differs by run state, and running sessions return status plus buffered output. It stops short of describing failure modes (no active session, bad sessionId) or payload size expectations.

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?

Two sentences, front-loaded with the core action and followed immediately by the state-conditional return contract. No filler, no restatement of the tool name.

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

Completeness4/5

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

With seven optional parameters, no required fields, and no output schema, the description sensibly spends its budget explaining the return shape. It is largely sufficient, though it could mention the single-session default and what happens when no session is active.

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 every parameter already carries its own documentation including defaults and the scopes/omittedScopes behavior. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies.

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 ('Get the current state of a debug session') and further splits the outcome by stopped/running, so the agent knows exactly what it retrieves. It does not name or distinguish itself from near-siblings such as debug_inspect or get_output, which keeps it short of 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 Guidelines3/5

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

Usage is implied rather than prescribed: an agent can infer this is the entry point for checking a session and that 'timeout' lets it wait for a stop. There is no explicit when-to-use/when-not guidance and no pointer to alternatives like get_output for pure output retrieval.

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