Skip to main content
Glama

inspect_port

Identify the process, PID, and command line binding a TCP port across Windows, macOS, and Linux to diagnose EADDRINUSE conflicts.

Instructions

Finds which process PID, process name, and command line is binding a specified TCP port across Windows, macOS, and Linux. Essential for diagnosing EADDRINUSE conflicts.

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": "inspect_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesThe TCP port number to inspect (e.g. 3000, 5173, 8080)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations exist, so the description must carry the full behavioral load. It usefully discloses cross-platform support (Windows, macOS, Linux) and that it is a read/inspection operation, but omits permission requirements (listing command lines often needs elevation), behavior when no process binds the port, and any output shape.

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?

Two sentences with zero filler: the capability and the returned fields come first, followed by the practical use case. Nothing is redundant or buried.

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

Completeness4/5

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

For a one-parameter inspection tool with no output schema, the description covers purpose, return fields, platform scope, and motivation. Minor gap: no mention of what happens when the port is free or what errors/permission issues look like.

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% and the schema already documents the single port parameter with examples (3000, 5173, 8080) and a 1-65535 range. The description's 'specified TCP port' adds essentially nothing beyond the schema, so the baseline 3 applies.

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?

States a specific verb ('Finds') and resource ('which process ... is binding a specified TCP port') and even enumerates the returned fields (PID, name, command line). This implicitly contrasts with the mutating sibling kill_port_process, but never names it, so the differentiation is inferential rather than explicit.

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

Usage Guidelines4/5

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

Provides a concrete triggering scenario ('Essential for diagnosing EADDRINUSE conflicts'), which tells an agent when to reach for this tool. It stops short of naming alternatives or stating exclusions (e.g., that it does not kill the process).

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