Skip to main content
Glama

agent_list

Discover available AI agent personas to select the right assistant for your task, enabling personalized interactions through the MCP Instruct server's knowledge storage system.

Instructions

List all available AI agent personas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the agent_list tool: initializes the AgentManager instance, retrieves all agent templates using getTemplates(), maps them to a simplified structure (id, name, category, truncated role), and returns 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 (registration)
    Registration of the agent_list tool in the tools array, including name, description, and input schema (empty object). This array is served via ListToolsRequestHandler.
    {
      name: 'agent_list',
      description: 'List all available AI agent personas',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • Helper method that dynamically loads agent templates from .md files in the 'agents/' directory, extracts metadata (role, expertise, category), and stores them in memory for listing.
    private async loadTemplates(): Promise<void> {
      const files = await readdir(this.agentsPath);
      const mdFiles = files.filter(file => extname(file) === '.md');
    
      for (const file of mdFiles) {
        const filePath = join(this.agentsPath, file);
        const content = await readFile(filePath, 'utf-8');
        const id = file.replace('.md', '');
        
        const template: AgentTemplate = {
          id,
          name: this.formatName(id),
          content,
          metadata: this.extractMetadata(content)
        };
    
        this.templates.set(id, template);
      }
    }
  • Helper method directly called by the handler to retrieve the full list of loaded agent templates.
    // Get all available templates
    getTemplates(): AgentTemplate[] {
      return Array.from(this.templates.values());
    }
  • Input schema for agent_list tool: accepts an empty object (no parameters required).
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('List all available AI agent personas') without describing how it behaves—such as whether it returns a paginated list, the format of the output, any permissions required, or error conditions. This leaves significant gaps in understanding the tool's operation.

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 a single, clear sentence that directly states the tool's purpose without any fluff or redundant information. It is front-loaded and efficiently communicates the essential function, making it easy to understand at a glance.

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

Completeness3/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 and no output schema, the description adequately covers the basic purpose. However, it lacks details on behavioral aspects like output format or usage context, which are important for a tool that likely returns a list. With no annotations and no output schema, the description should do more to compensate, but it only meets the minimum viable level.

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 0 parameters with 100% coverage, meaning no parameters are documented because none exist. The description does not mention any parameters, which is appropriate and adds no unnecessary information. Baseline is 4 for 0 parameters, as the description correctly aligns with the schema's lack of parameters.

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 clearly states the specific action ('List') and the resource ('all available AI agent personas'), distinguishing it from sibling tools like agent_activate (activate), agent_get_active (get active), and agent_get_tools (get tools). It uses precise language that leaves no ambiguity about what the tool does.

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 implies usage by stating it lists 'all available' personas, suggesting it should be used when needing a comprehensive overview. However, it does not explicitly state when to use this tool versus alternatives like agent_get_active (which might list only active ones) or provide any exclusions or prerequisites for usage.

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

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