Skip to main content
Glama

list_ports

Lists TCP/UDP sockets and owning processes so you can identify which application is using a port; elevated rights may be required to see other users' PIDs.

Instructions

List TCP/UDP sockets with owning process. May need elevated rights to see other users' PIDs.

Input Schema

NameRequiredDescriptionDefault
protocolNoall
listening_onlyNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuinely useful behavioural trait: that elevated rights may be needed to see other users' PIDs. It does not say whether the tool is read-only (implied), whether results are truncated or paginated on busy hosts, or what happens when privileges are insufficient.

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, no filler, with the core capability front-loaded and the caveat second. Every clause earns its place.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the elevation caveat covers the main operational surprise. But for a 2-parameter tool with zero schema coverage, leaving listening_only's default and protocol's accepted values undocumented is a real gap an agent could trip over.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate and does not. 'TCP/UDP' hints at the protocol parameter but never states accepted values (the schema declares only a bare string defaulting to 'all'), and listening_only is never mentioned at all despite defaulting to true — a non-obvious default that materially changes the result set.

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 and resource: 'List TCP/UDP sockets with owning process.' An agent can tell this apart from list_processes and network_interfaces by the socket-plus-PID framing, though it never explicitly names those near-neighbours.

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?

No guidance on when to choose this over check_tcp_port, list_processes, or network_interfaces, and no mention of prerequisites beyond a passing note about elevation. The agent must infer the selection criteria from the sibling names alone.

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