Skip to main content
Glama

Kill Process on TCP Port

kill_port

Terminates the process listening on a local TCP port to free it for reuse. Use it to resolve stuck or conflicting ports during Windows development.

Instructions

Terminate the process listening on a given local TCP port.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "port": "<port>"
    },
    "name": "kill_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesTCP port number to free.
forceNoForce-kill immediately instead of graceful terminate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only says it terminates a process. It omits that this is destructive and irreversible, whether elevated permissions are needed, what happens when nothing listens on the port, and what is returned on success or failure. Only the schema's 'graceful terminate' vs 'force-kill' phrase hints at behavior, and that is structured-field content, not description content.

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

Conciseness4/5

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

A single front-loaded sentence with no filler, which is efficient. It is arguably too terse for a destructive operation rather than padded, so brevity is not the failure mode here.

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?

For a process-killing tool with no annotations and no output schema, the definition should disclose permission needs, irreversibility, and failure behavior. None of these appear, leaving an agent under-informed before invoking a destructive operation.

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 both the port and force parameters documented in the schema, so the baseline of 3 applies. The description adds only the qualifier 'local' and does not elaborate on port ranges, binding-vs-listening semantics, or force behavior beyond what the schema already states.

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?

"Terminate the process listening on a given local TCP port" pairs a specific verb (terminate) with a specific resource (process on a local TCP port), which is clearly distinguishable from siblings like list_ports or inspect_path. It does not explicitly name an alternative, but the action and scope are unambiguous.

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 gives no when-to-use or when-not-to-use guidance, no prerequisite such as first confirming the listener exists (e.g., via list_ports), and no mention of when to prefer a graceful stop over a forced kill. Usage must be inferred entirely from the tool name and purpose.

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