Skip to main content
Glama
StrawHatAI

Claude Desktop Commander MCP

by StrawHatAI

list_processes

View running processes on your computer to monitor system resources, identify active applications, and manage performance by checking PID, command names, CPU usage, and memory usage.

Instructions

List all running processes. Returns process information including PID, command name, CPU usage, and memory usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The listProcesses function implements the core logic for listing running processes using platform-specific commands ('ps aux' on Unix, 'tasklist' on Windows), parses the output, and returns formatted text content.
    export async function listProcesses(): Promise<{content: Array<{type: string, text: string}>}> {
      const command = os.platform() === 'win32' ? 'tasklist' : 'ps aux';
      try {
        const { stdout } = await execAsync(command);
        const processes = stdout.split('\n')
          .slice(1)
          .filter(Boolean)
          .map(line => {
            const parts = line.split(/\s+/);
            return {
              pid: parseInt(parts[1]),
              command: parts[parts.length - 1],
              cpu: parts[2],
              memory: parts[3],
            } as ProcessInfo;
          });
    
        return {
          content: [{
            type: "text",
            text: processes.map(p =>
              `PID: ${p.pid}, Command: ${p.command}, CPU: ${p.cpu}, Memory: ${p.memory}`
            ).join('\n')
          }],
        };
      } catch (error) {
        throw new Error('Failed to list processes');
      }
    }
  • src/server.ts:84-94 (registration)
    Tool registration descriptor in the ListToolsRequestHandler, specifying the tool name, description, and empty input schema (no arguments required).
    {
      name: "list_processes",
      description:
        "List all running processes. Returns process information including PID, " +
        "command name, CPU usage, and memory usage.",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • src/server.ts:230-231 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that invokes the listProcesses handler when the tool is called.
    case "list_processes":
      return listProcesses();
Behavior3/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 tool returns process information (PID, command name, CPU usage, memory usage), which is useful behavioral context. However, it doesn't mention potential limitations like refresh rate, system impact, or permission requirements.

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 with zero waste: the first states the action and scope, the second specifies the return format. It's appropriately sized and front-loaded with essential information.

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?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is reasonably complete. It explains what the tool does and what information it returns. For a read-only listing tool, this covers the essentials, though adding context about system-specific behavior could improve it.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the inputs. The description appropriately doesn't add parameter details, maintaining focus on the tool's purpose and output.

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 verb ('List') and resource ('all running processes'), specifying what the tool does. It distinguishes from siblings like kill_process or force_terminate by focusing on listing rather than modifying processes.

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

Usage Guidelines3/5

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

The description implies usage for viewing running processes but doesn't explicitly state when to use this tool versus alternatives like list_sessions or list_directory. No guidance on prerequisites or exclusions is provided.

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/StrawHatAI/claude-dev-tools'

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