naftiko: 1.0.0-alpha2 info: label: Modern Treasury — LedgerAccount description: 'Modern Treasury — LedgerAccount. 5 operations. Lead operation: list ledger_accounts. Self-contained Naftiko capability covering one Modern Treasury business surface.' tags: - Modern Treasury - LedgerAccount 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-ledgeraccount baseUri: http://localhost:3000 description: Modern Treasury — LedgerAccount business capability. Self-contained, no shared references. resources: - name: api-ledger_accounts path: /api/ledger_accounts operations: - name: listledgeraccounts method: GET description: list ledger_accounts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: after_cursor in: query type: string - name: per_page in: query type: integer - name: ledger_id in: query type: string - name: external_id in: query type: string - name: currency in: query type: string - name: balances in: query type: object description: Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps. The lower bound is incl - name: pending_balance_amount in: query type: object description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. - name: posted_balance_amount in: query type: object description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. - name: available_balance_amount in: query type: object description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. - name: normal_balance in: query type: string - name: created_at in: query type: object description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use cr - name: updated_at in: query type: object description: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the updated at timestamp. For example, for all times after Jan 1 2000 12:00 UTC, use up - name: ledger_account_category_id in: query type: string - name: createledgeraccount method: POST description: create ledger_account 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-ledger_accounts-id path: /api/ledger_accounts/{id} operations: - name: getledgeraccount method: GET description: get ledger_account outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ledger account id (UUID) or external_id required: true - name: balances in: query type: object description: Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps. The lower bound is incl - name: updateledgeraccount method: PATCH description: update ledger_account outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: deleteledgeraccount method: DELETE description: delete ledger_account 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-ledgeraccount-rest port: 8080 description: REST adapter for Modern Treasury — LedgerAccount. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/ledger-accounts name: api-ledger-accounts description: REST surface for api-ledger_accounts. operations: - method: GET name: listledgeraccounts description: list ledger_accounts call: modern-treasury-ledgeraccount.listledgeraccounts with: after_cursor: rest.after_cursor per_page: rest.per_page ledger_id: rest.ledger_id external_id: rest.external_id currency: rest.currency balances: rest.balances pending_balance_amount: rest.pending_balance_amount posted_balance_amount: rest.posted_balance_amount available_balance_amount: rest.available_balance_amount normal_balance: rest.normal_balance created_at: rest.created_at updated_at: rest.updated_at ledger_account_category_id: rest.ledger_account_category_id outputParameters: - type: object mapping: $. - method: POST name: createledgeraccount description: create ledger_account call: modern-treasury-ledgeraccount.createledgeraccount with: Idempotency-Key: rest.Idempotency-Key body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/ledger-accounts/{id} name: api-ledger-accounts-id description: REST surface for api-ledger_accounts-id. operations: - method: GET name: getledgeraccount description: get ledger_account call: modern-treasury-ledgeraccount.getledgeraccount with: id: rest.id balances: rest.balances outputParameters: - type: object mapping: $. - method: PATCH name: updateledgeraccount description: update ledger_account call: modern-treasury-ledgeraccount.updateledgeraccount with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteledgeraccount description: delete ledger_account call: modern-treasury-ledgeraccount.deleteledgeraccount outputParameters: - type: object mapping: $. - type: mcp namespace: modern-treasury-ledgeraccount-mcp port: 9090 transport: http description: MCP adapter for Modern Treasury — LedgerAccount. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-ledger-accounts description: list ledger_accounts hints: readOnly: true destructive: false idempotent: true call: modern-treasury-ledgeraccount.listledgeraccounts with: after_cursor: tools.after_cursor per_page: tools.per_page ledger_id: tools.ledger_id external_id: tools.external_id currency: tools.currency balances: tools.balances pending_balance_amount: tools.pending_balance_amount posted_balance_amount: tools.posted_balance_amount available_balance_amount: tools.available_balance_amount normal_balance: tools.normal_balance created_at: tools.created_at updated_at: tools.updated_at ledger_account_category_id: tools.ledger_account_category_id outputParameters: - type: object mapping: $. - name: create-ledger-account description: create ledger_account hints: readOnly: false destructive: false idempotent: false call: modern-treasury-ledgeraccount.createledgeraccount with: Idempotency-Key: tools.Idempotency-Key body: tools.body outputParameters: - type: object mapping: $. - name: get-ledger-account description: get ledger_account hints: readOnly: true destructive: false idempotent: true call: modern-treasury-ledgeraccount.getledgeraccount with: id: tools.id balances: tools.balances outputParameters: - type: object mapping: $. - name: update-ledger-account description: update ledger_account hints: readOnly: false destructive: false idempotent: true call: modern-treasury-ledgeraccount.updateledgeraccount with: body: tools.body outputParameters: - type: object mapping: $. - name: delete-ledger-account description: delete ledger_account hints: readOnly: false destructive: true idempotent: true call: modern-treasury-ledgeraccount.deleteledgeraccount outputParameters: - type: object mapping: $.