Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) } ] }; }
  • 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 }; });
  • 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()); }

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/hlsitechio/mcp-instruct'

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