Skip to main content
Glama

get_open_ports

List all listening TCP and UDP ports with the owning process to diagnose port conflicts and verify running services.

Instructions

List all listening TCP/UDP ports with the process that owns each one.

Use this to check what services are running and which ports are in use. Helpful for debugging "port already in use" errors or checking if a server is actually listening. For general network interface info, use get_network_info instead.

This is a read-only operation with no side effects.

Returns a Markdown table with columns: Proto, Local Address, Port, PID, Process. Only shows LISTEN (TCP) and bound (UDP) sockets. Connections requiring elevated privileges show "N/A" for PID and process name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description discloses that it is a read-only operation with no side effects, details the return format (Markdown table), and notes edge cases (only LISTEN/bound sockets, privileged connections show N/A).

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 concise with 5 sentences, front-loads the primary purpose, and every sentence serves a distinct purpose without redundancy.

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

Completeness5/5

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

Given no parameters, no output schema, and no annotations, the description fully compensates by explaining the operation, return format, use cases, and limitations.

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

Parameters4/5

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

There are no parameters, so the description cannot add value beyond what the schema provides. A baseline of 4 is appropriate as the description does not need to elaborate further.

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

Purpose5/5

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

The description clearly states the action ('List all listening TCP/UDP ports with the process that owns each one') and distinguishes the tool from the sibling 'get_network_info' by specifying the exact scope.

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

Usage Guidelines5/5

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

It explicitly states when to use this tool (check services, debug port conflicts) and when not to (use get_network_info for general interface info), providing clear contextual guidance.

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/dragogargo/mcp-sysmon'

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