Skip to main content
Glama

get_open_ports

List all TCP and UDP ports currently listening on a machine, optionally filtering results by process name to identify which local services are active.

Instructions

List all TCP/UDP ports currently listening on this machine

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_open_ports"
  }
}

Input Schema

NameRequiredDescriptionDefault
filter_processNoFilter by process name (case-insensitive substring match)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. "List" implies a read-only snapshot and "currently listening" plus "on this machine" establish scope and point-in-time semantics, but it says nothing about output format, whether privileged access is needed, or whether the results include owning processes.

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?

A single front-loaded sentence with no filler; every word constrains the resource or scope. Nothing is redundant or buried.

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?

For a one-optional-parameter read tool with a fully documented schema and no output schema, coverage is nearly sufficient. However, the absence of any behavioral notes for a zero-annotation tool leaves gaps around results shape and privilege requirements.

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 filter_process is fully documented in the schema with its case-insensitive substring matching behavior. The description adds nothing about the filter, 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?

Uses a specific verb ("List") plus a well-defined resource ("TCP/UDP ports currently listening on this machine"), which is clearly distinct from siblings like get_running_processes or get_docker_state. It does not explicitly name an alternative, so it stops short of full sibling differentiation.

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 use this versus get_running_processes or check_service_health, and no exclusions or prerequisites. The intended use (inspect listening ports on the local host) is only implied by the resource phrase.

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