Skip to main content
Glama
tadas-github

a2asearch-mcp

search_agents

Search the A2ASearch directory to find AI agents, MCP servers, CLI tools, and agent skills by query and type filtering.

Instructions

Search the A2ASearch directory for AI agents, MCP servers, CLI tools and agent skills. Returns name, description, type, stars, GitHub URL and capabilities for each result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query — e.g. 'database', 'browser automation', 'memory'
typeNoFilter by agent type (optional)
limitNoNumber of results to return (1-20, default 10)

Implementation Reference

  • Handler for the 'search_agents' tool, which fetches agent data from A2ASearch API and formats it into text content.
    if (name === "search_agents") {
      const { query, type, limit = 10 } = args;
      const params = new URLSearchParams({
        search: query,
        per_page: String(Math.min(20, Math.max(1, limit))),
      });
      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 results = data.data.map((a) => ({
        name: a.name,
        type: a.type,
        description: a.description,
        url: a.agentCardUrl,
        stars: a.stars,
        capabilities: a.capabilities?.slice(0, 5),
        languages: a.languages?.slice(0, 3),
        health_score: a.healthScore,
      }));
    
      return {
        content: [
          {
            type: "text",
            text:
              `Found ${data.pagination.total} results for "${query}"` +
              (type ? ` (type: ${type})` : "") +
              `\n\n` +
              results
                .map(
                  (r) =>
                    `**${r.name}** (${r.type})\n` +
                    `  ${r.description || "No description"}\n` +
                    `  ⭐ ${r.stars?.toLocaleString() || 0}  |  🔗 ${r.url}\n` +
                    (r.capabilities?.length
                      ? `  Capabilities: ${r.capabilities.join(", ")}\n`
                      : "")
                )
                .join("\n"),
          },
        ],
      };
    }
  • index.js:27-52 (registration)
    Tool registration for 'search_agents' in the ListToolsRequest handler, defining its name, description, and input schema.
    {
      name: "search_agents",
      description:
        "Search the A2ASearch directory for AI agents, MCP servers, CLI tools and agent skills. " +
        "Returns name, description, type, stars, GitHub URL and capabilities for each result.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query — e.g. 'database', 'browser automation', 'memory'",
          },
          type: {
            type: "string",
            enum: ["MCP Server", "CLI Tool", "AI Coding Agent", "Agent Skill", "A2A Agent"],
            description: "Filter by agent type (optional)",
          },
          limit: {
            type: "number",
            description: "Number of results to return (1-20, default 10)",
            default: 10,
          },
        },
        required: ["query"],
      },
    },
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