Skip to main content
Glama

npi-providers-mcp-server

Npi Get Provider

npi_get_provider
Read-onlyIdempotent

Fetch the NPPES record for one or more NPI numbers (up to 10 per call). Decodes an NPI from a claim, prescription, or another health data source into the provider's professional-practice profile: every taxonomy with its primary flag, license number and state; practice addresses with phone and fax (only LOCATION rows are kept for individual providers, so their mailing address is withheld; organizations also carry their mailing address); credential, sex, sole-proprietor flag; enumeration and last-updated dates; active/deactivated status; secondary identifiers (Medicaid, etc.); and FHIR/Direct endpoints. Each NPI must be 10 digits with a valid check digit (its last digit); an NPI failing the check digit lands in invalid and is never looked up. Reports partial success: valid NPIs with no registry record (deactivated or never enumerated) land in notFound, while NPIs whose lookup hit an upstream error (registry unavailable, timeout) land in errored — kept distinct from confirmed misses — rather than failing the whole call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
npisYesA single 10-digit NPI, or an array of up to 10. Each must be exactly 10 digits; each is also checked against its NPI check digit before any API call, and one that fails is reported in invalid.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
foundNoDecoded records for NPIs that resolved.
noticeNoGuidance when some NPIs failed the check digit, returned no record, or hit an upstream error.
erroredNoNPIs whose lookups failed with an upstream/transport error (service unavailable, timeout) — distinct from a confirmed miss in notFound. These are unresolved, not absent; retry them.
invalidNoNPIs that failed the NPI check digit — not valid NPIs, usually a typo. They were never looked up, so they are neither confirmed misses nor upstream failures.
notFoundNoNPIs with a valid check digit that returned no record (deactivated or never enumerated). A confirmed absence, not a failure.
totalCountNoNumber of provider records that resolved from the requested NPIs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changed
    • changedInput schema / properties / npis / anyOf
      Previous value: -[
      -  {
      -    "description": "A 10-digit National Provider Identifier.",
      -    "pattern": "^\\d{10}$",
      -    "type": "string"
      -  },
      -  {
      -    "description": "An array of up to 10 ten-digit NPIs.",
      -    "items": {
      -      "description": "A 10-digit National Provider Identifier.",
      -      "pattern": "^\\d{10}$",
      -      "type": "string"
      -    },
      -    "maxItems": 10,
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "description": "A 10-digit National Provider Identifier whose last digit is its check digit (Luhn over the number prefixed with 80840).",
      +    "pattern": "^\\d{10}$",
      +    "type": "string"
      +  },
      +  {
      +    "description": "An array of up to 10 ten-digit NPIs.",
      +    "items": {
      +      "description": "A 10-digit National Provider Identifier whose last digit is its check digit (Luhn over the number prefixed with 80840).",
      +      "pattern": "^\\d{10}$",
      +      "type": "string"
      +    },
      +    "maxItems": 10,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / npis / description
      Previous value: -"A single 10-digit NPI, or an array of up to 10. Each is validated as exactly 10 digits before any API call."New value: +"A single 10-digit NPI, or an array of up to 10. Each must be exactly 10 digits; each is also checked against its NPI check digit before any API call, and one that fails is reported in invalid."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "found",
      -      "notFound",
      -      "errored",
      -      "totalCount"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "found",
      +      "notFound",
      +      "errored",
      +      "invalid",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `none_found`: Every requested NPI returned a confirmed no-record response — none failed with an upstream error (those surface as the underlying service/timeout error instead). Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `none_found`: Every requested NPI with a valid check digit returned a confirmed no-record response — none failed with an upstream error (those surface as the underlying service/timeout error instead). `invalid_npi_format`: Every requested NPI failed the NPI check digit, so none was looked up. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "none_found"
      -]New value: +[
      +  "none_found",
      +  "invalid_npi_format"
      +]
    • changedOutput schema / properties / found / description
      Previous value: -"Fully decoded records for NPIs that resolved."New value: +"Decoded records for NPIs that resolved."
    • changedOutput schema / properties / found / items / description
      Previous value: -"A fully decoded NPPES provider record."New value: +"A decoded NPPES provider record — the registry's professional-practice data. Only LOCATION address rows are kept for individual providers."
    • changedOutput schema / properties / found / items / properties / addresses / description
      Previous value: -"All practice and mailing addresses."New value: +"Registry addresses. Only LOCATION (practice) rows are kept for individual providers — their mailing address is withheld; organizations carry both LOCATION and MAILING rows."
    • changedOutput schema / properties / found / items / properties / addresses / items / description
      Previous value: -"A practice or mailing address."New value: +"A practice (LOCATION) address, or an organization mailing address."
    • changedOutput schema / properties / found / items / properties / addresses / items / properties / purpose / description
      Previous value: -"Address purpose (LOCATION or MAILING)."New value: +"Address purpose: LOCATION (practice) or MAILING. Only LOCATION rows are kept for individual providers; organizations also carry MAILING."
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / contentOtherDescription
      Added value: +{
      +  "description": "The content the endpoint carries when the content type is OTHER (e.g. \"C-CDA\"), when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / endpointDescription
      Added value: +{
      +  "description": "Free-text description of the endpoint (e.g. \"Carequality\"), when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / line2
      Added value: +{
      +  "description": "Endpoint address line 2, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / useOtherDescription
      Added value: +{
      +  "description": "What the endpoint is used for when the use code is OTHER, when present.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / found / items / properties / practiceLocations / items / description
      Previous value: -"A practice or mailing address."New value: +"A practice (LOCATION) address, or an organization mailing address."
    • changedOutput schema / properties / found / items / properties / practiceLocations / items / properties / purpose / description
      Previous value: -"Address purpose (LOCATION or MAILING)."New value: +"Address purpose: LOCATION (practice) or MAILING. Only LOCATION rows are kept for individual providers; organizations also carry MAILING."
    • addedOutput schema / properties / invalid
      Added value: +{
      +  "description": "NPIs that failed the NPI check digit — not valid NPIs, usually a typo. They were never looked up, so they are neither confirmed misses nor upstream failures.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "A requested NPI that failed the NPI check digit.",
      +    "properties": {
      +      "npi": {
      +        "description": "The requested NPI that failed the check digit.",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "Why the NPI was rejected.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "npi",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / notFound / description
      Previous value: -"NPIs that were well-formed but returned no record (deactivated or never enumerated). A confirmed absence, not a failure."New value: +"NPIs with a valid check digit that returned no record (deactivated or never enumerated). A confirmed absence, not a failure."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when some or all NPIs returned nothing."New value: +"Guidance when some NPIs failed the check digit, returned no record, or hit an upstream error."
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "found",
      +      "notFound",
      +      "errored",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `none_found`: Every requested NPI returned a confirmed no-record response — none failed with an upstream error (those surface as the underlying service/timeout error instead). Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "none_found"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "found",
      -  "notFound",
      -  "errored",
      -  "totalCount"
      -]
  3. Changed24 schema fields changed
    • addedOutput schema / properties / errored
      Added value: +{
      +  "description": "NPIs whose lookups failed with an upstream/transport error (service unavailable, timeout) — distinct from a confirmed miss in notFound. These are unresolved, not absent; retry them.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "A requested NPI whose lookup failed with an upstream error.",
      +    "properties": {
      +      "npi": {
      +        "description": "The requested NPI whose lookup failed operationally.",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "The upstream failure reason (service unavailable, timeout, etc.).",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "npi",
      +      "reason"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / found / items / properties / authorizedOfficial / properties / namePrefix
      Added value: +{
      +  "description": "Authorized official name prefix, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / authorizedOfficial / properties / nameSuffix
      Added value: +{
      +  "description": "Authorized official name suffix, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / createdEpoch
      Added value: +{
      +  "description": "Record creation timestamp, epoch milliseconds, when present.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / found / items / properties / endpoints / items / description
      Previous value: -"A FHIR or Direct messaging endpoint."New value: +"A FHIR or Direct messaging endpoint with its routing address and context."
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / addressType
      Added value: +{
      +  "description": "Endpoint address type (DOM/FOR), when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / affiliation
      Added value: +{
      +  "description": "Whether the endpoint is affiliated with an organization (Y/N), when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / affiliationName
      Added value: +{
      +  "description": "Name of the affiliated organization, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / city
      Added value: +{
      +  "description": "Endpoint city, when present.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / found / items / properties / endpoints / items / properties / contentType / description
      Previous value: -"Endpoint content type, when present."New value: +"Endpoint content type code, when present."
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / contentTypeDescription
      Added value: +{
      +  "description": "Endpoint content type description, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / countryCode
      Added value: +{
      +  "description": "Endpoint ISO country code, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / countryName
      Added value: +{
      +  "description": "Endpoint country name, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / line1
      Added value: +{
      +  "description": "Endpoint address line 1, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / postalCode
      Added value: +{
      +  "description": "Endpoint postal/ZIP code, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / state
      Added value: +{
      +  "description": "Endpoint state, when present.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / found / items / properties / endpoints / items / properties / use / description
      Previous value: -"Endpoint use, when present."New value: +"Endpoint use code (e.g. \"HIE\"), when present."
    • addedOutput schema / properties / found / items / properties / endpoints / items / properties / useDescription
      Added value: +{
      +  "description": "Endpoint use description, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / lastUpdatedEpoch
      Added value: +{
      +  "description": "Record last-update timestamp, epoch milliseconds, when present.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / found / items / properties / otherNames / items / properties / middleName
      Added value: +{
      +  "description": "Middle name, for individuals, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / otherNames / items / properties / prefix
      Added value: +{
      +  "description": "Name prefix, when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / found / items / properties / otherNames / items / properties / suffix
      Added value: +{
      +  "description": "Name suffix, when present.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / notFound / description
      Previous value: -"NPIs that were well-formed but returned no record (deactivated or never enumerated)."New value: +"NPIs that were well-formed but returned no record (deactivated or never enumerated). A confirmed absence, not a failure."
    • changedOutput schema / required
      Previous value: -[
      -  "found",
      -  "notFound",
      -  "totalCount"
      -]New value: +[
      +  "found",
      +  "notFound",
      +  "errored",
      +  "totalCount"
      +]
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds substantial behavioral detail beyond the readOnlyHint, openWorldHint, and idempotentHint annotations: check-digit validation before any registry call, invalid NPIs never being looked up, partial-success reporting with invalid/notFound/errored buckets, and the distinction between confirmed misses and upstream errors. It also reveals the subtle rule that individual providers' mailing addresses are withheld while organizations' are kept. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description front-loads the core purpose and then flows through input constraints, address-handling nuances, and failure categories. It is longer than strictly necessary, and the detailed field enumeration partially overlaps with the available output schema, but nearly every clause carries behavioral or scoping information that an agent needs. It is structured and dense rather than rambling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the annotations, full input schema coverage, and presence of an output schema, the description covers everything needed for correct invocation: the exact input shape, validation semantics, partial-success buckets, and a key data-shaping nuance (LOCATION-only addresses for individuals). No critical selection or invocation information is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers 100% of the single parameter, including the 10-digit pattern, check digit rule, and maxItems=10. The description adds behavioral meaning beyond that by specifying that an NPI failing the check digit lands in 'invalid' and is never sent to the registry, and by restating the up-to-10 limit. This exceeds the baseline 3 justified by complete schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Fetch the NPPES record for one or more NPI numbers') and clarifies the batch limit and the use case of decoding an NPI from claims or prescriptions. Although it never names the sibling tools, the operation is clearly distinct from taxonomy lookup and provider search because it is keyed by exact NPI numbers and returns the full NPPES profile.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use the tool: whenever an NPI is already known from a claim, prescription, or other health data source. It does not explicitly name sibling alternatives or state when not to use them, so it falls short of a 5, but the intended usage scenario is unmistakable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.