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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query — e.g. 'database', 'browser automation', 'memory' | |
| type | No | Filter by agent type (optional) | |
| limit | No | Number of results to return (1-20, default 10) |
Implementation Reference
- index.js:105-150 (handler)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"], }, },