Skip to main content
Glama

get_process_fds

List open file descriptors (files, sockets, pipes) for a process ID using /proc, showing total count. Use to diagnose fd leaks and resource holds by reading real-time process data.

Instructions

Lists open file descriptors (files, sockets, pipes) and the total count for a pid. Read-only via /proc//fd. pid is required; an unknown pid returns an error in the errors field, not a failure. Use for fd-leak and resource-hold debugging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesprocess ID to list open file descriptors for

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYes
nameYes
errorsNo
fd_countYes
file_descriptorsYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the operation is read-only via /proc/<pid>/fd, and it states that an unknown pid returns an error in the errors field rather than a failure. This is meaningful behavioral context beyond the schema, though it does not cover permission-related edge cases.

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 two sentences, front-loaded with the primary function, followed by a specific use case. Every sentence contributes meaningful information, with no redundant or filler wording.

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?

For a one-parameter read-only tool with an output schema, the description covers the what, how, error behavior, and recommended use case. It is complete enough for an agent to select and invoke the tool correctly without needing additional context.

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 the pid parameter already has a clear description ('process ID to list open file descriptors for'). The tool description reinforces that pid is required but adds no additional parameter-level semantics. Baseline 3 is appropriate.

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 states 'Lists open file descriptors (files, sockets, pipes) and the total count for a pid,' which is a specific verb+resource. It clearly distinguishes from sibling tools like get_file_locks or get_network_connections by enumerating the exact resource types covered and including the count.

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

Usage Guidelines4/5

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

The description explicitly says 'Use for fd-leak and resource-hold debugging,' providing a clear when-to-use context. It does not name alternative tools, but the tool's purpose is sufficiently unique among siblings that explicit exclusions are less necessary.

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