Skip to main content
Glama

Nutricity calculators

calculate_homa_ir

Read-onlyIdempotent

Calculate the HOMA-IR insulin resistance index, HOMA-B% beta-cell function and QUICKI insulin sensitivity index. Use when the user provides fasting glucose and insulin lab values.

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": {
      "glucose": "<glucose>",
      "insulin": "<insulin>",
      "glucoseUnit": "<glucoseUnit>",
      "insulinUnit": "<insulinUnit>"
    },
    "name": "calculate_homa_ir"
  }
}

Input Schema

NameRequiredDescriptionDefault
glucoseYesFasting glucose value
insulinYesFasting insulin value
glucoseUnitYesGlucose unit: mg (mg/100ml) or mmol (mmol/L)
insulinUnitYesInsulin unit: ul (mIU/L) or pmol (pmol/L)

Output Schema

NameRequiredDescriptionDefault
bResultYesHOMA-B% (beta-cell function); null when glucose <= 63 mg/dL (3.5 mmol/L)
irResultYesHOMA-IR (insulin resistance index)
quickiResultYesQUICKI (insulin sensitivity index); higher = better sensitivity

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered structurally. The description adds the fasting requirement, which is a meaningful validity constraint on the computation, but says nothing about input validation failures, unit-mismatch handling, or interpretation of results beyond the output schema's scope.

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?

Two sentences, front-loaded with the computed indices and followed by the usage condition. No filler or restated title text.

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 stateless calculator with a fully described 4-parameter schema, full annotation coverage, and an output schema, the description contains everything needed to select and call it correctly. Only minor extras (e.g., formula assumptions or that results are clinically interpreted ratios) are absent, and the output schema covers return values.

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% with both unit enums documented in-schema, so the description's mention of 'fasting glucose and insulin lab values' adds nothing about format or unit selection. Baseline 3 is appropriate when the schema carries parameter meaning.

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 the specific outputs (HOMA-IR, HOMA-B%, QUICKI) and the resource domain (insulin resistance / beta-cell function / insulin sensitivity), which makes it easy to distinguish from generic calculators like calculate_bmi or calculate_tdee. It does not explicitly contrast with a close sibling such as calculate_tyg, but the named indices are specific enough that an agent can identify the tool.

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?

It gives an explicit trigger: 'Use when the user provides fasting glucose and insulin lab values,' which also implicitly encodes the fasting precondition. There is no guidance on when not to use it (e.g., non-fasting samples) and no named alternatives, so it stops short of a 5.

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