Skip to main content
Glama

Catenix: Lab Analyzer & EHR Connectivity

Decode an HL7, ASTM or POCT1-A2 lab message

decode_lab_message
Read-onlyIdempotent

Use when someone pastes a message from a lab analyzer, LIS, middleware or EHR interface and wants to know what it says, what a field means, or why the receiving system rejects it (e.g. 'what does this HL7 ORU mean?', 'why is my EHR rejecting this result message?', 'decode this ASTM output from my analyzer', 'is this POCT1-A2 OBS message valid?'). Accepts HL7 v2 (ORU, ORM, ACK, ADT and others), ASTM E1394 / LIS2-A2 records (H, P, O, R, C, Q, L, with or without E1381 framing and checksums) and POCT1-A2 XML. Returns a field-by-field breakdown (segment or record, field number, name, value, meaning, what an EHR or LIS usually expects) and flags common problems: wrong delimiters or segment terminators, missing MSH-9 or OBX-3 codes, numeric results without units, non-standard abnormal flags, non-LOINC codes, bad checksums. Likely patient identifiers (HL7 PID-3, PID-5, PID-7, PID-11, PID-13 and similar, ASTM patient ID, name and birthdate, POCT1-A2 patient elements) are masked in the output. Tell the user to paste only test or de-identified messages. Nothing is stored or logged. Does not interpret results.

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": {
      "message": "<message>"
    },
    "name": "decode_lab_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoLeave as auto unless the user says which format it is.
messageYesThe message text exactly as pasted (max 20 KB). Test or de-identified messages only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which already declare read-only, idempotent, non-destructive, closed-world): it discloses output shape (field-by-field breakdown with segment, field number, name, value, meaning, expected value), the class of problems flagged (delimiter errors, missing MSH-9/OBX-3, unitless results, bad checksums), PHI masking behavior, and that nothing is stored or logged. That is the privacy and data-handling context an agent needs before sending pasted message text.

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, then capabilities, then output, then privacy guidance — a sensible order with no filler sentences. It is a single dense paragraph, so the output-shape and privacy content is harder to scan than it would be as short structured lines, but nothing is redundant.

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: it describes the per-field breakdown and the problem flags. Combined with the privacy/masking note, the de-identification instruction, and the explicit scope limit, an agent has everything needed to call it and to advise the user correctly.

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: it spells out what falls under each format value (HL7 v2 segments, ASTM record types H/P/O/R/C/Q/L with or without E1381 framing and checksums, POCT1-A2 XML), which helps an agent decide whether 'auto' will suffice. The 20 KB limit is only in the schema, not repeated here, which is appropriate.

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?

Names a specific verb (decode) and resource (lab message) and enumerates the exact supported dialects: HL7 v2 ORU/ORM/ACK/ADT, ASTM E1394/LIS2-A2 records, and POCT1-A2 XML. It also states a clear non-goal ("Does not interpret results"), so an agent can tell this apart from analysis or setup siblings without opening the schema.

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?

Provides concrete trigger scenarios in the user's own words ("what does this HL7 ORU mean?", "why is my EHR rejecting this result message?") plus a clear exclusion (does not interpret results). It stops short of naming an alternative tool to route to when the request is out of scope, but the sibling catalog offers no obvious substitute for decoding.

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