naftiko: 1.0.0-alpha2 info: label: Lago API documentation — Billable_metrics description: 'Lago API documentation — Billable_metrics. 6 operations. Lead operation: Lago Create a billable metric. Self-contained Naftiko capability covering one Lago business surface.' tags: - Lago - Billable_metrics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: LAGO_API_KEY: LAGO_API_KEY capability: consumes: - type: http namespace: lago-billable-metrics baseUri: https://api.getlago.com/api/v1 description: Lago API documentation — Billable_metrics business capability. Self-contained, no shared references. resources: - name: billable_metrics path: /billable_metrics operations: - name: createbillablemetric method: POST description: Lago Create a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: findallbillablemetrics method: GET description: Lago List all billable metrics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: billable_metrics-evaluate_expression path: /billable_metrics/evaluate_expression operations: - name: evaluatebillablemetricexpression method: POST description: Lago Evaluate an expression for a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: billable_metrics-code path: /billable_metrics/{code} operations: - name: updatebillablemetric method: PUT description: Lago Update a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: destroybillablemetric method: DELETE description: Lago Delete a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. - name: findbillablemetric method: GET description: Lago Retrieve a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. authentication: type: bearer token: '{{env.LAGO_API_KEY}}' exposes: - type: rest namespace: lago-billable-metrics-rest port: 8080 description: REST adapter for Lago API documentation — Billable_metrics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/billable-metrics name: billable-metrics description: REST surface for billable_metrics. operations: - method: POST name: createbillablemetric description: Lago Create a billable metric call: lago-billable-metrics.createbillablemetric with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: findallbillablemetrics description: Lago List all billable metrics call: lago-billable-metrics.findallbillablemetrics outputParameters: - type: object mapping: $. - path: /v1/billable-metrics/evaluate-expression name: billable-metrics-evaluate-expression description: REST surface for billable_metrics-evaluate_expression. operations: - method: POST name: evaluatebillablemetricexpression description: Lago Evaluate an expression for a billable metric call: lago-billable-metrics.evaluatebillablemetricexpression with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/billable-metrics/{code} name: billable-metrics-code description: REST surface for billable_metrics-code. operations: - method: PUT name: updatebillablemetric description: Lago Update a billable metric call: lago-billable-metrics.updatebillablemetric with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: destroybillablemetric description: Lago Delete a billable metric call: lago-billable-metrics.destroybillablemetric outputParameters: - type: object mapping: $. - method: GET name: findbillablemetric description: Lago Retrieve a billable metric call: lago-billable-metrics.findbillablemetric outputParameters: - type: object mapping: $. - type: mcp namespace: lago-billable-metrics-mcp port: 9090 transport: http description: MCP adapter for Lago API documentation — Billable_metrics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: lago-create-billable-metric description: Lago Create a billable metric hints: readOnly: false destructive: false idempotent: false call: lago-billable-metrics.createbillablemetric with: body: tools.body outputParameters: - type: object mapping: $. - name: lago-list-all-billable-metrics description: Lago List all billable metrics hints: readOnly: true destructive: false idempotent: true call: lago-billable-metrics.findallbillablemetrics outputParameters: - type: object mapping: $. - name: lago-evaluate-expression-billable-metric description: Lago Evaluate an expression for a billable metric hints: readOnly: false destructive: false idempotent: false call: lago-billable-metrics.evaluatebillablemetricexpression with: body: tools.body outputParameters: - type: object mapping: $. - name: lago-update-billable-metric description: Lago Update a billable metric hints: readOnly: false destructive: false idempotent: true call: lago-billable-metrics.updatebillablemetric with: body: tools.body outputParameters: - type: object mapping: $. - name: lago-delete-billable-metric description: Lago Delete a billable metric hints: readOnly: false destructive: true idempotent: true call: lago-billable-metrics.destroybillablemetric outputParameters: - type: object mapping: $. - name: lago-retrieve-billable-metric description: Lago Retrieve a billable metric hints: readOnly: true destructive: false idempotent: true call: lago-billable-metrics.findbillablemetric outputParameters: - type: object mapping: $.