naftiko: 1.0.0-alpha2 info: label: CMS AB2D Bulk FHIR Export description: Initiate and consume bulk FHIR exports from the CMS AB2D API for Medicare Part D Prescription Drug Plan sponsors. Asynchronous $export, status polling, and NDJSON download. tags: - CMS - Medicare - FHIR - BulkData - PartD - AB2D created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: AB2D_ACCESS_TOKEN: AB2D_ACCESS_TOKEN capability: consumes: - type: http namespace: ab2d-bulk-fhir baseUri: https://api.ab2d.cms.gov/api/v2 description: CMS AB2D bulk FHIR export surface. resources: - name: patient-export path: /Patient/$export operations: - name: exportpatient method: GET description: Initiate a bulk export of ExplanationOfBenefit resources for the contract's enrolled beneficiaries. outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } - name: contract-export path: /Group/{contractId}/$export operations: - name: exportcontract method: GET description: Initiate a contract-scoped bulk export. inputParameters: - { name: contractId, in: path, type: string, required: true } outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } - name: job-status path: /Job/{jobUuid}/$status operations: - name: getjobstatus method: GET description: Poll an AB2D bulk export job for status and output manifest. inputParameters: - { name: jobUuid, in: path, type: string, required: true } outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } - name: canceljob method: DELETE description: Cancel an AB2D bulk export job. inputParameters: - { name: jobUuid, in: path, type: string, required: true } outputRawFormat: json outputParameters: - { name: result, type: object, value: $. } authentication: type: bearer value: '{{env.AB2D_ACCESS_TOKEN}}' placement: header exposes: - type: mcp namespace: ab2d-mcp port: 9090 transport: http description: MCP adapter for AB2D bulk FHIR export. tools: - name: cms-ab2d-export-patient description: Initiate an AB2D bulk export of beneficiary ExplanationOfBenefit resources. hints: { readOnly: false, destructive: false, idempotent: false } call: ab2d-bulk-fhir.exportpatient outputParameters: - { type: object, mapping: $. } - name: cms-ab2d-export-contract description: Initiate a contract-scoped AB2D bulk export. hints: { readOnly: false, destructive: false, idempotent: false } call: ab2d-bulk-fhir.exportcontract outputParameters: - { type: object, mapping: $. } - name: cms-ab2d-get-job-status description: Poll an AB2D bulk export job for status. hints: { readOnly: true, destructive: false, idempotent: true } call: ab2d-bulk-fhir.getjobstatus outputParameters: - { type: object, mapping: $. } - name: cms-ab2d-cancel-job description: Cancel an AB2D bulk export job. hints: { readOnly: false, destructive: true, idempotent: true } call: ab2d-bulk-fhir.canceljob outputParameters: - { type: object, mapping: $. }