Skip to main content
Glama

Nutricity calculators

calculate_lab_unit_conversion

Read-onlyIdempotent

Convert a lab value between conventional and SI units: glucose, cholesterol, triglycerides (mg/dL ↔ mmol/L), creatinine and uric acid (mg/dL ↔ µmol/L), urea and BUN, 25-OH vitamin D (ng/mL ↔ nmol/L), ferritin, insulin (µIU/mL ↔ pmol/L, factor 6.945 as in HOMA-IR; the newer harmonised value is 6.00) and HbA1c (% ↔ mmol/mol).

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": {
      "analyte": "<analyte>",
      "value": "<value>",
      "unit": "<unit>"
    },
    "name": "calculate_lab_unit_conversion"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitYesUnit of value. glucose/cholesterol/triglycerides/urea/bun: mg/dL or mmol/L; creatinine/uric-acid: mg/dL or umol/L; vitamin-d: ng/mL or nmol/L; ferritin: ng/mL or ug/L; insulin: uIU/mL or pmol/L; hba1c: % or mmol/mol
valueYesValue to convert
analyteYesAnalyte. cholesterol covers total, LDL, HDL and non-HDL; bun is blood urea nitrogen; urea is urea itself (Italian "azotemia")

Output Schema

NameRequiredDescriptionDefault
unitYesInput unit
valueYesInput value
analyteYesAnalyte converted
convertedUnitYesUnit of convertedValue
convertedValueYesValue in the other unit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so safety is covered. The description adds value beyond that by disclosing a conversion-factor choice ('factor 6.945 as in HOMA-IR; the newer harmonised value is 6.00'), which affects reproducibility and is not visible in the annotations. It stops short of stating rounding or precision behavior, but the presence of an output schema lowers the burden.

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?

One front-loaded sentence stating the general operation followed by a compact enumeration of supported pairs; no filler or marketing language. The parenthetical factor note is dense but relevant, though the long list makes it slightly harder to scan than a bulleted breakdown would be.

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 an output schema, full annotation coverage, and 100% schema description coverage, the description carries little remaining burden. It still omits what happens on an unsupported analyte/unit combination (error vs. silent fallback) and any precision/rounding contract, which are the main residual gaps for a numeric conversion tool.

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 coverage is 100%, so the baseline is 3, and the description largely mirrors the schema's analyte/unit mapping. It earns an extra point for the insulin factor disclosure, which gives the agent information about how the 'insulin' analyte parameter is actually computed and warns of a competing harmonised factor.

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 opens with a specific verb and resource ('Convert a lab value between conventional and SI units') and then enumerates exactly which analytes and unit pairs are supported. An agent can immediately tell this is a unit-conversion utility rather than a risk score or derived-metric calculator like its siblings.

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

Usage Guidelines3/5

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

Usage is implied by the enumerated analyte/unit pairs, which tells the agent what inputs are in scope. However, there is no explicit when-to-use or when-not guidance, and no routing toward related siblings such as calculate_hba1c_eag (HbA1c to eAG) or calculate_homa_ir, which an agent might reasonably confuse with the insulin conversion offered here.

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.

Resources