Skip to main content
Glama
NyxToolsDev

DICOM/HL7/FHIR Interoperability MCP Server

parse_hl7_message

Convert raw HL7 v2.x messages into human-readable format with field names, values, and explanations for segments like MSH, PID, PV1, OBR, and OBX.

Instructions

Parse an HL7 v2.x message into human-readable format. Returns parsed segments with field names, values, table lookups, and explanations. Supports MSH, PID, PV1, OBR, OBX, ORC, DG1, AL1, NK1, IN1, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesRaw HL7 v2.x message string (pipe-delimited). Segments separated by \r, \n, or \r\n.
Behavior4/5

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

With no annotations provided, the description carries the full burden and succeeds in detailing the transformation behavior: it performs 'table lookups' and provides 'explanations' beyond raw parsing, and specifies supported segments. It implies read-only behavior ('Parse... Returns'), though it could explicitly state safety properties or error handling for invalid messages.

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?

Three sentences with zero waste: sentence 1 defines the core action, sentence 2 describes the return value, and sentence 3 lists specific segment support. Information is front-loaded with the essential verb and resource immediately stated.

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?

Despite lacking an output schema, the description compensates by detailing the return structure ('parsed segments with field names, values, table lookups, and explanations'). The input parameter is fully documented in the schema. Minor gap: no explicit read-only declaration given the absence of safety annotations.

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 100%, providing the baseline. The description aligns with the schema by mentioning 'HL7 v2.x message' but does not add parameter-specific semantics beyond the schema's details about pipe-delimiters and segment separators. The segment list (MSH, PID, etc.) relates to capability rather than parameter semantics.

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 uses a specific verb ('Parse') with clear resource ('HL7 v2.x message') and output format ('human-readable'). It distinguishes from siblings like 'validate_hl7_message' (validation vs parsing) and 'explain_hl7_segment' (single segment vs full message) by emphasizing full message parsing with specific segment examples (MSH, PID, etc.).

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?

The description implies usage through the output specification ('Returns parsed segments...'), but lacks explicit when-to-use guidance versus alternatives. It does not indicate whether to use 'validate_hl7_message' first, or when 'explain_hl7_segment' might be preferable for single-segment analysis.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NyxToolsDev/dicom-hl7-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server