Skip to main content
Glama

List the principal's agents

list_agents
Read-only

List every agent registered for your principal. Use it to audit who can spend from the shared wallet, to find a target_agent_id for revoke_agent or renew_mandate, or to check a mandate before it expires. Returns, per agent: agent_id, created_at, principal_key_version, status (active, expired or revoked), mandate_expiry and limits, plus active_agents against max_agents_per_principal. Needs your agent credentials and the principal_key (argument or X-Principal-Key header). An agent you do not recognise may have been registered with a leaked principal_key: revoke it, or rotate the key.

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
agent_idNoYour agent id (or X-Agent-Id header)
agent_keyNoSecret returned by register_agent (or X-Agent-Key header)
principal_idNoThe principal you act for (or X-Principal-Id header)
principal_keyNoThe principal's current principal_key (or X-Principal-Key header)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest and does so well: it lists the returned fields, the active_agents vs max_agents_per_principal counter, and the credential requirements. It omits pagination/ordering behaviour for a list operation, which keeps it from a 5.

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?

Purpose and scope are front-loaded in the first clause, then usage, then return shape, then credentials. Dense and mostly waste-free, though the final leaked-key sentence is advisory rather than definitional and the return-field list is enumerated in a slightly packed way.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by naming every returned field (agent_id, created_at, principal_key_version, status values, mandate_expiry, limits, active_agents/max_agents_per_principal). Auth requirements and the security escalation path are both covered, so nothing needed to call it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning the schema does not: it states that the agent credentials and principal_key are actually needed even though the schema marks all four parameters optional. It does not explain what principal_key authorises relative to principal_id.

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 every agent registered for your principal" gives a specific verb (list), a specific resource (agents), and an explicit scope (the caller's principal). It is immediately distinguishable from register_agent, revoke_agent and renew_mandate, which appear as siblings.

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

Usage Guidelines5/5

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

It enumerates three concrete situations (auditing spend authority, sourcing a target_agent_id for revoke_agent/renew_mandate, checking a mandate before expiry) and names the sibling tools that consume the output. It also prescribes a response to an unexpected agent: revoke or rotate the key.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.