Skip to main content
Glama

Catenix: Lab Analyzer & EHR Connectivity

Check lab QC values against Westgard rules

check_qc_westgard
Read-onlyIdempotent

Use when someone has quality control (QC) results for a lab or point-of-care test and wants to know whether they break Westgard rules or how they look on a Levey-Jennings chart (e.g. 'do these control values fail any Westgard rules?', 'check my QC: mean 5.0, SD 0.1, values ...', 'is this a 2-2s or 4-1s violation?'). Takes control values in run order plus the target mean and SD (or computes them from the values if the user asks) and evaluates 1-2s (warning), 1-3s, 2-2s, R-4s, 4-1s and 10x. Returns z-scores, the rule hits for each point and a plain summary, and draws a Levey-Jennings chart in ChatGPT and Claude. Up to 500 values. QC statistics only: not a clinical interpretation of any patient result.

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": {
      "values": "<values>"
    },
    "name": "check_qc_westgard"
  }
}

Input Schema

NameRequiredDescriptionDefault
sdNoTarget SD for this control lot and level.
meanNoTarget mean for this control lot and level.
levelNoControl level, e.g. 'level 1'.
unitsNoUnits of the values.
valuesYesControl values in run order, oldest first.
analyteNoTest or analyte name, e.g. 'glucose'.
compute_from_valuesNoTrue only if the user asks to compute the mean and SD from the values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, closed-world, non-destructive behavior, and the description adds genuinely new traits: a hard cap of 500 values, the option to compute mean/SD from the values when the user asks, the exact rule set evaluated (1-2s warning, 1-3s, 2-2s, R-4s, 4-1s, 10x), and platform-dependent chart rendering in ChatGPT and Claude. Nothing contradicts the annotations, and the computational (non-mutating) nature is consistent with readOnlyHint=true.

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?

Front-loaded with the trigger condition and example phrasings, then capabilities, then the exclusion. It is dense but every sentence carries information; the example utterances are the only mildly verbose element, and they earn their place by anchoring intent matching.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so: z-scores, per-point rule hits, a plain summary, and a rendered Levey-Jennings chart. Combined with the 500-value limit, the rule list, and the scope exclusion, an agent has everything needed to call it correctly and set expectations.

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, but the description adds real meaning on top: values must be in run order, mean and SD are target statistics for the control lot, and compute_from_values should be set only when the user asks for derived statistics. It does not explain the optional descriptive fields (analyte, level, units), though their schema descriptions already handle that.

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 opening clause names a concrete verb ('check'), a concrete resource ('quality control results for a lab or point-of-care test') and a concrete method ('Westgard rules'), and adds Levey-Jennings charting as the secondary output. None of the sibling tools (setup planning, connectivity, decoding, capability lookup) could be confused with it.

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

Usage Guidelines5/5

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

Explicit trigger conditions are given with three realistic user phrasings ('do these control values fail any Westgard rules?', 'check my QC: mean 5.0, SD 0.1...', 'is this a 2-2s or 4-1s violation?'). A boundary is also stated: 'QC statistics only: not a clinical interpretation of any patient result', which tells the agent when to stop and route elsewhere.

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