agentfolio_list_agents
List all registered AI agents in the AgentFolio directory, providing an overview of agent profiles, trust scores, and verification statuses.
Instructions
List all registered agents on AgentFolio. Returns an overview of the entire agent directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:167-175 (registration)Tool registration for 'agentfolio_list_agents' in the TOOLS array, defining name, description, and empty input schema.
{ name: "agentfolio_list_agents", description: "List all registered agents on AgentFolio. Returns an overview of the entire agent directory.", inputSchema: { type: "object", properties: {}, }, }, - src/index.js:341-344 (handler)Handler for the 'agentfolio_list_agents' tool. Calls the /profiles API endpoint and returns the result as a JSON string.
case "agentfolio_list_agents": { const profiles = await api(`/profiles`); return JSON.stringify(profiles, null, 2); } - src/index.js:31-50 (helper)The api() HTTP helper function used by the handler to fetch data from the AgentFolio API.
async function api(path, opts = {}) { const url = `${API_BASE}${path}`; const res = await fetch(url, { headers: { "Content-Type": "application/json", ...opts.headers }, ...opts, }); if (!res.ok) { const body = await res.text().catch(() => ""); throw new Error(`AgentFolio API ${res.status}: ${body}`); } // Guard against HTML error pages returned with 200 const ct = res.headers.get("content-type") || ""; if (!ct.includes("application/json")) { const body = await res.text().catch(() => ""); if (body.includes("<!DOCTYPE") || body.includes("<html")) { throw new Error(`AgentFolio API returned HTML instead of JSON for ${path}`); } } return res.json(); }