Skip to main content
Glama

list_processes

List all running processes launched by the agent to monitor active tasks and manage system resources.

Instructions

List all running processes started by the agent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'list_processes' tool logic. It calls ProcessUtils.formatProcessList on the activeProcesses map and returns the formatted text.
    async listProcesses(): Promise<ToolResult> {
      const processText = ProcessUtils.formatProcessList(this.activeProcesses);
      
      return {
        content: [{
          type: 'text',
          text: processText,
        }],
      };
    }
  • Schema definition for the 'list_processes' tool. It has no required input properties.
    {
      name: 'list_processes',
      description: 'List all running processes started by the agent',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:245-246 (registration)
    The registration/dispatch point where the 'list_processes' case routes to processService.listProcesses().
    case 'list_processes':
      return await this.processService.listProcesses();
  • Helper utility that formats the process map into a human-readable JSON string for display.
    static formatProcessList(processMap: Map<string, ProcessInfo>): string {
      const processes: ProcessDisplay[] = Array.from(processMap.entries()).map(([name, info]) => ({
        name,
        command: info.command,
        port: info.port,
        pid: info.process.pid,
        workspace: info.workspace,
        startTime: info.startTime,
      }));
    
      return processes.length > 0 
        ? `Active processes:\n${JSON.stringify(processes, null, 2)}`
        : 'No active processes';
    }
  • The ProcessUtils class definition and the createProcessInfo helper used when adding processes.
    export class ProcessUtils {
      /**
       * Create process info object
       */
      static createProcessInfo(
        process: ChildProcess, 
        command: string, 
        port: number | undefined, 
        workspace: string
      ): ProcessInfo {
        return {
          process,
          command,
          port,
          workspace,
          startTime: new Date().toISOString(),
        };
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the scope (agent-started processes) but omits details like output format, potential side effects, or permissions needed. Adequate for a simple list but not thorough.

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?

Single sentence, seven words, directly states purpose. Highly concise and front-loaded with the action word.

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 no output schema, the description should clarify what data is returned (e.g., PID, command). It does not, leaving ambiguity. However, the simple nature of the tool and no parameters mitigate this gap somewhat.

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?

No parameters, so baseline 4 applies. The description adds no parameter info, which is acceptable given there are none to describe.

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?

Clearly states verb (list), resource (processes), and scope (started by the agent). Unambiguous and distinguishes from siblings like docker_containers or run_command.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives. Siblings include tools that also deal with processes (e.g., run_command, docker_containers), but no differentiation or usage hints are 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/agentics-ai/code-mcp'

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