label_stats
Retrieve statistics for address label datasets including total labeled addresses, category coverage, and last update timestamps to analyze data completeness and freshness.
Instructions
Get statistics about the address label dataset: total labeled addresses, categories covered, last updated timestamp. Free endpoint.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/labels.ts:123-153 (handler)The handler function for the `label_stats` tool which registers the tool and executes an API call to `/api/v1/labels/stats`.
server.registerTool( "label_stats", { title: "Label Dataset Statistics", description: "Get statistics about the address label dataset: total labeled addresses, " + "categories covered, last updated timestamp. Free endpoint.", inputSchema: {}, }, async () => { const res = await apiGet<LabelStatsResponse>("/api/v1/labels/stats"); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } return { content: [ { type: "text" as const, text: JSON.stringify(res.data, null, 2) }, ], }; }, ); - src/tools/labels.ts:20-25 (schema)Type definition for the response of the label_stats tool.
interface LabelStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; }