get_agent
Retrieve comprehensive information about AI agents from the A2ASearch directory using their unique slug identifier to access capabilities, documentation, and technical details.
Instructions
Get full details for a specific agent by its slug (name as kebab-case). Returns description, README, capabilities, stars, forks, languages and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Agent slug — e.g. 'playwright', 'ollama', 'claude-code', 'mem0' |
Implementation Reference
- index.js:152-187 (handler)The handler logic for the "get_agent" tool, which fetches agent details from the A2ASearch API and formats them into a markdown summary.
if (name === "get_agent") { const { slug } = args; const res = await fetch(`${API_BASE}/agent/${encodeURIComponent(slug)}`); if (!res.ok) { if (res.status === 404) return { content: [{ type: "text", text: `Agent "${slug}" not found.` }], }; throw new Error(`API error: ${res.status}`); } const { data: a } = await res.json(); const summary = [ `# ${a.name}`, `**Type:** ${a.type}`, `**Description:** ${a.description || "N/A"}`, `**GitHub:** ${a.agentCardUrl}`, `**Stars:** ${a.stars?.toLocaleString() || 0} | **Forks:** ${a.forks || 0}`, a.languages?.length ? `**Languages:** ${a.languages.join(", ")}` : "", a.capabilities?.length ? `**Capabilities:** ${a.capabilities.join(", ")}` : "", a.topics?.length ? `**Topics:** ${a.topics.join(", ")}` : "", a.last_commit_date ? `**Last commit:** ${new Date(a.last_commit_date).toLocaleDateString()}` : "", "", a.readme ? `## README\n${a.readme.slice(0, 3000)}${a.readme.length > 3000 ? "\n\n_(truncated)_" : ""}` : "", ] .filter(Boolean) .join("\n"); return { content: [{ type: "text", text: summary }] }; } - index.js:54-68 (registration)Registration and schema definition for the "get_agent" tool within the MCP server setup.
name: "get_agent", description: "Get full details for a specific agent by its slug (name as kebab-case). " + "Returns description, README, capabilities, stars, forks, languages and more.", inputSchema: { type: "object", properties: { slug: { type: "string", description: "Agent slug — e.g. 'playwright', 'ollama', 'claude-code', 'mem0'", }, }, required: ["slug"], }, },