agentfolio_marketplace_stats
Retrieve AgentFolio marketplace statistics including total agents, skills, verified agents, and on-chain registrations.
Instructions
Get AgentFolio marketplace statistics — total agents, skills, verified count, and on-chain registrations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.js:158-166 (schema)Tool schema definition for agentfolio_marketplace_stats — declares the tool's name, description, and empty input schema.
{ name: "agentfolio_marketplace_stats", description: "Get AgentFolio marketplace statistics — total agents, skills, verified count, and on-chain registrations.", inputSchema: { type: "object", properties: {}, }, }, - src/index.js:323-339 (handler)Handler implementation for agentfolio_marketplace_stats — fetches profiles and jobs data via apiSoft, computes total agents, total jobs, and open jobs, then returns JSON.
case "agentfolio_marketplace_stats": { // /marketplace/stats endpoint is currently unavailable — compute from available data const [profilesData, jobsData] = await Promise.all([ apiSoft("/profiles", { profiles: [], total: 0 }), apiSoft("/marketplace/jobs", { jobs: [], total: 0 }), ]); return JSON.stringify( { totalAgents: profilesData.total || (profilesData.profiles || []).length, totalJobs: jobsData.total || (jobsData.jobs || []).length, openJobs: (jobsData.jobs || []).filter((j) => j.status === "open").length, note: "Stats computed from available API endpoints. Some metrics may be approximate.", }, null, 2 ); } - src/index.js:438-440 (registration)Registration via ListToolsRequestSchema — the TOOLS array (which includes agentfolio_marketplace_stats) is returned to the MCP client on a list-tools request.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, })); - src/index.js:52-59 (helper)Helper function apiSoft — wraps api() to return a fallback on error instead of throwing, used by the marketplace_stats handler.
// Soft API call — returns fallback on error instead of throwing async function apiSoft(path, fallback = null) { try { return await api(path); } catch { return fallback; } }