naftiko: 1.0.0-alpha2 info: label: Togai Apis — Credits description: 'Togai Apis — Credits. 5 operations. Lead operation: Credit Balance for Account. Self-contained Naftiko capability covering one Togai business surface.' tags: - Togai - Credits created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TOGAI_API_KEY: TOGAI_API_KEY capability: consumes: - type: http namespace: togai-credits baseUri: https://api.togai.com description: Togai Apis — Credits business capability. Self-contained, no shared references. resources: - name: accounts-account_id-credit_balance path: /accounts/{account_id}/credit_balance operations: - name: creditbalanceforaccount method: GET description: Credit Balance for Account outputRawFormat: json outputParameters: - name: result type: object value: $. - name: credits path: /credits operations: - name: listcredits method: GET description: List Credits outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createcredit method: POST description: Grant Credit outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: credits-credit_id path: /credits/{credit_id} operations: - name: getcreditdetails method: GET description: Get Credit Details outputRawFormat: json outputParameters: - name: result type: object value: $. - name: credits-credit_id-void path: /credits/{credit_id}/void operations: - name: voidcredit method: POST description: Void Credit outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.TOGAI_API_KEY}}' exposes: - type: rest namespace: togai-credits-rest port: 8080 description: REST adapter for Togai Apis — Credits. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/accounts/{account-id}/credit-balance name: accounts-account-id-credit-balance description: REST surface for accounts-account_id-credit_balance. operations: - method: GET name: creditbalanceforaccount description: Credit Balance for Account call: togai-credits.creditbalanceforaccount outputParameters: - type: object mapping: $. - path: /v1/credits name: credits description: REST surface for credits. operations: - method: GET name: listcredits description: List Credits call: togai-credits.listcredits outputParameters: - type: object mapping: $. - method: POST name: createcredit description: Grant Credit call: togai-credits.createcredit with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/credits/{credit-id} name: credits-credit-id description: REST surface for credits-credit_id. operations: - method: GET name: getcreditdetails description: Get Credit Details call: togai-credits.getcreditdetails outputParameters: - type: object mapping: $. - path: /v1/credits/{credit-id}/void name: credits-credit-id-void description: REST surface for credits-credit_id-void. operations: - method: POST name: voidcredit description: Void Credit call: togai-credits.voidcredit outputParameters: - type: object mapping: $. - type: mcp namespace: togai-credits-mcp port: 9090 transport: http description: MCP adapter for Togai Apis — Credits. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: credit-balance-account description: Credit Balance for Account hints: readOnly: true destructive: false idempotent: true call: togai-credits.creditbalanceforaccount outputParameters: - type: object mapping: $. - name: list-credits description: List Credits hints: readOnly: true destructive: false idempotent: true call: togai-credits.listcredits outputParameters: - type: object mapping: $. - name: grant-credit description: Grant Credit hints: readOnly: false destructive: false idempotent: false call: togai-credits.createcredit with: body: tools.body outputParameters: - type: object mapping: $. - name: get-credit-details description: Get Credit Details hints: readOnly: true destructive: false idempotent: true call: togai-credits.getcreditdetails outputParameters: - type: object mapping: $. - name: void-credit description: Void Credit hints: readOnly: false destructive: false idempotent: false call: togai-credits.voidcredit outputParameters: - type: object mapping: $.