Skip to main content
Glama
wonderwhy-er

Claude Desktop Commander MCP

list_processes

View all active processes and their details, including PID, command name, CPU usage, and memory usage, to monitor and manage system resources effectively.

Instructions

                    List all running processes.
                    
                    Returns process information including PID, command name, CPU usage, and memory usage.
                    
                    This command can be referenced as "DC: ..." or "use Desktop Commander to ..." in your instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the list_processes tool. Executes platform-specific command ('tasklist' on Windows, 'ps aux' on Unix) to list processes, parses output to extract PID, command, CPU, and memory, and returns formatted text output.
    export async function listProcesses(): Promise<ServerResult> {
      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) {
        return {
          content: [{ type: "text", text: `Error: Failed to list processes: ${error instanceof Error ? error.message : String(error)}` }],
          isError: true,
        };
      }
    }
  • Dispatcher in CallToolRequest handler that routes 'list_processes' tool calls to the handleListProcesses function.
    case "list_processes":
        result = await handlers.handleListProcesses();
        break;
  • src/server.ts:904-916 (registration)
    Tool definition registered in ListToolsRequest handler, including name, description, input schema (referencing ListProcessesArgsSchema), and annotations.
        name: "list_processes",
        description: `
                List all running processes.
                
                Returns process information including PID, command name, CPU usage, and memory usage.
                
                ${CMD_PREFIX_DESCRIPTION}`,
        inputSchema: zodToJsonSchema(ListProcessesArgsSchema),
        annotations: {
            title: "List Running Processes",
            readOnlyHint: true,
        },
    },
  • Handler wrapper function that directly delegates to the core listProcesses implementation.
    export async function handleListProcesses(): Promise<ServerResult> {
        return listProcesses();
    }
  • Zod schema defining empty input arguments for list_processes tool (no parameters required).
    export const ListProcessesArgsSchema = z.object({});
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the return format (process information including PID, command name, CPU usage, and memory usage), which is helpful. However, it lacks details on potential limitations such as performance impact, real-time vs. cached data, or system-specific variations, which are important for a tool that lists system processes.

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 front-loaded with the core functionality in the first sentence, followed by return details and a contextual note. The sentences are relevant, but the third sentence about referencing 'DC' or 'Desktop Commander' is somewhat extraneous and could be omitted without losing clarity, slightly reducing efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 (listing system processes) and lack of annotations or output schema, the description provides basic return information but misses behavioral context like error handling, permissions required, or data freshness. It is adequate for a simple list operation but could be more complete for a system-level tool.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, which is efficient. A baseline of 4 is applied since there are no parameters to document, and the description does not add unnecessary information.

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 the resource 'all running processes', which is specific and unambiguous. It distinguishes itself from sibling tools like 'interact_with_process', 'kill_process', and 'read_process_output' by focusing solely on listing rather than modifying or interacting with processes.

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 implies usage context by specifying 'all running processes', which suggests it should be used when a comprehensive overview is needed. However, it does not explicitly state when to use this tool versus alternatives like 'get_usage_stats' or 'list_sessions', nor does it provide exclusions or prerequisites for usage.

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

Related 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/wonderwhy-er/DesktopCommanderMCP'

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