Skip to main content
Glama

Search LOINC

loinc_search
Read-onlyIdempotent

Find standardized LOINC codes for lab tests, clinical measurements, and observations. Resolve ambiguous terminologies and support interoperability.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term (test name, keyword, or partial LOINC code)
max_resultsNoMaximum number of results (1-100). Default: 25

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
queryYes
provenanceYesProvenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license
attributionYesCanonical source URLs of this response (attribution list)
shown_countYes
total_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.9.1
    • removedOutput schema / properties / items / items / properties / external_copyright_notice / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / external_copyright_notice / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / provenance / properties / data_vintage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / data_vintage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / provenance / properties / license / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / license / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed5 schema fields changedv1.8.0
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "Canonical source URLs of this response (attribution list)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / items / items / properties / external_copyright_notice
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / items / items / required
      Previous value: -[
      -  "loinc_num",
      -  "long_common_name",
      -  "short_name",
      -  "component",
      -  "property",
      -  "time_aspect",
      -  "system",
      -  "scale_type",
      -  "method_type",
      -  "class",
      -  "status"
      -]New value: +[
      +  "loinc_num",
      +  "long_common_name",
      +  "short_name",
      +  "component",
      +  "property",
      +  "time_aspect",
      +  "system",
      +  "scale_type",
      +  "method_type",
      +  "class",
      +  "status",
      +  "external_copyright_notice"
      +]
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Provenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license",
      +  "properties": {
      +    "citation": {
      +      "description": "Ready-to-use citation/attribution string",
      +      "type": "string"
      +    },
      +    "data_vintage": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Version/release of the data as exposed by the source; null when not exposed"
      +    },
      +    "license": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "License / legal regime of the data"
      +    },
      +    "retrieved_at": {
      +      "description": "Real instant of the upstream extraction (ISO-8601, UTC). Responses served from cache keep the ORIGINAL fetch instant.",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Official upstream source of this data",
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "description": "Canonical URL of the source (API base or dataset release)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "source_url",
      +    "data_vintage",
      +    "retrieved_at",
      +    "citation",
      +    "license"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "total_count",
      -  "shown_count",
      -  "items"
      -]New value: +[
      +  "query",
      +  "total_count",
      +  "shown_count",
      +  "items",
      +  "provenance",
      +  "attribution"
      +]
  3. Changed5 schema fields changedv1.5.7
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / shown_count / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / shown_count / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / total_count / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / total_count / minimum
      Added value: +-9007199254740991
  4. First observedv1.2.1

TDQS

A4/5.0
Behavior3/5

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

With readOnlyHint, openWorldHint, and idempotentHint already declared, the description does not need to restate the safety profile. It adds useful context by stating the return content (codes, names, components, properties) but does not go into pagination or result-selection behavior beyond the schema's max_results.

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

Conciseness5/5

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

The definition is tightly structured: a scoped one-sentence summary, three short intent bullets, and a one-sentence return description. There is no filler or repetition of schema details, and the key purpose appears immediately.

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?

For a low-complexity search tool with a simple two-parameter schema and an output schema, the description covers what the agent needs to call it correctly. It could have mentioned loinc_details or loinc_panels as follow-ups for richer code information, but the absence is not a significant gap.

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 coverage is 100%, so the schema already documents both query and max_results. The description adds only example query terms and clarifies that partial LOINC codes are valid search terms, a small increment over the schema rather than a substantive contribution.

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 identifies a specific verb ('Search'), a specific resource ('LOINC'), and the content domain (laboratory tests, clinical observations, measurements). The opening sentence plus the return-value sentence distinguish this from lookup/detail siblings like loinc_details and loinc_panels without needing to open the schema.

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 'Use this tool to' bullets explicitly list the intended cases: finding LOINC codes for lab tests, clinical measurements, and diagnostic observations. It does not name exclusions or mention alternative siblings such as loinc_details or loinc_panels, so the usage guidance is clear but not fully differentiated.

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