Skip to main content
Glama

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
NameRequiredDescriptionDefault
target_idYesTarget ID from interceptor_spawn

Implementation Reference

  • 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,
            }),
          }],
        };
  • 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"),
      },
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yfe404/proxy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server