Skip to main content
Glama

NLM ICD-11 — Search Primary Diagnosis Codes

icd11.disease.primary_search
Read-onlyIdempotent

Search ICD-11 codes returning only primary (stem) diagnosis codes — filters out extension/modifier codes. Stem codes represent principal diagnoses and standalone conditions, while extension codes are qualifiers (severity, laterality, histopathology). Use this when you need clean primary diagnoses for: mortality coding, disease surveillance, DRG assignment, or primary diagnosis classification. No auth — US National Library of Medicine public domain, unlimited free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termsYesClinical search term to find primary (stem) ICD-11 diagnosis codes only — excludes extension/modifier codes (e.g. "cancer", "fever", "infection")
max_resultsNoMaximum number of primary (stem) codes to return (1-25). Default: 10

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already report readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds valuable context beyond annotations: the filtering behavior (primary/stem only) and the no-auth, public-domain, unlimited-free characteristics. It does not describe error cases or rate limits, but with annotations carrying the safe-read signal, this is adequate.

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?

Three sentences with zero filler: first sentence states the core behavior, second clarifies the code-type distinction and usage contexts, third covers auth and availability. The most important decision-relevant information is front-loaded and every sentence earns its place.

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 an output schema present, the description need not explain return values. It covers purpose, filtering semantics, use cases, and access characteristics. Combined with the rich annotations and 100% schema coverage, nothing an agent needs to call this tool 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%, so the schema already fully documents both parameters (terms and max_results) with detailed descriptions. The tool description reinforces the filtering behavior but does not add meaning beyond what the schema provides. Baseline of 3 is appropriate.

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 clearly states a specific verb (search), resource (ICD-11 codes), and a distinctive scope: returning only primary (stem) diagnosis codes while filtering out extension/modifier codes. It further explains what stem vs. extension codes are, making the tool's role unambiguous and distinct from the sibling icd11.disease.search.

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 description explicitly names use cases (mortality coding, disease surveillance, DRG assignment, primary diagnosis classification) where the filtered output is needed. It implies but does not explicitly name the alternative tools (e.g., icd11.disease.search) or state 'do not use when extension codes are needed', which would be slightly stronger. Still, the guidance is clear enough for an agent to choose this tool selectively.

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.