Skip to main content
Glama

LOINC Answer Lists

loinc_answers
Read-onlyIdempotent

Retrieve valid answer options, answer codes (LA...), display order, and scores for a LOINC questionnaire item to validate data entry and scoring.

Instructions

Get the list of valid answers for a LOINC questionnaire item.

Use this tool to:

  • Find valid response options for survey questions

  • Get answer codes (LA…) for data entry validation

  • Get the item scores of scored instruments (e.g. PHQ-9: "Not at all" = 0 … "Nearly every day" = 3)

Returns each answer with its LOINC answer code (LA…), text, display order and score (null when the list has none). A valid LOINC code without a defined answer list (e.g. a numeric lab such as 2339-0) returns an empty list; a code LOINC does not know returns a "not found" error.

Only applicable to LOINC codes that represent questions with defined answer sets. For the questions of a whole questionnaire, use loinc_panels; to find a code by name, use loinc_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loinc_numYesLOINC number (e.g., "2339-0")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
answersYes
loinc_numYes
provenanceYesProvenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license
attributionYesCanonical source URLs of this response (attribution list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • addedOutput schema / properties / answers / items / properties / answer_code / description
      Added value: +"LOINC answer code (LA…), e.g. \"LA18976-3\"."
    • addedOutput schema / properties / answers / items / properties / score
      Added value: +{
      +  "description": "Numeric score for scored instruments (PHQ-9 items: 0-3); null when the answer list carries none.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / answers / items / properties / sequence / description
      Added value: +"Display order in the answer list (1-based)."
    • changedOutput schema / properties / answers / items / required
      Previous value: -[
      -  "sequence",
      -  "answer_code",
      -  "answer_string"
      -]New value: +[
      +  "sequence",
      +  "answer_code",
      +  "answer_string",
      +  "score"
      +]
  2. Changed3 schema fields changedv1.15.0
    • 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"
      +]
  3. Changed1 schema field changedv1.11.0
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed4 schema fields changedv1.9.1
    • 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"
      +]
  5. Changed3 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 / 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: -[
      -  "loinc_num",
      -  "answers"
      -]New value: +[
      +  "loinc_num",
      +  "answers",
      +  "provenance",
      +  "attribution"
      +]
  6. Changed3 schema fields changedv1.5.7
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / answers / items / properties / sequence / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / answers / items / properties / sequence / minimum
      Added value: +-9007199254740991
  7. First observedv1.2.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds genuinely useful behavior beyond that: it discloses that a valid code with no answer list returns an empty list while an unknown code returns a 'not found' error, plus the score semantics for instruments. It does not discuss rate limits or auth, but those are less critical here.

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?

Front-loaded with the core purpose, then scannable bullets, then edge-case and routing notes. Slightly redundant between the bullet list and the prose, but every sentence carries information and none is filler.

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?

With one required parameter, full schema coverage, an output schema, and annotations covering safety, the remaining burden is edge-case and routing disclosure — both handled (empty list vs not-found error, sibling alternatives). Nothing an agent needs to invoke correctly is missing.

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% and the single loinc_num parameter is fully documented in the schema, so the baseline is 3. The description adds a domain constraint (only codes representing questions with defined answer sets), which is meaningful but really usage guidance rather than parameter syntax.

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?

States a specific verb and resource: 'Get the list of valid answers for a LOINC questionnaire item.' It clearly delineates the scope (question-level answer sets) and names the siblings it is not (loinc_panels, loinc_search), so an agent can select it without opening schemas.

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

Usage Guidelines5/5

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

Explicit 'Use this tool to' bullets give positive conditions, and the closing sentence gives exclusions plus alternatives: 'Only applicable to LOINC codes that represent questions with defined answer sets. For the questions of a whole questionnaire, use loinc_panels; to find a code by name, use loinc_search.' This is textbook when/when-not routing.

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