agent_list
List available AI agent personas to select and interact with specific artificial intelligence assistants for various tasks and conversations.
Instructions
List all available AI agent personas
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:878-896 (handler)The handler function for the 'agent_list' tool. It initializes the AgentManager, retrieves the list of agent templates, maps them to a simplified format (id, name, category, truncated role), and returns them as JSON text content.case 'agent_list': { await am.initialize(); const agents = am.getTemplates(); return { content: [ { type: 'text', text: JSON.stringify({ agents: agents.map(a => ({ id: a.id, name: a.name, category: a.metadata.category, role: a.metadata.role?.substring(0, 100) + '...' })) }, null, 2) } ] }; }
- src/index.ts:340-347 (schema)The tool schema definition for 'agent_list', including name, description, and input schema (empty object, no parameters required).{ name: 'agent_list', description: 'List all available AI agent personas', inputSchema: { type: 'object', properties: {} } },
- src/index.ts:423-425 (registration)Registration of all tools list handler, which includes 'agent_list' in the tools array returned to MCP clients.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/AgentManager.ts:99-102 (helper)Helper method getTemplates() in AgentManager class that returns the array of all loaded agent templates, called by the agent_list handler.// Get all available templates getTemplates(): AgentTemplate[] { return Array.from(this.templates.values()); }