(tool: string, payloadObj: unknown)
| 14 | console.log(JSON.stringify({ event: 'mcp.tool_call', tool, params }, null, 2)); |
| 15 | } |
| 16 | function mcpResult(tool: string, payloadObj: unknown) { |
| 17 | if (!debug) return; |
| 18 | const response = { content: [ |
| 19 | { type: 'text', text: JSON.stringify(payloadObj, null, 2) }, |
| 20 | { type: 'json', json: payloadObj } |
| 21 | ] }; |
| 22 | console.log(JSON.stringify({ event: 'mcp.tool_result', tool, response }, null, 2)); |
| 23 | } |
| 24 | |
| 25 | async function startDebuggedProcess(file: string): Promise<{ proc: ChildProcess, port: number }>{ |
| 26 | const proc = spawn('node', ['--inspect-brk=0', file], { |
no outgoing calls
no test coverage detected