Skip to main content
Glama

Nutricity calculators

calculate_tyg

Read-onlyIdempotent

Calculate the TyG (triglyceride-glucose) index, a surrogate marker of insulin resistance: Ln[triglycerides(mg/dL) × glucose(mg/dL) / 2]. Use when the user provides fasting triglycerides and fasting glucose; values in mmol/L are converted to mg/dL.

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": {
      "triglycerides": "<triglycerides>",
      "glucose": "<glucose>",
      "triglyceridesUnit": "<triglyceridesUnit>",
      "glucoseUnit": "<glucoseUnit>"
    },
    "name": "calculate_tyg"
  }
}

Input Schema

NameRequiredDescriptionDefault
glucoseYesFasting glucose value
glucoseUnitYesGlucose unit: mg (mg/dL) or mmol (mmol/L)
triglyceridesYesFasting triglycerides value
triglyceridesUnitYesTriglycerides unit: mg (mg/dL) or mmol (mmol/L)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/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 genuine behavioral detail beyond them by disclosing automatic unit conversion (mmol/L values are converted to mg/dL) and requiring fasting-state inputs. Return format is not described, but an output schema exists, so that omission is acceptable.

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?

A single dense sentence front-loads the purpose, embeds the formula, then states the usage condition and the unit-conversion caveat. Every clause carries information an agent needs; nothing is redundant with the schema.

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 present and all four required parameters fully documented, the description covers what an agent needs to invoke the tool correctly, including the unit-conversion edge case. It does not state the expected output range or interpretation of the resulting index, a minor gap for a clinical marker 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% with both unit enums documented, so the baseline is 3. The description goes beyond the schema by explaining what the unit parameters actually trigger (conversion to mg/dL) and by emphasizing that the values must be fasting, which adds interpretive meaning to the four required inputs.

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 names a specific verb and resource (calculate the TyG triglyceride-glucose index) and pins it down with the exact formula Ln[triglycerides(mg/dL) × glucose(mg/dL) / 2], so an agent knows precisely what quantity is produced and can distinguish it from other insulin-resistance calculators such as HOMA-IR.

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 states a clear trigger condition — 'Use when the user provides fasting triglycerides and fasting glucose' — which tells the agent when this tool applies. It gives no explicit exclusions or named alternatives, but for a single-purpose formula tool the positive condition is unambiguous.

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