Skip to main content
Glama

Loinc

loinc
Read-onlyIdempotent

"LOINC code for [lab test]" / "standard code for blood test [X]" / "lab result identifier lookup" / "normalize lab name [Y]", search LOINC lab test codes (Logical Observation Identifiers Names and Codes, universal lab test identifiers). Returns codes like "2093-3 Cholesterol [Mass/Vol] Ser/Plas". Use when normalizing lab results across institutions.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "terms": "hemoglobin A1c"
    },
    "name": "loinc"
  }
}

Input Schema

NameRequiredDescriptionDefault
dfNoComma-separated display fields to use in the `displays` array. Default varies per table; usually the canonical name.
efNoComma-separated extra fields to include per match. Field names vary per table; check NLM docs at clinicaltables.nlm.nih.gov.
countNoMaximum matches to return. Default 7, max 500. Use 1-3 for typeahead UX, 20-50 for browsing.
termsYesSearch query, prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: "cholesterol".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / count / description
      Previous value: -"Maximum matches to return. Default 7, max 500. Use 1–3 for typeahead UX, 20–50 for browsing."New value: +"Maximum matches to return. Default 7, max 500. Use 1-3 for typeahead UX, 20-50 for browsing."
    • changedInput schema / properties / terms / description
      Previous value: -"Search query — prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"cholesterol\"."New value: +"Search query, prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"cholesterol\"."
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "terms": "hemoglobin A1c"
      +  },
      +  {
      +    "count": 10,
      +    "terms": "cholesterol"
      +  }
      +]
  3. Changed7 schema fields changed
    • addedInput schema / properties / count / default
      Added value: +7
    • addedInput schema / properties / count / description
      Added value: +"Maximum matches to return. Default 7, max 500. Use 1–3 for typeahead UX, 20–50 for browsing."
    • addedInput schema / properties / count / maximum
      Added value: +500
    • addedInput schema / properties / count / minimum
      Added value: +1
    • addedInput schema / properties / df / description
      Added value: +"Comma-separated display fields to use in the `displays` array. Default varies per table; usually the canonical name."
    • addedInput schema / properties / ef / description
      Added value: +"Comma-separated extra fields to include per match. Field names vary per table; check NLM docs at clinicaltables.nlm.nih.gov."
    • addedInput schema / properties / terms / description
      Added value: +"Search query — prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"cholesterol\"."
  4. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint, so the safety profile is covered. The description adds value by disclosing that results are universal identifiers returned as formatted code-plus-name strings, but says nothing about rate limits, total result caps, or ranking behavior for multiple matches.

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

Conciseness3/5

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

The opening is a run of quoted user phrasings joined by slashes, which delays the actual purpose statement and reads as keyword stuffing. The core sentence and the output example are efficient, but front-loading is weak and the quoted fragments could be trimmed.

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 no output schema, the description usefully sketches the return format via a sample code string. Combined with 100% schema coverage and full annotation coverage, an agent has enough to call the tool correctly; only multi-match ordering and paging behavior remain unstated.

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 every parameter (terms, count, df, ef) is already documented, including defaults and the count range advice. The description only reinforces `terms` wording through sample queries, adding little beyond the schema, so the baseline 3 applies.

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 states a specific verb and resource ("search LOINC lab test codes") and expands the acronym, so the agent knows exactly what is queried. It also shows a concrete return example ("2093-3 Cholesterol [Mass/Vol] Ser/Plas"). It doesn't explicitly contrast itself with code-system siblings like icd10cm or icd9cm, but the "lab test" framing does most of that work.

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?

It gives a clear usage context: "Use when normalizing lab results across institutions," and the leading quoted phrasings illustrate the kinds of user requests this tool answers. There is no explicit exclusion (e.g., "for diagnoses use icd10cm"), so the guidance is strong but not complete.

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.