Skip to main content
Glama

list_connections

Read-onlyIdempotent

Lists TCP connections and UDP endpoints with owning program, remote address/name, ports, and TCP state; filter by process or text and optionally trace per-connection traffic.

Instructions

Every TCP connection and UDP endpoint with its program, the other end's address and name (from what programs looked up, else reverse DNS), ports and TCP state. With trace_seconds > 0, also each connection's traffic. Filter by process or by text.

Input Schema

NameRequiredDescriptionDefault
pidNoOnly this process' connections.
limitNoAt most this many (default 200, at most 2000).
filterNoOnly connections whose program, remote address or remote name contains this (any case).
trace_secondsNoSeconds to trace first (0 to 30, default 0): adds how much each connection sends and receives. Needs "Turn kernel traces on".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent operation, so the bar is lower. The description adds valuable context about how remote names are resolved (program lookups else reverse DNS) and that trace_seconds > 0 includes per-connection traffic, beyond what annotations provide.

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 three compact sentences with the primary scope front-loaded, followed by the trace enhancement and filtering capability. No unnecessary wording is present.

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?

With no output schema, the description usefully explains what data is returned (program, remote address/name, ports, TCP state, optional traffic). It is nearly complete, though it could clarify whether listening TCP ports are included, given the separate list_listening_ports sibling.

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 coverage is 100%, so the schema already documents all four parameters in detail. The description adds marginal meaning for the filter and trace_seconds parameters but does not mention pid or limit, leaving the schema to do the heavy lifting.

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?

The description states a specific scope: every TCP connection and UDP endpoint with program, remote address/name, ports, and TCP state, plus optional traffic details. It does not explicitly distinguish this tool from siblings like list_listening_ports or get_network_usage, leaving some potential overlap ambiguous.

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

Usage Guidelines3/5

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

The description implies usage by specifying filtering by process or text and the trace option, but it gives no explicit when-to-use guidance or exclusions relative to sibling tools such as list_listening_ports or close_connection.

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