get_process_fds
List open file descriptors (files, sockets, pipes) and total count for a process ID, using read-only /proc//fd. Identify fd leaks and resource holds.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pid": "<pid>"
},
"name": "get_process_fds"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | process ID to list open file descriptors for |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | ||
| name | Yes | ||
| errors | No | ||
| fd_count | Yes | ||
| file_descriptors | Yes |