Skip to main content
Glama

Ucum

ucum
Read-onlyIdempotent

"Unit of measure code for [X]" / "standard UCUM unit for [Y]" / "mg/dL code", search UCUM (the Unified Code for Units of Measure, used by FHIR, LOINC, and most modern health-IT systems). Returns codes like "mg/dL", "[in_i]" (inch). Use when normalizing lab result units or rendering measurements.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "count": 3,
      "terms": "mg/dL"
    },
    "name": "ucum"
  }
}

Input Schema

NameRequiredDescriptionDefault
dfNoComma-separated display fields to use in the `displays` array. Default varies per table; usually the canonical name.
efNoComma-separated extra fields to include per match. Field names vary per table; check NLM docs at clinicaltables.nlm.nih.gov.
countNoMaximum matches to return. Default 7, max 500. Use 1-3 for typeahead UX, 20-50 for browsing.
termsYesSearch query, prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: "mg/dL".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / count / description
      Previous value: -"Maximum matches to return. Default 7, max 500. Use 1–3 for typeahead UX, 20–50 for browsing."New value: +"Maximum matches to return. Default 7, max 500. Use 1-3 for typeahead UX, 20-50 for browsing."
    • changedInput schema / properties / terms / description
      Previous value: -"Search query — prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"mg/dL\"."New value: +"Search query, prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"mg/dL\"."
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "count": 3,
      +    "terms": "mg/dL"
      +  }
      +]
  3. Changed7 schema fields changed
    • addedInput schema / properties / count / default
      Added value: +7
    • addedInput schema / properties / count / description
      Added value: +"Maximum matches to return. Default 7, max 500. Use 1–3 for typeahead UX, 20–50 for browsing."
    • addedInput schema / properties / count / maximum
      Added value: +500
    • addedInput schema / properties / count / minimum
      Added value: +1
    • addedInput schema / properties / df / description
      Added value: +"Comma-separated display fields to use in the `displays` array. Default varies per table; usually the canonical name."
    • addedInput schema / properties / ef / description
      Added value: +"Comma-separated extra fields to include per match. Field names vary per table; check NLM docs at clinicaltables.nlm.nih.gov."
    • addedInput schema / properties / terms / description
      Added value: +"Search query — prefix/contains match against canonical names. Whitespace-split into AND tokens. Example: \"mg/dL\"."
  4. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered without the description. The description adds value by showing the return shape ("codes like \"mg/dL\", \"[in_i]\" (inch)"), which matters because there is no output schema, but it says nothing about match ordering, ranking, or how partial matches are surfaced.

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 capability, the standards context, and the use case are all packed into roughly two sentences with no filler. The three leading slash-separated quoted templates are slightly opaque as an opening, but they are compact and act as query-pattern examples rather than padding.

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?

With four fully documented parameters and no output schema, the description supplies the missing piece by illustrating return values and the domain vocabulary. What remains absent — result ordering, handling of ambiguous unit strings, and any relationship to the loinc sibling — is a modest gap rather than a blocker for correct invocation.

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 df, ef, count and terms are all documented in the schema itself. The quoted query templates ("Unit of measure code for [X]", "mg/dL code") hint at how to phrase the terms argument, but they are cryptic and add only marginal meaning beyond the schema's own example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("search UCUM") and defines the standard in-line ("the Unified Code for Units of Measure, used by FHIR, LOINC, and most modern health-IT systems"), so the agent knows exactly what corpus is being searched. It does not explicitly distinguish itself from terminology siblings such as loinc or icd10cm, which keeps it out of 5 territory.

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?

"Use when normalizing lab result units or rendering measurements" gives a concrete triggering context for invocation. It offers no when-not guidance and no named alternative for adjacent needs (e.g., lab test names vs. units), so the routing is clear but not exhaustive.

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.