Skip to main content
Glama
qckfx

Node.js Debugger MCP Server

by qckfx

kill_process

Terminate a running Node.js process by specifying its Process ID to manage debugging sessions and free system resources.

Instructions

Kill a managed Node.js process

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesProcess ID to kill

Implementation Reference

  • The handler function that executes the kill_process tool logic. It retrieves the managed process by PID, sends a SIGTERM signal to kill it, removes it from the managed processes map, and returns appropriate success or error messages.
    private async killProcess(args: { pid: number }) {
      const managedProcess = this.managedProcesses.get(args.pid);
      
      if (!managedProcess) {
        return {
          content: [
            {
              type: "text",
              text: `Process ${args.pid} not found in managed processes`,
            },
          ],
          isError: true,
        };
      }
    
      try {
        managedProcess.process.kill("SIGTERM");
        this.managedProcesses.delete(args.pid);
        
        return {
          content: [
            {
              type: "text",
              text: `Killed process ${args.pid}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error killing process: ${error}`,
            },
          ],
          isError: true,
        };
      }
  • The tool schema definition in ListToolsRequestHandler, defining the input schema with a required 'pid' number parameter and description.
    {
      name: "kill_process",
      description: "Kill a managed Node.js process",
      inputSchema: {
        type: "object",
        properties: {
          pid: { type: "number", description: "Process ID to kill" }
        },
        required: ["pid"],
      },
    },
  • src/index.ts:247-248 (registration)
    The dispatch/registration in the CallToolRequestHandler switch statement that routes 'kill_process' calls to the killProcess handler method.
    case "kill_process":
      return await this.killProcess(args as { pid: number });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Kill' implies a destructive, irreversible action, but the description doesn't clarify permissions needed, whether it's synchronous/asynchronous, error handling (e.g., if PID doesn't exist), or side effects (e.g., process termination signals). This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (destructive action with no annotations) and lack of output schema, the description is incomplete. It doesn't explain return values (e.g., success/failure indicators), error conditions, or behavioral nuances. For a kill operation, this leaves significant gaps in understanding how to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'pid' clearly documented in the schema. The description doesn't add any meaning beyond this (e.g., format constraints, valid PID ranges, or examples). Baseline 3 is appropriate since the schema does the heavy lifting, but no extra value is provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('kill') and target ('a managed Node.js process'), providing specific verb+resource. However, it doesn't distinguish this from sibling tools like 'pause_execution' or 'list_processes' in terms of finality or process lifecycle management, which would be helpful for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'pause_execution' or 'attach_debugger'. It doesn't mention prerequisites (e.g., needing a running process), consequences of killing versus pausing, or any exclusions (e.g., cannot kill system processes). This leaves the agent without contextual decision-making help.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/qckfx/node-debugger-mcp'

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