Skip to main content
Glama
MrGNSS

Desktop Commander MCP

list_processes

View all active processes on your computer with detailed information including PID, command name, CPU usage, and memory usage for system monitoring and management.

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 handler function that lists processes using platform-specific commands (tasklist on Windows, ps aux on Unix), parses PID, command, CPU, and memory, and returns formatted text output.
    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)
    Registration of the list_processes tool in the ListTools response, including name, description, and empty input schema indicating no parameters are 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 logic in the CallToolRequest handler that invokes the listProcesses function when the tool is called.
    case "list_processes":
      return listProcesses();
Behavior2/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. It mentions the return data (PID, command name, CPU usage, memory usage) but lacks details on behavioral traits such as permissions required, rate limits, real-time vs. cached data, or error conditions. This is a significant gap for a tool that interacts with 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that are front-loaded and waste-free. The first sentence states the action and resource, and the second adds valuable output details, with every word earning its place.

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 complexity (system process listing) and lack of annotations or output schema, the description is moderately complete. It covers the purpose and output format but misses behavioral context like safety, permissions, or limitations, which are crucial for such an operation.

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, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately does not discuss parameters, making it efficient and focused 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 exactly what the tool does. It distinguishes itself from siblings like 'kill_process' or 'force_terminate' by focusing on retrieval rather than modification or termination.

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 monitoring or inspecting system processes but does not explicitly state when to use this tool versus alternatives like 'list_sessions' or 'list_directory'. No guidance is provided on prerequisites or exclusions, leaving usage context to inference.

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/MrGNSS/ClaudeDesktopCommander'

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