npi_stats
Retrieve key statistics about the NPI dataset, including total records, state coverage, update timestamps, and data source details. This free tool provides essential insights for healthcare data analysis.
Instructions
Get statistics about the NPI dataset: total record count, number of states, last updated timestamp, and data source information. Free endpoint, no payment required.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/npi.ts:152-173 (handler)The handler implementation for the npi_stats tool.
async () => { const res = await apiGet<NpiStatsResponse>("/api/v1/npi/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/npi.ts:143-151 (registration)The registration of the npi_stats tool using the MCP server instance.
server.registerTool( "npi_stats", { title: "NPI Dataset Statistics", description: "Get statistics about the NPI dataset: total record count, number of states, " + "last updated timestamp, and data source information. Free endpoint, no payment required.", inputSchema: {}, }, - src/tools/npi.ts:19-24 (schema)The interface defining the response shape for the npi_stats tool.
interface NpiStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; }