Skip to main content
Glama

get_network_connections

Inspect active TCP/UDP connections with state, addresses, and process info. Filter by type or status, group by PID, and optionally resolve hostnames via reverse DNS.

Instructions

Returns active TCP/UDP connections with state, addresses, process info, and optional reverse-DNS hostnames. Read-only from /proc/net. Params: status and type filters, grouped by PID, max_connections (0-200). resolve_hostnames does network lookups and is slow - keep it off unless needed. For listening sockets prefer get_listening_ports, which also gives process names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNooptional type filter: tcp, udp
statusNooptional status filter (e.g. ESTABLISHED, LISTEN, TIME_WAIT)
groupedNooptional: group connections by PID (default: false)
max_connectionsNooptional: limit results (max: 200)
resolve_hostnamesNooptional: resolve remote hostnames via reverse DNS (default: false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
groupsNo
connectionsYes
Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It discloses the read-only nature via '/proc/net' and the performance cost of reverse DNS lookups, which is valuable behavioral context. However, it does not mention any permission requirements or edge cases, leaving some room for additional detail.

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?

Two sentences, tightly packed with essential information: purpose, data source, parameter highlights, performance caveat, and an alternative tool reference. Every sentence earns its place with no 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 the tool's moderate complexity, the description covers the core function, source, performance implications, alternates, and all parameters are documented in the schema. The output schema exists, so return format need not be detailed. This is a complete and well-rounded description.

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%, but the description adds meaningful context beyond the schema by summarizing filters, grouping, and max_connections range (0-200), and by highlighting that resolve_hostnames performs slow network lookups. This enriches parameter understanding beyond the raw schema.

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 tool returns active TCP/UDP connections with state, addresses, process info, and optional reverse-DNS hostnames. It explicitly differentiates from the sibling get_listening_ports by advising its use for listening sockets, making the purpose distinct.

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?

Provides explicit guidance: 'For listening sockets prefer get_listening_ports' and warns that resolve_hostnames is slow and should be kept off unless needed. This gives clear context on when to use this tool versus an alternative and how to use parameters safely.

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/Mohabdo21/linux-mcp'

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