naftiko: 1.0.0-alpha2 info: label: Lean Data API — Transactions description: 'Lean Data — retrieve transaction history for a linked account, plus manual data refresh management.' tags: - Lean - Data - Transactions created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: LEAN_API_TOKEN: LEAN_API_TOKEN capability: consumes: - type: http namespace: data-transactions baseUri: https://api2.leantech.me description: Lean Data API — Transactions business capability backed by Lean Technologies APIs. resources: - name: account-transactions path: /data/v2/accounts/{account_id}/transactions operations: - name: getTransactions method: GET description: Lean Get Transactions outputRawFormat: json inputParameters: - name: account_id in: path type: string required: true - name: start_date in: query type: string required: false - name: end_date in: query type: string required: false outputParameters: - name: result type: object value: $. - name: refreshes path: /data/v2/refreshes operations: - name: triggerDataRefresh method: POST description: Lean Trigger Manual Data Refresh outputRawFormat: json inputParameters: - name: body in: body type: object required: true outputParameters: - name: result type: object value: $. - name: getDataRefreshes method: GET description: Lean Get Data Refreshes outputRawFormat: json inputParameters: [] outputParameters: - name: result type: object value: $. - name: refresh-status path: /data/v2/refreshes/{refresh_id} operations: - name: getDataRefreshStatus method: GET description: Lean Get Data Refresh Status outputRawFormat: json inputParameters: - name: refresh_id in: path type: string required: true outputParameters: - name: result type: object value: $. authentication: type: apikey key: Authorization value: 'Bearer {{env.LEAN_API_TOKEN}}' placement: header exposes: - type: rest namespace: data-transactions-rest port: 8080 description: REST adapter for Lean Data API — Transactions. resources: - path: /v1/data/v2/accounts/{account_id}/transactions name: account-transactions operations: - method: GET name: getTransactions description: Lean Get Transactions call: data-transactions.getTransactions with: account_id: rest.path.account_id start_date: rest.query.start_date end_date: rest.query.end_date - path: /v1/data/v2/refreshes name: refreshes operations: - method: POST name: triggerDataRefresh description: Lean Trigger Manual Data Refresh call: data-transactions.triggerDataRefresh with: body: rest.body - method: GET name: getDataRefreshes description: Lean Get Data Refreshes call: data-transactions.getDataRefreshes with: {} - path: /v1/data/v2/refreshes/{refresh_id} name: refresh-status operations: - method: GET name: getDataRefreshStatus description: Lean Get Data Refresh Status call: data-transactions.getDataRefreshStatus with: refresh_id: rest.path.refresh_id - type: mcp namespace: data-transactions-mcp port: 9090 transport: http description: MCP adapter for Lean Data API — Transactions. tools: - name: lean-gettransactions description: Lean Get Transactions hints: readOnly: true destructive: false idempotent: true call: data-transactions.getTransactions with: account_id: tools.account_id start_date: tools.start_date end_date: tools.end_date - name: lean-triggerdatarefresh description: Lean Trigger Manual Data Refresh hints: readOnly: false destructive: false idempotent: false call: data-transactions.triggerDataRefresh with: body: tools.body - name: lean-getdatarefreshes description: Lean Get Data Refreshes hints: readOnly: true destructive: false idempotent: true call: data-transactions.getDataRefreshes with: {} - name: lean-getdatarefreshstatus description: Lean Get Data Refresh Status hints: readOnly: true destructive: false idempotent: true call: data-transactions.getDataRefreshStatus with: refresh_id: tools.refresh_id