Skip to main content
Glama
tadas-github

a2asearch-mcp

list_agents

Browse and filter AI agents, MCP servers, CLI tools, and skills from the A2ASearch directory by type, popularity, or recency.

Instructions

List agents from A2ASearch, optionally filtered by type. Use this to browse top agents by category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by type (optional — omit for all types)
sortNoSort order: 'stars' for most popular, 'new' for recently addedstars
limitNoNumber of results (1-20, default 10)

Implementation Reference

  • Definition of the list_agents tool including name, description, and inputSchema.
    {
      name: "list_agents",
      description:
        "List agents from A2ASearch, optionally filtered by type. " +
        "Use this to browse top agents by category.",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            enum: ["MCP Server", "CLI Tool", "AI Coding Agent", "Agent Skill", "A2A Agent"],
            description: "Filter by type (optional — omit for all types)",
          },
          sort: {
            type: "string",
            enum: ["stars", "new"],
            description: "Sort order: 'stars' for most popular, 'new' for recently added",
            default: "stars",
          },
          limit: {
            type: "number",
            description: "Number of results (1-20, default 10)",
            default: 10,
          },
        },
      },
    },
  • Implementation of the list_agents tool handler, which fetches agent data from an API and formats the output.
    if (name === "list_agents") {
      const { type, sort = "stars", limit = 10 } = args;
      const params = new URLSearchParams({
        per_page: String(Math.min(20, Math.max(1, limit))),
        sort,
      });
      if (type) params.set("type", type);
    
      const res = await fetch(`${API_BASE}/agents?${params}`);
      if (!res.ok) throw new Error(`API error: ${res.status}`);
      const data = await res.json();
    
      const label = type ? `${type}s` : "agents";
      const sortLabel = sort === "stars" ? "by stars" : "recently added";
    
      return {
        content: [
          {
            type: "text",
            text:
              `Top ${data.data.length} ${label} ${sortLabel} (${data.pagination.total} total)\n\n` +
              data.data
                .map(
                  (a, i) =>
                    `${i + 1}. **${a.name}** — ${a.description?.slice(0, 80) || "No description"}\n` +
                    `   ⭐ ${a.stars?.toLocaleString() || 0}  |  ${a.agentCardUrl}`
                )
                .join("\n"),
          },
        ],
      };
    }
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/tadas-github/a2asearch-mcp'

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