skvil_stats
Retrieve aggregate statistics from the Skvil community network, including total skills scanned, trusted count, critical findings, and certified skills for security verification.
Instructions
Get aggregate statistics from the Skvil community network: total skills scanned, trusted count, critical findings, and certified skills.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:120-146 (registration)Tool registration and handler for skvil_stats. Registers the tool with the MCP server and defines the async handler that calls api.stats() and formats the response as readable text showing total skills scanned, trusted count, critical findings, and certified skills.
// ── skvil_stats ─────────────────────────────────────────────────────────── server.tool( 'skvil_stats', 'Get aggregate statistics from the Skvil community network: total skills ' + 'scanned, trusted count, critical findings, and certified skills.', {}, async () => { try { const result = await api.stats(); return { content: [ { type: 'text', text: '**Skvil community statistics**\n\n' + `- **Total skills scanned:** ${result.total}\n` + `- **Trusted** (reputation >= 70): ${result.trusted}\n` + `- **Critical findings:** ${result.critical}\n` + `- **Certified:** ${result.certified}`, }, ], }; } catch (error) { return { content: [{ type: 'text', text: formatError('stats', error) }], isError: true }; } }, ); - src/api.ts:129-132 (handler)Core API function that makes the HTTP GET request to the /stats endpoint. Returns a Promise<StatsResponse> with the statistics data.
/** Get community statistics. */ export async function stats(): Promise<StatsResponse> { return request<StatsResponse>('GET', '/stats'); } - src/types.ts:41-46 (schema)Type definition for the StatsResponse interface that defines the structure of the data returned from the /stats API endpoint, including total skills, trusted count, critical findings, and certified skills count.
export interface StatsResponse { total: number; trusted: number; critical: number; certified: number; }