Skip to main content
Glama
NyxToolsDev

DICOM/HL7/FHIR Interoperability MCP Server

pacs_retrieve

Retrieve medical images from PACS systems using C-MOVE protocol and send them to specified destinations for clinical workflows and data sharing.

Instructions

[Premium] Initiate C-MOVE to send images from PACS to a destination AE title. This moves real images across the network — use with care. Only available via DIMSE protocol. Requires DICOM_HL7_PACS_ALLOW_RETRIEVE=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
study_instance_uidYesStudy Instance UID to retrieve.
destination_ae_titleYesDestination AE title to send images to.
series_instance_uidNoOptional Series Instance UID for series-level retrieve.

Implementation Reference

  • The handler function `_handle_retrieve` implements the logic for `pacs_retrieve` by checking permissions and calling `pacs_move`.
    def _handle_retrieve(arguments: dict) -> str:
        """Handle pacs_retrieve tool call."""
        # Double-gate: check PACS_ALLOW_RETRIEVE
        if not PACS_ALLOW_RETRIEVE:
            return (
                "C-MOVE retrieve is disabled by default for safety.\n\n"
                "This operation moves real DICOM images across the network.\n"
                "To enable, set: DICOM_HL7_PACS_ALLOW_RETRIEVE=true\n\n"
                "Only enable this if you understand the implications and have\n"
                "permission to move images within your environment."
            )
    
        study_uid = arguments["study_instance_uid"]
        dest_ae = arguments["destination_ae_title"]
        series_uid = arguments.get("series_instance_uid", "")
    
        result = pacs_move(study_uid, dest_ae, series_uid)
    
        lines = [
            "PACS Retrieve (C-MOVE)",
            "=" * 50,
            f"Status:      {'SUCCESS' if result.success else 'FAILED'}",
            f"Study UID:   {study_uid}",
            f"Destination: {dest_ae}",
            f"Message:     {result.message}",
        ]
        if result.num_completed:
            lines.append(f"Completed:   {result.num_completed}")
        if result.num_failed:
            lines.append(f"Failed:      {result.num_failed}")
  • Registration of the `pacs_retrieve` tool definition.
    Tool(
        name="pacs_retrieve",
        description=(
            "[Premium] Initiate C-MOVE to send images from PACS to a destination AE title. "
            "This moves real images across the network — use with care. "
            "Only available via DIMSE protocol. Requires DICOM_HL7_PACS_ALLOW_RETRIEVE=true."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "study_instance_uid": {
                    "type": "string",
                    "description": "Study Instance UID to retrieve.",
                },
                "destination_ae_title": {
                    "type": "string",
                    "description": "Destination AE title to send images to.",
                },

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