Skip to main content
Glama
nbrain-clinical-mena-mcp

nbrain-clinical-mena-mcp

Official

convert_hl7_oru_to_fhir_r4

Convert HL7 v2.5.1 ORU^R01 lab segments (MSH, PID, OBR, OBX) into an FHIR R4 DiagnosticReport Bundle for downstream interoperability.

Instructions

Translates HL7 v2.5.1 ORU^R01 laboratory segments (MSH|PID|OBR|OBX) into an HL7 FHIR R4 DiagnosticReport Bundle.

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": {
      "hl7_message": "<hl7_message>"
    },
    "name": "convert_hl7_oru_to_fhir_r4"
  }
}

Input Schema

NameRequiredDescriptionDefault
hl7_messageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It helpfully pins the accepted version (v2.5.1) and the produced artifact (R4 DiagnosticReport Bundle), but says nothing about failure behavior for malformed messages, unsupported segments, encoding/MLLP framing, or what resources the Bundle contains beyond the DiagnosticReport.

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 front-loaded sentence that names source format, version, segment composition, and output artifact with no filler. Every clause earns its place.

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

Completeness3/5

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

For a one-parameter pure-function converter with no output schema, the description covers the essential input/output contract. It falls short on the details an agent would need to call it successfully the first time: input encoding expectations and error behavior on invalid or truncated messages.

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 coverage is 0% and the single parameter hl7_message is undocumented in the schema, so the description must compensate. It partially does by enumerating expected segments (MSH|PID|OBR|OBX) and the version, but it does not clarify whether the value is raw pipe-delimited text, whether segment terminators/newlines are required, or whether MLLP framing must be stripped.

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?

States a specific verb (translates), a precise source format (HL7 v2.5.1 ORU^R01 with MSH|PID|OBR|OBX segments), and a precise target artifact (HL7 FHIR R4 DiagnosticReport Bundle). An agent can tell this apart from the sibling converters (cadastre FQS, LOINC lab unit) purely from the description.

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?

Usage is only implied: an agent infers 'use this when you have an ORU^R01 message and need FHIR R4 output.' There is no explicit when-to-use framing, no statement about what to do with non-ORU message types (e.g., ADT, ORM), and no mention of alternatives for other HL7 message types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.