Skip to content

Commit d10d760

Browse files
committed
Clarify that debug_wait_for_stop and debug_capture_at_breakpoint block
Make it explicit in tool descriptions and docs that these tools block until a breakpoint is hit or timeout expires, and that the caller must trigger a request externally while waiting.
1 parent 9247381 commit d10d760

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/mcp/tools/diagnostics.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Each breakpoint object:
7373

7474
### debug_wait_for_stop
7575

76-
Wait for a thread to halt at a breakpoint or step. Returns immediately if a thread is already halted.
76+
Wait for a thread to halt at a breakpoint or step. Returns immediately if a thread is already halted. Otherwise **blocks** until a halt occurs or the timeout expires — the user or an external process must trigger a request on the instance while this tool is waiting.
7777

7878
| Parameter | Type | Required | Default | Description |
7979
|-----------|------|----------|---------|-------------|
@@ -164,6 +164,8 @@ Evaluate an expression in the context of a halted thread and stack frame.
164164

165165
Set a breakpoint, wait for it to be hit, and capture a diagnostic snapshot — stack, variables, and optional expression results in a single call. Optionally resumes the thread after capture.
166166

167+
> **Important:** This tool **blocks** until the breakpoint is hit or the timeout expires. The user or an external process must trigger a request on the instance while this tool is waiting.
168+
167169
| Parameter | Type | Required | Default | Description |
168170
|-----------|------|----------|---------|-------------|
169171
| `session_id` | string | Yes | | Session ID |

packages/b2c-dx-mcp/src/tools/diagnostics/debug-capture-at-breakpoint.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ export function createDebugCaptureAtBreakpointTool(
6969
name: 'debug_capture_at_breakpoint',
7070
description:
7171
'Set a breakpoint, wait for it to be hit, and capture a diagnostic snapshot (stack, variables, expression results). ' +
72+
'IMPORTANT: This tool BLOCKS until the breakpoint is hit or the timeout expires — the user or an external process must trigger a request on the instance while this tool is waiting. ' +
7273
'Optionally resumes the thread after capture. ' +
73-
'This is a higher-level tool that combines debug_set_breakpoints, debug_wait_for_stop, debug_get_stack, debug_get_variables, and debug_evaluate.',
74+
'Combines debug_set_breakpoints, debug_wait_for_stop, debug_get_stack, debug_get_variables, and debug_evaluate in a single call.',
7475
toolsets: ['CARTRIDGES', 'SCAPI', 'STOREFRONTNEXT'],
7576
inputSchema: {
7677
session_id: z.string().describe('Session ID returned by debug_start_session.'),

packages/b2c-dx-mcp/src/tools/diagnostics/debug-wait-for-stop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function createDebugWaitForStopTool(
4141
description:
4242
'Wait for a thread to halt at a breakpoint or step. ' +
4343
'Returns immediately if a thread is already halted. ' +
44-
'Otherwise blocks until a halt occurs or the timeout expires.',
44+
'Otherwise BLOCKS until a halt occurs or the timeout expires — the user or an external process must trigger a request on the instance while this tool is waiting.',
4545
toolsets: ['CARTRIDGES', 'SCAPI', 'STOREFRONTNEXT'],
4646
inputSchema: {
4747
session_id: z.string().describe('Session ID returned by debug_start_session.'),

0 commit comments

Comments
 (0)