Skip to main content
Glama

Compose a Functional Concept Across Terminologies

compose_functioning
Read-onlyIdempotent

Map one functional concept to linked ICF categories, LOINC measures, and ICD-11 conditions, including WHO-linked ICD-11 counterparts, for clinical record mapping.

Instructions

Code ONE functional concept ("walking speed", "climbing stairs", "using transportation") in the three systems a clinical record needs, each in its role: the function or activity (ICF), the measure (LOINC observation) and the condition (ICD-11), plus the ICD-11 entity the WHO itself ties to each ICF category.

Returns four roles:

  • functioning: ICF categories, each with icd11_counterpart — the ICD-11 chapter V entity the WHO links to it (d450 Walking → VW13 Walking, the same WHO entity). This link is READ FROM THE WHO (same_entity or index_term), never guessed; null when the WHO ties none.

  • measures: LOINC observations ("Walking speed 24 hour mean Calculated"); retired codes dropped.

  • conditions: ICD-11 conditions ("Difficulty in walking"), outside chapter V.

Everything except icd11_counterpart is a lexical suggestion (the find_equivalent score: match_score, match_type, matched_label) — review it with a person. Every candidate carries its FHIR coding. Searches in English.

When NOT to use: to search one terminology, use its own search tool; for the same concept across ICD-11, LOINC, RxNorm, MeSH and ICF as one ranked list, use find_equivalent; to pick codes from a value set you already have, use match_value_set.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "term": "<term>"
    },
    "name": "compose_functioning"
  }
}

Input Schema

NameRequiredDescriptionDefault
termYesA functional concept in English (e.g. "walking speed", "climbing stairs", "using transportation").
limitNoCandidates returned per role (1-5, default 3).

Output Schema

NameRequiredDescriptionDefault
noteYesHow to read the roles: which links are WHO-given and which are lexical suggestions.
termYesThe functional concept as submitted.
measuresYesMeasure role: LOINC observations that measure the concept.
conditionsYesCondition role: ICD-11 conditions lexically matched to the concept.
provenanceYesOne provenance block per upstream source that contributed to this response (licenses are never merged; each block carries the origin diagnostics of ITS source)
attributionYesCanonical source URLs of this response (attribution list)
functioningYesFunctioning role: ICF categories naming the function or activity.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent and open-world, so the safety bar is low, but the description adds substantial provenance detail beyond them: `icd11_counterpart` is READ FROM THE WHO (`same_entity`/`index_term`) and never guessed, is null when no tie exists, retired LOINC codes are dropped, everything else is a lexical suggestion to be reviewed by a person, and searching is English-only. What it does not cover is whether results are cached or how the underlying search handles zero-hit queries.

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

Conciseness4/5

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

Front-loaded with a bolded ONE and the three-role framing, then bulleted per role, so structure matches the mental model of the caller. It is long and partly restates what the output schema already declares (four named roles, field names), which costs a point, but the per-role provenance notes are not filler.

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?

An output schema exists and annotations carry the safety profile, so the description only needs to add the parts structured fields cannot express — provenance of the ICD-11 link, the lexical-vs-authoritative distinction, retired-code handling, and the excluded/implicit scale. It covers all of those for a two-parameter, multi-terminology harmonization tool.

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 coverage is 100% and both parameters carry their own descriptions including the 1-5 limit range, so the schema does the heavy lifting. The description restates the same concept examples ('walking speed', 'climbing stairs') and the English assumption already present in the schema, adding essentially no new parameter meaning. 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?

Specific verb and resource ('Code ONE functional concept') with explicit scope: three terminologies, each in its role (ICF function, LOINC measure, ICD-11 condition), plus the WHO-linked counterpart. The 'Returns four roles' block enumerates the outputs, so an agent can tell exactly what it gets versus the single-terminology search siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'When NOT to use' block names three concrete alternatives with the condition that selects each: single-terminology search tools, find_equivalent for one ranked cross-terminology list, match_value_set for picking codes from an existing value set. Nothing is left to inference about when this tool is the wrong choice.

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