Skip to main content
Glama

Convert lab units

convert_units
Read-onlyIdempotent

Convert a lab value between US conventional and SI units for 30 common analytes (glucose, cholesterol, testosterone, vitamin D, …) using published factors; hemoglobin A1c uses the NGSP↔IFCC master equation and also returns estimated average glucose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesThe numeric value to convert
analyteYesAnalyte slug or name, e.g. 'glucose', 'total-cholesterol', 'testosterone', 'vitamin-d', 'a1c'
directionNoDefault toSI (US → SI)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
errorNo
inputNo
factorNo
methodNo
outputNo
analyteNo
biomarkerUrlNo
estimatedAverageGlucoseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "analyte": {
      +      "type": "string"
      +    },
      +    "biomarkerUrl": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "estimatedAverageGlucose": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "unit": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "factor": {
      +      "type": "number"
      +    },
      +    "input": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "unit": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "method": {
      +      "type": "string"
      +    },
      +    "note": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "output": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "unit": {
      +          "type": "string"
      +        },
      +        "value": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds genuinely useful behavior: published conversion factors, the NGSP↔IFCC master equation for HbA1c, and the extra estimated average glucose return. These details go beyond the annotations without contradicting them.

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?

The description is a single dense sentence that front-loads the main action and scope, then adds a valuable special case. Every clause contributes useful information and there is no filler.

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 simple read-only conversion tool with an output schema and 3 parameters, the description covers core usage and the key HbA1c exception. Minor gaps are the lack of a full list of supported analytes and no statement about behavior for unsupported ones, but the schema examples mitigate this.

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?

The input schema covers 100% of parameters with descriptions for value, analyte (with examples), and direction (with enum and default). The description only reinforces the US/SI framing and adds the A1c output note, so it does not meaningfully augment the schema.

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 states exactly what the tool does: converts a lab value between US conventional and SI units for 30 common analytes. It is clearly about unit conversion, which separates it from calculation/interpretation siblings, though it does not explicitly name or exclude any sibling.

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?

The description implies when to use the tool by defining its scope, and it adds a special rule for hemoglobin A1c. However, it never states when not to use it or points to an alternative, such as calculate_free_testosterone for derived values.

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