Skip to main content
Glama
hoyt-harness

ProcExecMCP

by hoyt-harness

list_processes

Retrieve running processes with optional name filtering and sorting by CPU or memory usage. Get details like PID, memory, and status for system monitoring.

Instructions

List running processes with optional filtering and sorting.

This tool retrieves information about running processes on the system, including PID, name, CPU usage, memory usage, command line, and status. Results can be filtered by name, sorted by various criteria, and limited to a maximum number of results.

Args: name_filter: Filter processes by name (case-insensitive substring match). If None, return all processes. sort_by: Sort processes by: cpu (descending), memory (descending), pid (ascending), or name (ascending). Default: cpu. limit: Maximum number of processes to return. Default: 100, max: 1000. ctx: MCP context for logging (optional)

Returns: ListProcessesOutput with process list, total count, truncation flag, and retrieval time

Raises: SanitizedError: If process iteration fails

Security: - Handles permission errors gracefully (skips inaccessible processes) - No sensitive system information leaked in errors - Command lines are included but may be empty if access denied - Zombie and terminated processes handled without errors

Performance: - Uses psutil.process_iter() for efficient iteration - oneshot() context for batch info retrieval per process - Target: <2s for process list retrieval

Examples: >>> result = await list_processes() >>> print(result.total_count, "processes found") 245 processes found

>>> result = await list_processes(
...     name_filter="python",
...     sort_by=ProcessSortBy.MEMORY,
...     limit=50
... )
>>> for proc in result.processes:
...     print(f"{proc.name}: {proc.memory_mb}MB")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sort_byNocpu
name_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
processesYesList of process information
truncatedYesWhether results were truncated due to limit
total_countYesTotal number of processes found (before limit applied)
retrieval_time_msYesTime taken to retrieve process information in milliseconds
Behavior5/5

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

With no annotations provided, the description carries full burden and excels: it discloses security handling (permission errors, no sensitive leaks), performance targets (<2s), error types (SanitizedError), and edge cases (zombie processes). It also describes the output structure, making agent behavior predictable.

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 well-structured with clear sections (Args, Returns, Raises, Security, Performance, Examples) and front-loads the key action. It is slightly lengthy but each section earns its place, providing necessary detail without 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?

Despite an output schema existing (context signal), the description still clarifies the return fields (ListProcessesOutput) and covers all aspects: purpose, parameters, errors, security, performance. Nothing obvious is missing for a process listing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, this document compensates fully. Each parameter is explained: name_filter (case-insensitive substring), sort_by (enum with direction), limit (max 1000, default 100). The description adds value beyond the schema's bare types and titles.

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 starts with 'List running processes with optional filtering and sorting,' which clearly identifies the verb (list) and resource (running processes). It distinguishes effectively from sibling tools like execute_command, search_file_contents, and kill_process, which have different purposes.

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?

While the description does not explicitly contrast with siblings, it provides clear context for when to use the tool, including detailed parameter usage and security/performance considerations. Siblings are sufficiently different that explicit exclusions are less critical.

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/hoyt-harness/ProcExecMCP'

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