interceptor_kill
Terminate a spawned process by target ID and retrieve its final stdout/stderr output in the proxy-mcp server for network traffic interception.
Instructions
Kill a spawned process by target ID. Also retrieves final stdout/stderr output.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_id | Yes | Target ID from interceptor_spawn |
Implementation Reference
- src/tools/interceptors.ts:491-511 (handler)The handler implementation for the 'interceptor_kill' MCP tool, which retrieves process output from the terminal interceptor and then deactivates the process.
async ({ target_id }) => { try { // Get output before killing const terminal = interceptorManager.get("terminal") as TerminalInterceptor | undefined; const output = terminal?.getProcessOutput(target_id); await interceptorManager.deactivate("terminal", target_id); return { content: [{ type: "text", text: JSON.stringify({ status: "success", message: `Process ${target_id} killed.`, output: output ? { stdout: output.stdout.slice(-2048), stderr: output.stderr.slice(-2048), exitCode: output.exitCode, } : null, }), }], }; - src/tools/interceptors.ts:485-490 (registration)The registration of the 'interceptor_kill' tool in the MCP server instance within src/tools/interceptors.ts.
server.tool( "interceptor_kill", "Kill a spawned process by target ID. Also retrieves final stdout/stderr output.", { target_id: z.string().describe("Target ID from interceptor_spawn"), },