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
| Name | Required | Description | Default |
|---|---|---|---|
| study_instance_uid | Yes | Study Instance UID to retrieve. | |
| destination_ae_title | Yes | Destination AE title to send images to. | |
| series_instance_uid | No | Optional 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}") - src/dicom_hl7_mcp/tools/pacs_connectivity.py:120-137 (registration)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.", },