Skip to main content
Glama

npi-providers-mcp-server

Npi Get Provider

npi_get_provider
Read-onlyIdempotent

Fetch NPPES records from up to 100 raw NPI entries per call. Deduplicate in input order, validate check digits, and look up the first 10 distinct valid NPIs; remaining valid NPIs are listed in unprocessed and are never looked up. 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); every 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

NameRequiredDescriptionDefault
npisYesA single 10-digit NPI, or an array of up to 100. Entries are deduplicated in order, then check digits are validated; the first 10 distinct valid NPIs are looked up and any remaining valid NPIs are listed in unprocessed. Every invalid NPI is reported in invalid.

Output 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.
unprocessedNoDistinct valid NPIs beyond the first 10, in input order; not looked up. Present only when the lookup limit is exceeded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / npis / anyOf
      Previous 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"
      -  }
      -]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 100 ten-digit NPIs; only the first 10 distinct valid NPIs are looked up.",
      +    "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": 100,
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / npis / description
      Previous 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."New value: +"A single 10-digit NPI, or an array of up to 100. Entries are deduplicated in order, then check digits are validated; the first 10 distinct valid NPIs are looked up and any remaining valid NPIs are listed in unprocessed. Every invalid NPI is reported in invalid."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous 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."New value: +"Machine-readable failure mode. Declared by this tool: `none_found`: Every attempted NPI lookup returned a confirmed no-record response — none failed with an upstream error (those surface as the underlying service/timeout error instead). Unprocessed NPIs remain unresolved. `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."
    • addedOutput schema / properties / unprocessed
      Added value: +{
      +  "description": "Distinct valid NPIs beyond the first 10, in input order; not looked up. Present only when the lookup limit is exceeded.",
      +  "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"
      +  },
      +  "type": "array"
      +}
  2. 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."
  3. 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"
      -]
  4. 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"
      +]
  5. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly/idempotent/openWorld), and the description adds substantial behavior beyond them: dedup in input order, check-digit validation, the first-10-distinct lookup cap, remaining NPIs surfaced as unprocessed, and a clear distinction between notFound (confirmed miss) and errored (upstream failure) rather than failing the whole call. It also discloses the data-shaping rule that only LOCATION rows are kept for individuals, withholding their mailing address.

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 leading sentence is front-loaded with the essential scope (up to 100 entries per call, NPPES). It is dense but nearly every clause carries substantive information; the second sentence's heavy nested parentheticals and em-dash chains make it harder to scan than it needs to be.

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?

For a one-parameter, read-only, open-world tool with annotations and an output schema, the description supplies everything an agent needs: batching limits, validation rules, partial-success buckets, and data-shaping caveats. Return-value detail is redundant with the output schema but not harmful.

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

Parameters3/5

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

With a single parameter and 100% schema coverage, the schema already documents the format, the 10-digit pattern, the Luhn/80840 check digit, and the dedup-first-10 rule. The description largely restates those constraints rather than adding new parameter-level meaning, so the baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource — fetching NPPES records and decoding an NPI into a professional-practice profile — with concrete detail on what the profile contains. The one gap is that it never names or contrasts with the siblings (npi_lookup_taxonomy, npi_search_providers), so an agent must infer why this is the right tool rather than a search or taxonomy lookup.

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

Usage Guidelines3/5

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

"Decodes an NPI from a claim, prescription, or another health data source" gives an implicit use case, and the 10-lookup cap plus partial-success semantics communicate operational context. There is no explicit when-to-use/when-not or routing to the sibling tools, so alternative selection is left to inference.

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.