Skip to main content
Glama

Compose a Functional Concept Across Terminologies

compose_functioning
Read-onlyIdempotent

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; stem codes only — postcoordinated clusters ("PG50&XE3HC") are left out, build those with icd11_postcoordination.

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. Changed4 schema fields changed
    • addedOutput schema / properties / conditions / description
      Added value: +"Condition role: ICD-11 conditions lexically matched to the concept."
    • addedOutput schema / properties / functioning / description
      Added value: +"Functioning role: ICF categories naming the function or activity."
    • addedOutput schema / properties / measures / description
      Added value: +"Measure role: LOINC observations that measure the concept."
    • addedOutput schema / properties / term / description
      Added value: +"The functional concept as submitted."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, and the description still adds substantial behavior: which field is read from the WHO ('same_entity' or 'index_term') versus guessed, null semantics when no WHO link exists, that retired LOINC codes are dropped, and that clusters are excluded. It stops short of stating rate limits or pagination, and the return-format detail partly duplicates the output schema.

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?

The core purpose is front-loaded, then broken into a scannable role list followed by caveats and exclusions, which matches the reader's decision order. It is somewhat dense and repeats the WHO-link phrasing ('the same WHO entity') and restates role outputs the output schema likely covers, keeping it short of a 5.

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?

For a multi-terminology composition tool, the definition covers the role of each output group, the provenance vs. lexical-suggestion distinction, the human-review requirement, and all sibling alternatives. With an output schema present, no further return-value specification is owed, so nothing an agent needs to invoke it 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 coverage is 100%, so both parameters are already documented, including 'limit' as candidates per role with its 1-5 bound. The description's only added meaning is that term searches in English and that limit applies per role, which the schema already conveys — 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?

States a specific verb and resource ('Code ONE functional concept') and enumerates exactly the three roles produced (ICF function/activity, LOINC measure, ICD-11 condition) plus the WHO-linked ICD-11 counterpart. It also names the siblings it is not (find_equivalent, match_value_set, per-terminology search tools), so an agent can distinguish it without opening another schema.

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?

The explicit 'When NOT to use' block gives three conditions and the alternative for each: single-terminology search, cross-terminology ranked list via find_equivalent, and value-set matching via match_value_set. Additionally it routes postcoordinated cluster construction to icd11_postcoordination.

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.