Skip to main content
Glama

list_ports

Read-onlyIdempotent

Lists TCP/UDP sockets and owning processes to identify which application uses 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.2.1

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description contributes one thing annotations cannot: that elevated privileges may be required to resolve PIDs owned by other users, which explains partial results. It says nothing about volume of output, ordering, or error behavior under insufficient rights.

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?

Two short sentences with the core action front-loaded and the caveat second; nothing is padded. It is efficient but so terse that the second sentence carries disproportionate weight for correct invocation.

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-shape explanation is not required, and annotations cover the safety profile. However, with two undocumented parameters, a non-obvious default (listening_only=true) and an unenumerated protocol field, the definition leaves real gaps for a correct first call.

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% and neither of the two parameters is mentioned. Critically, "protocol" has no enum or explanation of accepted values (tcp/udp/all) and "listening_only" defaults to true, which materially narrows what "list sockets" returns — an agent reading only the description would assume a full socket dump.

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?

Uses a specific verb+resource ("List TCP/UDP sockets") and adds the distinguishing payload ("with owning process"), which separates it from network_interfaces, check_tcp_port, and list_processes. It does not explicitly name those siblings, so it stops short of a 5.

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 only usage context is the permission caveat about elevated rights for other users' PIDs. There is no statement of when to prefer this over check_tcp_port (single-port probe) or network_interfaces (interface config), and no note that the default listening_only=true means non-listening sockets are excluded unless changed.

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