naftiko: 1.0.0-alpha2 info: label: Modern Treasury — Return description: 'Modern Treasury — Return. 3 operations. Lead operation: list returns. Self-contained Naftiko capability covering one Modern Treasury business surface.' tags: - Modern Treasury - Return created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MODERN_TREASURY_API_KEY: MODERN_TREASURY_API_KEY capability: consumes: - type: http namespace: modern-treasury-return baseUri: http://localhost:3000 description: Modern Treasury — Return business capability. Self-contained, no shared references. resources: - name: api-returns path: /api/returns operations: - name: listreturns method: GET description: list returns outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: after_cursor in: query type: string - name: per_page in: query type: integer - name: internal_account_id in: query type: string description: Specify `internal_account_id` if you wish to see returns to/from a specific account. - name: counterparty_id in: query type: string description: Specify `counterparty_id` if you wish to see returns that occurred with a specific counterparty. - name: returnable_id in: query type: string description: The ID of a valid returnable. Must be accompanied by `returnable_type`. - name: returnable_type in: query type: string description: One of `payment_order`, `reversal`, or `incoming_payment_detail`. Must be accompanied by `returnable_id`. - name: createreturn method: POST description: create return outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Idempotency-Key in: header type: string description: This key should be something unique, preferably something like an UUID. - name: body in: body type: object description: Request body (JSON). required: false - name: api-returns-id path: /api/returns/{id} operations: - name: getreturn method: GET description: show return outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: basic username: '{{env.MODERN_TREASURY_USER}}' password: '{{env.MODERN_TREASURY_PASS}}' exposes: - type: rest namespace: modern-treasury-return-rest port: 8080 description: REST adapter for Modern Treasury — Return. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/returns name: api-returns description: REST surface for api-returns. operations: - method: GET name: listreturns description: list returns call: modern-treasury-return.listreturns with: after_cursor: rest.after_cursor per_page: rest.per_page internal_account_id: rest.internal_account_id counterparty_id: rest.counterparty_id returnable_id: rest.returnable_id returnable_type: rest.returnable_type outputParameters: - type: object mapping: $. - method: POST name: createreturn description: create return call: modern-treasury-return.createreturn with: Idempotency-Key: rest.Idempotency-Key body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/returns/{id} name: api-returns-id description: REST surface for api-returns-id. operations: - method: GET name: getreturn description: show return call: modern-treasury-return.getreturn outputParameters: - type: object mapping: $. - type: mcp namespace: modern-treasury-return-mcp port: 9090 transport: http description: MCP adapter for Modern Treasury — Return. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-returns description: list returns hints: readOnly: true destructive: false idempotent: true call: modern-treasury-return.listreturns with: after_cursor: tools.after_cursor per_page: tools.per_page internal_account_id: tools.internal_account_id counterparty_id: tools.counterparty_id returnable_id: tools.returnable_id returnable_type: tools.returnable_type outputParameters: - type: object mapping: $. - name: create-return description: create return hints: readOnly: false destructive: false idempotent: false call: modern-treasury-return.createreturn with: Idempotency-Key: tools.Idempotency-Key body: tools.body outputParameters: - type: object mapping: $. - name: show-return description: show return hints: readOnly: true destructive: false idempotent: true call: modern-treasury-return.getreturn outputParameters: - type: object mapping: $.