| 72 | console.log(JSON.stringify({ event: 'mcp.tool_call', tool, params }, null, 2)); |
| 73 | } |
| 74 | function mcpLogResult(tool: string, payloadObj: unknown) { |
| 75 | if (!debug) return; |
| 76 | const response = { content: [ |
| 77 | { type: 'text', text: JSON.stringify(payloadObj, null, 2) }, |
| 78 | { type: 'json', json: payloadObj } |
| 79 | ] }; |
| 80 | console.log(JSON.stringify({ event: 'mcp.tool_result', tool, response }, null, 2)); |
| 81 | } |
| 82 | |
| 83 | test('debugger hits breakpoint', { timeout: 30000 }, async () => { |
| 84 | const { proc, port } = await startDebuggedProcess(); |