Skip to main content
Glama

list_processes

Retrieve a list of all running and completed AI agent processes with their PID, agent type, and status.

Instructions

List all running and completed AI agent processes. Returns a simple list with PID, agent type, and status for each process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core implementation: listProcesses() iterates the process manager's internal map and returns a list of ProcessListItem objects with pid, agent, and status.
    listProcesses(): ProcessListItem[] {
      const processes: ProcessListItem[] = [];
    
      for (const [pid, process] of this.processManager.entries()) {
        processes.push({
          pid,
          agent: process.toolType,
          status: process.status,
        });
      }
    
      return processes;
    }
  • The MCP tool handler: handleListProcesses() calls processService.listProcesses() and returns the result as JSON text content.
    private async handleListProcesses(): Promise<ServerResult> {
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(this.processService.listProcesses(), null, 2)
        }]
      };
    }
  • The tool schema/definition registered with the MCP server, including name 'list_processes', description, and empty inputSchema.
    {
      name: 'list_processes',
      description: 'List all running and completed AI agent processes. Returns a simple list with PID, agent type, and status for each process.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/app/mcp.ts:321-322 (registration)
    The switch-case in the tools handler that routes the 'list_processes' tool name to handleListProcesses().
    case 'list_processes':
      return this.handleListProcesses();
  • The ProcessListItem interface defining the return type: pid (number), agent (AgentType), status (ProcessStatus).
    export interface ProcessListItem {
      pid: number;
      agent: AgentType;
      status: ProcessStatus;
    }
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It describes the return value (simple list with specific fields) but does not explicitly state that it is a read-only operation or any side effects. The behavior is typical for a list tool but lacks full transparency.

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 long, with the first sentence front-loading the primary function: 'List all running and completed AI agent processes.' The second sentence adds return field details. No unnecessary words.

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 has no parameters, no annotations, and no output schema, the description provides the essential return fields (PID, agent type, status). It does not mention ordering, error conditions, or performance, but for a simple list operation this is nearly complete.

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 no parameters, so the description has no parameters to explain. Baseline for zero parameters is 4, and the description does not add any parameter information, which is appropriate.

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 uses the verb 'List' and the resource 'processes', clearly indicating it returns a list of all running and completed AI agent processes. It includes the specific fields (PID, agent type, status) that will be in the output, distinguishing it from siblings like kill_process or get_result 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 Guidelines3/5

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

The description states it lists 'all running and completed' processes, implying use when you need an overview. However, it offers no explicit guidance on when to use this tool versus alternatives like peek, get_result, or wait, nor does it mention any prerequisites or exclusions.

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/lailai258/agent-bridge-mcp'

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