stop
Terminate PHP debugging sessions immediately to stop script execution when debugging is complete or issues are identified.
Instructions
Stop the debug session and terminate script execution immediately
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | Session ID |
Implementation Reference
- src/tools/execution.ts:240-288 (handler)Full implementation of the 'stop' MCP tool, including registration, input schema, and handler logic that stops the active or specified debug session by calling session.stop().server.tool( 'stop', 'Stop the debug session and terminate script execution immediately', { session_id: z.string().optional().describe('Session ID'), }, async ({ session_id }) => { const session = sessionManager.resolveSession(session_id); if (!session) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'No active debug session' }), }, ], }; } try { await session.stop(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Debug session stopped', }), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ error: 'Stop failed', message: error instanceof Error ? error.message : String(error), }), }, ], }; } } );