Skip to main content
Glama

Look up a code in the FSE dictionaries

lookup_code
Read-onlyIdempotent

Find codes or display names in LOINC, ICD9-CM, ATC, AIC, or AdministrativeGender and get the code system OID for @codeSystem in FSE 2.0 CDA2 documents.

Instructions

Looks up a code, or searches display names, in the terminologies used by FSE 2.0 CDA2 documents (LOINC, ICD9-CM, ATC, AIC, AdministrativeGender) and returns the code system OID to use in @codeSystem.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results.
queryYesAn exact code (for example "11502-2") or words to search in the display name.
systemYesCode system to search.

Output Schema

NameRequiredDescriptionDefault
noteYes
systemYes
resultsYes
sampleDataYes
totalMatchesYes
codeSystemOidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds that the result is the code-system OID usable in @codeSystem, but says nothing about empty-result behavior, ambiguity when multiple matches exist, or the effect of the limit cap.

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?

A single front-loaded sentence led by the verb, with the terminology enumeration confined to one parenthetical. No filler or repetition.

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 full schema coverage, complete annotations, and an output schema that documents the return shape, the description supplies everything needed to invoke the tool correctly. Only edge-case behavior (no matches, ambiguous queries) is left unstated, which is a minor 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 description coverage is 100%, so all three parameters are already documented, including the exact-code-vs-display-name dual mode of query and the maximum of 25 results. The description's restatement of the code-system list mirrors the schema enum and adds no new syntax or format guidance, so the baseline 3 applies.

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 names a specific verb (looks up / searches) and resource (codes and display names in FSE terminologies), enumerates the exact code systems, and states the concrete return value (the code system OID for @codeSystem). This clearly separates it from siblings like validate_cda, explain_schematron_error, and generate_sample_cda.

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 states the two usage modes - exact code lookup or display-name search - and the downstream purpose (obtaining the OID for @codeSystem), which tells an agent when the tool is relevant. It stops short of naming exclusions or pointing to an alternative tool when a lookup fails.

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