Skip to main content
Glama

List agents

list_agents

Returns agents tracked by the host, including restored ones, with lifecycle state, liveness, names, and errors so you can reference them by name in later tool calls.

Instructions

List agents tracked by this host, including ones restored after a reconnect, with their lifecycle state and human-memorable name. Refer to agents by name in later tool calls. Active agents report liveness (live, stale, or unknown), last_heartbeat_at, and a liveness_reason; a backend whose process is gone is marked failed with an AGENT_UNRESPONSIVE error and its capacity slot is released. Failed agents always include a structured error with category, retryable, and recommended_action. Queued and scheduled rows carry start_at and notify. Also reports timeout_seconds, per-backend/per-model concurrency pools, and how many spawns are waiting. Newest first by creation time; order and cursors are stable while agents run, so pages never skip or repeat an agent.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
cursorNo
statesNo
backendNo
updated_sinceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedInput schema / properties / backend / enum
      Previous value: -[
      -  "claude",
      -  "codex",
      -  "opencode",
      -  "antigravity",
      -  "cursor"
      -]New value: +[
      +  "claude",
      +  "codex",
      +  "opencode",
      +  "antigravity",
      +  "cursor",
      +  "copilot",
      +  "vibe"
      +]
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it explains liveness semantics (`live`/`stale`/`unknown`), that dead backends become failed with AGENT_UNRESPONSIVE and release their capacity slot, the shape of the structured error object, and that pagination cursors are stable so pages never skip or repeat. It stops short of stating read-only/no-side-effect guarantees or any rate/authorization constraints.

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?

It is front-loaded with the purpose and then moves into return-value detail and ordering guarantees in a logical order, with no filler sentences. The middle stretch is dense, backtick-heavy field enumeration that is harder to scan than it needs to be, but each clause does carry 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?

There is no output schema, so the extensive description of returned fields (liveness, heartbeat, errors, start_at/notify, concurrency pools, pending spawns) is justified and makes the tool callable without guessing at the response. The remaining gap is the unaddressed input filters, which matters for a 5-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it only partially does: "order and cursors are stable" clarifies `cursor` behavior, and the mention of lifecycle states hints at the `states` filter. It says nothing about `limit`, `backend`, or `updated_since`, leaving three of five inputs undocumented anywhere.

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?

"List agents tracked by this host, including ones restored after a reconnect" gives a precise verb, resource, and scope, and the enumeration framing clearly separates it from siblings like get_agent_result or stop_agents. An agent knows immediately this is the discovery/listing call.

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 one workflow hint present is "Refer to agents by name in later tool calls," which implies this is a first-step discovery tool. However, it never states when to prefer this over wait_for_agents, get_agent_events, or list_agent_configs, nor any prerequisite or when-not condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.