Skip to main content
Glama

Search ICD-11 Codes

search_icd11_codes
Read-onlyIdempotent

Find ICD-11 diagnosis codes by searching descriptions with keywords. Returns matching codes with descriptions and Foundation URIs for medical coding.

Instructions

Search the ICD-11 code directory by description text. Returns matching codes with descriptions and Foundation URIs. Useful for finding specific ICD-11 diagnosis codes by keyword.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query to match against ICD-11 code descriptions
limitNoMaximum results (1-100, default: 10)

Implementation Reference

  • src/tools.ts:142-176 (registration)
    The search_icd11_codes tool is registered in this block within registerTools. It validates the input (query and limit) and calls the client.icd11.search method, formatting the result using formatICD11SearchResponse.
    server.registerTool(
      "search_icd11_codes",
      {
        title: "Search ICD-11 Codes",
        description:
          "Search the ICD-11 code directory by description text. " +
          "Returns matching codes with descriptions and Foundation URIs. " +
          "Useful for finding specific ICD-11 diagnosis codes by keyword.",
        inputSchema: {
          query: z.string().min(1).describe("Search query to match against ICD-11 code descriptions"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .default(10)
            .describe("Maximum results (1-100, default: 10)"),
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
        },
      },
      async (args) => {
        try {
          const result = await client.icd11.search(args.query, {
            limit: args.limit,
          });
          return ok(formatICD11SearchResponse(result));
        } catch (error) {
          return fail(error);
        }
      }
    );
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering safety behavior. The description adds valuable functional context by specifying the return format: 'Returns matching codes with descriptions and Foundation URIs,' compensating for the lack of an output schema. No contradictions with annotations.

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 description consists of three efficient sentences, each earning its place: (1) action and method, (2) return value disclosure, (3) usage context. It is front-loaded with the core action and contains no redundant or filler text.

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?

Given the presence of annotations (covering safety/idempotency), 100% schema coverage, and the explicit mention of return values (codes, descriptions, Foundation URIs) in the description, the tool is well-documented. Minor gap: pagination behavior or fuzzy vs exact matching semantics are not specified.

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?

With 100% schema description coverage, the input parameters are fully documented in the schema itself (query description covers the search text, limit covers the range). The description reinforces this with phrases like 'by description text' and 'by keyword,' but does not add syntax details or examples beyond the schema definitions, warranting the baseline score for high-coverage schemas.

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 explicitly states the tool 'Search[es] the ICD-11 code directory by description text' - a specific verb + resource + method combination. It distinguishes from sibling tools like get_icd11_code by specifying this is a search-by-text operation rather than a direct lookup.

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 provides clear usage context stating it is 'Useful for finding specific ICD-11 diagnosis codes by keyword,' indicating when to use the tool. However, it does not explicitly name alternative tools (e.g., 'use get_icd11_code if you already know the exact code') or state exclusion criteria.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fcggamou/autoicd-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server