Skip to main content
Glama

network/connections

List TCP and UDP sockets with owning processes. Filter by port or state to identify which process is using a connection or listening port. Read from /proc/net, no ss required.

Instructions

Lists TCP and UDP sockets in every state with their owning processes, like ss -tuanp - read natively from /proc/net (no ss needed). Owning processes of other users' sockets are shown only with privileged: true. state filters by LISTEN (includes unconnected UDP), ESTABLISHED, TIME_WAIT, ... or the groups connected/synchronized. Hint: For physical network links and IPs, use the network://interfaces resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoFilter by port
stateNoFilter by TCP state, case-insensitive (LISTEN/listening, ESTABLISHED, TIME_WAIT, CLOSE_WAIT, SYN_SENT, ...). Omit to list all sockets - active connections and listening ports.
privilegedNoRun as root to see PIDs of other users
output_formatNoDesired output format (e.g. json, yaml, table, wide). Defaults to text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description bears the full burden of behavioral disclosure. It reveals the data source ('read natively from /proc/net (no ss needed)'), the privilege requirement ('shown only with privileged: true'), and subtle state semantics ('LISTEN includes unconnected UDP'). It stops short of describing output formatting or error behavior, but covers the essential operational traits.

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?

The description is compact and front-loaded: purpose first, then implementation details, privilege caveat, state semantics, and a routing hint. Each sentence adds useful information. It loses one point for slight redundancy with the schema's state examples, but there is no filler.

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?

For a 4-parameter tool with no output schema and no annotations, the description supplies the key invocation context: what is listed, how it is read, when privileges are required, and how state filtering behaves. The only meaningful omission is a concrete description of the return shape, but the agent has enough to select and call the tool correctly.

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?

Schema coverage is 100%, so the baseline is 3. The description adds genuine meaning beyond the schema: it explains state groups ('connected/synchronized'), the LISTEN/UDP nuance, and the privileged behavior. Those details elevate parameter understanding without repeating the schema's own descriptions.

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 names a specific resource ('TCP and UDP sockets') and a specific action ('Lists') with scope ('in every state with their owning processes'), and anchors it with the familiar `ss -tuanp` analog. The closing hint about physical links routes to network://interfaces, distinguishing it from related network tools.

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?

The description makes the primary use case explicit: listing TCP/UDP sockets and their owning processes. It also provides a when-not and an alternative: 'For physical network links and IPs, use the network://interfaces resource.' State-group guidance ('connected/synchronized') further tells the agent how to tailor invocations.

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