Skip to main content
Glama

Search LOINC

loinc_search
Read-onlyIdempotent

Search for laboratory tests, clinical observations, and measurements in LOINC (Logical Observation Identifiers Names and Codes).

Use this tool to:

  • Find LOINC codes for lab tests (e.g., "glucose", "hemoglobin")

  • Search for clinical measurements and vital signs

  • Look up diagnostic observations

Returns matching LOINC codes with names, components, and properties.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "loinc_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSearch term (test name, keyword, or partial LOINC code)
offsetNoNumber of results to skip, to read the next page: pass `next_offset` from the previous answer, keeping the other arguments. Default: 0 (at most 7400: the source serves at most the first 7500 results)
max_resultsNoMaximum number of results (1-100). Default: 25

Output Schema

NameRequiredDescriptionDefault
itemsYesMatching LOINC terms in source relevance order, starting after `offset`.
queryYesThe search term as submitted.
offsetYesResults skipped before the first one returned (the `offset` asked for).
provenanceYesProvenance block: source, URL, data vintage, extraction instant, origin diagnostics, citation, license
attributionYesCanonical source URLs of this response (attribution list)
next_offsetYes`offset` that returns the next page with the same arguments; null at the end of the results, or past the first 7,500 (the most the source serves).
shown_countYesNumber of terms returned in items (at most max_results).
total_countYesTotal number of LOINC terms matching the query at the source, which may exceed the items returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Number of results to skip, to read the next page: pass `next_offset` from the previous answer, keeping the other arguments. Default: 0 (at most 7400: the source serves at most the first 7500 results)",
      +  "maximum": 7400,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / items / description
      Previous value: -"Matching LOINC terms in source relevance order."New value: +"Matching LOINC terms in source relevance order, starting after `offset`."
    • addedOutput schema / properties / next_offset
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "`offset` that returns the next page with the same arguments; null at the end of the results, or past the first 7,500 (the most the source serves)."
      +}
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Results skipped before the first one returned (the `offset` asked for).",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "total_count",
      -  "shown_count",
      -  "items",
      -  "provenance",
      -  "attribution"
      -]New value: +[
      +  "query",
      +  "total_count",
      +  "shown_count",
      +  "offset",
      +  "next_offset",
      +  "items",
      +  "provenance",
      +  "attribution"
      +]
  2. Changed5 schema fields changed
    • changedOutput schema / properties / items / items / properties / class / description
      Previous value: -"LOINC class the term is grouped under (e.g. \"CHEM\")."New value: +"LOINC class. Not served: the NLM Clinical Tables LOINC API has no such field (its documented field list, read 2026-11-28), so this is always an empty string. The term's page on loinc.org has it."
    • changedOutput schema / properties / items / items / properties / scale_type / description
      Previous value: -"LOINC axis 5, Scale: Qn (quantitative), Ord, Nom, Nar, etc."New value: +"LOINC axis 5, Scale. Not served: the NLM Clinical Tables LOINC API has no such field (its documented field list, read 2026-11-28), so this is always an empty string. The term's page on loinc.org has it."
    • changedOutput schema / properties / items / items / properties / status / description
      Previous value: -"LOINC term status (e.g. \"ACTIVE\", \"DEPRECATED\"); empty when the source omits it."New value: +"LOINC term status. Not served: the NLM Clinical Tables LOINC API has no such field (its documented field list, read 2026-11-28), so this is always an empty string. The term's page on loinc.org has it. A retired term is still recognizable: its long common name starts with \"Deprecated\"."
    • changedOutput schema / properties / items / items / properties / system / description
      Previous value: -"LOINC axis 4, System: the specimen or thing observed (e.g. \"Bld\", \"Ser/Plas\")."New value: +"LOINC axis 4, System (specimen). Not served: the NLM Clinical Tables LOINC API has no such field (its documented field list, read 2026-11-28), so this is always an empty string. The term's page on loinc.org has it."
    • changedOutput schema / properties / items / items / properties / time_aspect / description
      Previous value: -"LOINC axis 3, Time: point in time or interval of the observation (e.g. \"Pt\", \"24H\")."New value: +"LOINC axis 3, Time. Not served: the NLM Clinical Tables LOINC API has no such field (its documented field list, read 2026-11-28), so this is always an empty string. The term's page on loinc.org has it."
  3. Changed16 schema fields changed
    • addedOutput schema / properties / items / description
      Added value: +"Matching LOINC terms in source relevance order."
    • addedOutput schema / properties / items / items / properties / class / description
      Added value: +"LOINC class the term is grouped under (e.g. \"CHEM\")."
    • addedOutput schema / properties / items / items / properties / component / description
      Added value: +"LOINC axis 1, Component: what is measured or observed (e.g. \"Glucose\")."
    • addedOutput schema / properties / items / items / properties / external_copyright_notice / description
      Added value: +"Third-party copyright notice the term carries, served verbatim (LOINC License §10); null when it carries none."
    • addedOutput schema / properties / items / items / properties / loinc_num / description
      Added value: +"LOINC number (e.g. \"2339-0\")."
    • addedOutput schema / properties / items / items / properties / long_common_name / description
      Added value: +"LOINC Long Common Name, the full human-readable name of the term."
    • addedOutput schema / properties / items / items / properties / method_type / description
      Added value: +"LOINC axis 6, Method; empty when the term specifies none."
    • addedOutput schema / properties / items / items / properties / property / description
      Added value: +"LOINC axis 2, Property: the kind of quantity (e.g. \"MCnc\" = mass concentration)."
    • addedOutput schema / properties / items / items / properties / scale_type / description
      Added value: +"LOINC axis 5, Scale: Qn (quantitative), Ord, Nom, Nar, etc."
    • addedOutput schema / properties / items / items / properties / short_name / description
      Added value: +"LOINC short name; empty when the source has none."
    • addedOutput schema / properties / items / items / properties / status / description
      Added value: +"LOINC term status (e.g. \"ACTIVE\", \"DEPRECATED\"); empty when the source omits it."
    • addedOutput schema / properties / items / items / properties / system / description
      Added value: +"LOINC axis 4, System: the specimen or thing observed (e.g. \"Bld\", \"Ser/Plas\")."
    • addedOutput schema / properties / items / items / properties / time_aspect / description
      Added value: +"LOINC axis 3, Time: point in time or interval of the observation (e.g. \"Pt\", \"24H\")."
    • addedOutput schema / properties / query / description
      Added value: +"The search term as submitted."
    • addedOutput schema / properties / shown_count / description
      Added value: +"Number of terms returned in items (at most max_results)."
    • addedOutput schema / properties / total_count / description
      Added value: +"Total number of LOINC terms matching the query at the source, which may exceed the items returned."
  4. Changed1 schema field changed
    • changedOutput schema / properties / provenance / properties / notices / description
      Previous value: -"Notices the source publishes alongside the data (license statements, caveats), verbatim. Absent when there is none"New value: +"Caveats the source publishes about the data, verbatim (license statements are not repeated here; see the info://licenses resource). Absent when there is none"
  5. Changed7 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"New value: +"Provenance block: source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
    • addedOutput schema / properties / provenance / properties / derivation_note
      Added value: +{
      +  "description": "What this server computed; present together with derived",
      +  "type": "string"
      +}
    • addedOutput schema / properties / provenance / properties / derived
      Added value: +{
      +  "description": "Present (true) only when this server computed the value (e.g. a ranking or summary statistics) instead of passing on what the source returned",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / provenance / properties / field_sources / description
      Previous value: -"Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses"New value: +"Present only when the response joins parts from different origins or extraction instants: for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses"
    • addedOutput schema / properties / provenance / properties / notices
      Added value: +{
      +  "description": "Notices the source publishes alongside the data (license statements, caveats), verbatim. Absent when there is none",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / provenance / properties / retrieval / description
      Previous value: -"Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"New value: +"Origin diagnostics of THIS source in this call: requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"
    • addedOutput schema / properties / provenance / properties / revision
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Whether the data can still change at the source: current = the version in force, the source may revise it; provisional = preliminary; final = will not change. Absent when unknown",
      +  "properties": {
      +    "note": {
      +      "description": "O específico da fonte: o que revisa, quando, por quê",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "current = versão vigente, a fonte pode revisá-la; provisional = preliminar, incompleta ou sujeita a mudança (não compare como se fosse fechada); final = não muda mais, declarado pela fonte",
      +      "enum": [
      +        "current",
      +        "provisional",
      +        "final"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  6. Changed1 schema field changed
    • addedOutput schema / properties / provenance / properties / field_sources
      Added value: +{
      +  "description": "Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Proveniência de um grupo de campos da resposta: de onde veio e quando foi extraído",
      +    "properties": {
      +      "data_vintage": {
      +        "description": "Vintage/competência da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "dataset_id": {
      +        "description": "Identificador do conjunto da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "description": "Campos do payload atribuídos a esta sub-fonte",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "retrieved_at": {
      +        "description": "ISO-8601 da extração desta sub-fonte na origem",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "served_from_cache": {
      +        "description": "true se esta sub-fonte veio do cache do servidor (retrieved_at é o da extração original); false se foi buscada nesta chamada; null se o servidor não distingue",
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "source_url": {
      +        "description": "URL canônica da sub-fonte que originou estes campos",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "source_url",
      +      "dataset_id",
      +      "data_vintage",
      +      "retrieved_at"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  7. Changed3 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Provenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license"New value: +"Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
    • addedOutput schema / properties / provenance / properties / retrieval
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "anomalies": {
      +          "description": "Anomalias superadas até o sucesso, somadas por classe, em ordem fixa; [] se nenhuma",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "count": {
      +                "description": "Ocorrências desta classe na chamada",
      +                "maximum": 9007199254740991,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "description": "Classe da anomalia (vocabulário fechado do contrato)",
      +                "enum": [
      +                  "timeout",
      +                  "network",
      +                  "http_4xx",
      +                  "http_5xx",
      +                  "rate_limited",
      +                  "malformed_body"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "count"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "attempts": {
      +          "description": "Tentativas somadas, incluindo as repetidas (>= requests)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "description": "Idas distintas à origem que compõem esta resposta (fatias, páginas)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "unstable": {
      +          "description": "true se houve repetição (attempts > requests) ou alguma anomalia",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requests",
      +        "attempts",
      +        "anomalies",
      +        "unstable"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"
      +}
    • changedOutput schema / properties / provenance / required
      Previous value: -[
      -  "source",
      -  "source_url",
      -  "data_vintage",
      -  "retrieved_at",
      -  "citation",
      -  "license"
      -]New value: +[
      +  "source",
      +  "source_url",
      +  "data_vintage",
      +  "retrieved_at",
      +  "retrieval",
      +  "citation",
      +  "license"
      +]
  8. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  9. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the agent knows this is a safe, repeatable, external-source read. The description adds that results include names, components, and properties, but says nothing about result ordering, match quality, or paging behavior beyond what the schema documents. With annotations carrying the safety profile, this is adequate but not rich.

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 purpose sentence is front-loaded and the bullet list is scannable with concrete examples rather than filler. The final sentence on return values is somewhat redundant given an output schema exists, but it is brief and not harmful.

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

Completeness4/5

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

With annotations, a fully described three-parameter schema, and an output schema, the description only needs to establish purpose and use cases, which it does. The one meaningful gap is sibling differentiation among the many other terminology search tools, which would help an agent choose correctly.

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?

Schema description coverage is 100%, so query, offset, and max_results are already fully documented in the schema, including the next_offset chaining pattern and the 7500-result ceiling. The description adds no parameter-level meaning beyond the schema, which is the expected baseline at this coverage level.

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?

The description names a specific verb and resource: search LOINC for lab tests, clinical observations, and measurements, with concrete examples ("glucose", "hemoglobin"). It is clear what the tool does, but it does not distinguish itself from sibling vocabulary tools such as loinc_details, loinc_panels, or loinc_answers, so it stops short of a 5.

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?

Three bullet points give concrete use cases (finding codes for lab tests, clinical measurements, diagnostic observations), which is implied guidance on when to reach for it. There is no statement about when not to use it or which sibling to pick for detail lookup versus panel expansion, so the routing remains inferential.

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.