Skip to main content
Glama

wait_for_stop

Block execution until the debug session pauses or terminates. Receive the precise reason and location of the stop to synchronize AI agent actions.

Instructions

Block until the session next pauses or ends, then say why and where. Call it after continue_execution (which does not wait) and whenever a tool answers pending:true, instead of polling list_debug_sessions. Answers at once when the session is already paused (state "paused" with lastStop — the same record list_debug_sessions shows — and the top frame as location) or already over (the terminal state, with exitCode when the debuggee reported one); note says when the answer is anchored on a thread other than the one the stop was reported on, or when no frame of the shown stack is program code. If neither happens within the timeout it answers state "running" with pending:true: nothing was cancelled, breakpoints and exception filters stay armed — call it again to keep waiting, or pause_execution to interrupt

Input Schema

NameRequiredDescriptionDefault
timeoutNoMax time (ms) to wait for the stop (default: 30000, max: 600000). Not a limit on the program — it keeps running under the debugger either way. Note: your MCP client may enforce its own overall request timeout; keep this below it and call again on pending:true
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.26.0

TDQS

A4.4/5.0
Behavior5/5

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

No annotations exist, and the description carries the full burden well: it explains immediate-return cases (already paused, already terminated with exitCode), the meaning of the 'note' field, and that a timeout returns state 'running' with pending:true while nothing is cancelled and breakpoints/exception filters stay armed. That is exactly the behavior an agent needs to reason about retry loops.

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

Conciseness3/5

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

The core purpose is front-loaded, but the body is a dense run-on paragraph with nested parentheticals (state, lastStop, note clauses) that is harder to parse than it needs to be. The information mostly earns its place, but the packing reduces scannability.

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 no output schema and no annotations, the description supplies the return-state vocabulary (paused/running/terminal, pending, note, exitCode, location) and the timeout contract. Only the sessionId parameter is left unexplained, which is a minor gap.

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 coverage is 50%: the timeout parameter is documented in the schema itself, and the description reinforces its meaning ('if neither happens within the timeout it answers state running with pending:true'). sessionId is undocumented in both places, though it is self-evident in a debug-session API. Adequate but not compensating for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and effect: 'Block until the session next pauses or ends, then say why and where.' This is clearly a blocking wait, distinguishable from continue_execution (which does not wait), pause_execution, and list_debug_sessions by name.

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

Usage Guidelines5/5

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

Explicit when-to-use: after continue_execution and whenever a tool answers pending:true. Explicit when-not: don't poll list_debug_sessions. Also names the alternative (pause_execution) for interrupting a still-running session.

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