Skip to main content
Glama

convert_icd_mesh

Read-onlyIdempotent

Convert a complete ICD-9-CM or ICD-10-CM code to a MeSH term, or map a MeSH term back to ICD codes, using the specified direction for curated crosswalk lookups.

Instructions

Query the curated ICD/MeSH crosswalk in one explicit direction.

Use icd_to_mesh with one complete ICD-9-CM or ICD-10-CM code, or mesh_to_icd with a MeSH term. The returned mapping is a limited convenience crosswalk, not a substitute for a current licensed UMLS terminology service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
directionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.7
    • addedInput schema / properties / direction / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "icd_to_mesh",
      +      "mesh_to_icd"
      +    ],
      +    "title": "Direction",
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^[ \\t\\r\\n]*(?:[iI][cC][dD]_[tT][oO]_[mM][eE][sS][hH]|[mM][eE][sS][hH]_[tT][oO]_[iI][cC][dD])[ \\t\\r\\n]*$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / direction / enum
      Removed value: -[
      -  "icd_to_mesh",
      -  "mesh_to_icd"
      -]
    • removedInput schema / properties / direction / type
      Removed value: -"string"
  2. Changed7 schema fields changedv0.7.2
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / code
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Code"
      -}
    • addedInput schema / properties / direction
      Added value: +{
      +  "enum": [
      +    "icd_to_mesh",
      +    "mesh_to_icd"
      +  ],
      +  "title": "Direction",
      +  "type": "string"
      +}
    • removedInput schema / properties / mesh_term
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Mesh Term"
      -}
    • addedInput schema / properties / value
      Added value: +{
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "title": "Value",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "direction",
      +  "value"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "convert_icd_meshOutput",
      -  "type": "object"
      -}New value: +null
  3. First observedv0.5.16

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds genuinely new context by disclosing the mapping's reliability limits — a "limited convenience crosswalk, not a substitute for a current licensed UMLS terminology service." Useful, though it says nothing about return shape or handling of unmapped codes.

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 tight sentences, front-loaded with the purpose, then usage per direction, then the reliability caveat. No filler; every sentence earns its place.

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?

For a 2-parameter conversion tool with no output schema, the description covers purpose, per-direction input semantics, and data limitations. It leaves the return format only loosely implied ("the returned mapping"), which is a minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it does: it explains what ``value`` must contain for each ``direction`` (a complete ICD code vs. a MeSH term) and names both direction literals. It could add format examples, but it meaningfully compensates for the empty schema.

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 states a specific verb and resource: "Query the curated ICD/MeSH crosswalk in one explicit direction." This is unambiguous and, since no sibling tool performs code/terminology conversion, an agent can immediately identify its role.

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 explicitly routes the agent per mode: use ``icd_to_mesh`` with a complete ICD-9-CM/ICD-10-CM code, or ``mesh_to_icd`` with a MeSH term. It stops short of a when-not to use the tool (beyond the UMLS caveat), so it falls just short of the top tier.

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