naftiko: 1.0.0-alpha2 info: label: Metronome — Billable metrics description: 'Metronome — Billable metrics. 6 operations. Lead operation: List all billable metrics. Self-contained Naftiko capability covering one Metronome business surface.' tags: - Metronome - Billable metrics created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: METRONOME_API_KEY: METRONOME_API_KEY capability: consumes: - type: http namespace: metronome-billable-metrics baseUri: https://api.metronome.com description: Metronome — Billable metrics business capability. Self-contained, no shared references. resources: - name: v1-billable-metrics path: /v1/billable-metrics operations: - name: listallbillablemetricsv1 method: GET description: List all billable metrics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: include_archived in: query type: boolean description: If true, the list of returned metrics will include archived metrics - name: v1-billable-metrics-archive path: /v1/billable-metrics/archive operations: - name: archivebillablemetricv1 method: POST description: Archive a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: v1-billable-metrics-create path: /v1/billable-metrics/create operations: - name: createbillablemetricv1v1 method: POST description: Create a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: v1-billable-metrics-billable_metric_id path: /v1/billable-metrics/{billable_metric_id} operations: - name: getbillablemetricv1 method: GET description: Get a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatebillablemetricv1 method: PUT description: Update a billable metric outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: v1-customers-customer_id-billable-metrics path: /v1/customers/{customer_id}/billable-metrics operations: - name: listbillablemetricsv1 method: GET description: Get billable metrics for a customer outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: on_current_plan in: query type: boolean description: If true, the list of metrics will be filtered to just ones that are on the customer's current plan - name: include_archived in: query type: boolean description: If true, the list of returned metrics will include archived metrics authentication: type: bearer token: '{{env.METRONOME_API_KEY}}' exposes: - type: rest namespace: metronome-billable-metrics-rest port: 8080 description: REST adapter for Metronome — Billable metrics. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v1/billable-metrics name: v1-billable-metrics description: REST surface for v1-billable-metrics. operations: - method: GET name: listallbillablemetricsv1 description: List all billable metrics call: metronome-billable-metrics.listallbillablemetricsv1 with: include_archived: rest.include_archived outputParameters: - type: object mapping: $. - path: /v1/v1/billable-metrics/archive name: v1-billable-metrics-archive description: REST surface for v1-billable-metrics-archive. operations: - method: POST name: archivebillablemetricv1 description: Archive a billable metric call: metronome-billable-metrics.archivebillablemetricv1 with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/billable-metrics/create name: v1-billable-metrics-create description: REST surface for v1-billable-metrics-create. operations: - method: POST name: createbillablemetricv1v1 description: Create a billable metric call: metronome-billable-metrics.createbillablemetricv1v1 with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/billable-metrics/{billable-metric-id} name: v1-billable-metrics-billable-metric-id description: REST surface for v1-billable-metrics-billable_metric_id. operations: - method: GET name: getbillablemetricv1 description: Get a billable metric call: metronome-billable-metrics.getbillablemetricv1 outputParameters: - type: object mapping: $. - method: PUT name: updatebillablemetricv1 description: Update a billable metric call: metronome-billable-metrics.updatebillablemetricv1 with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v1/customers/{customer-id}/billable-metrics name: v1-customers-customer-id-billable-metrics description: REST surface for v1-customers-customer_id-billable-metrics. operations: - method: GET name: listbillablemetricsv1 description: Get billable metrics for a customer call: metronome-billable-metrics.listbillablemetricsv1 with: on_current_plan: rest.on_current_plan include_archived: rest.include_archived outputParameters: - type: object mapping: $. - type: mcp namespace: metronome-billable-metrics-mcp port: 9090 transport: http description: MCP adapter for Metronome — Billable metrics. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-all-billable-metrics description: List all billable metrics hints: readOnly: true destructive: false idempotent: true call: metronome-billable-metrics.listallbillablemetricsv1 with: include_archived: tools.include_archived outputParameters: - type: object mapping: $. - name: archive-billable-metric description: Archive a billable metric hints: readOnly: false destructive: false idempotent: false call: metronome-billable-metrics.archivebillablemetricv1 with: body: tools.body outputParameters: - type: object mapping: $. - name: create-billable-metric description: Create a billable metric hints: readOnly: false destructive: false idempotent: false call: metronome-billable-metrics.createbillablemetricv1v1 with: body: tools.body outputParameters: - type: object mapping: $. - name: get-billable-metric description: Get a billable metric hints: readOnly: true destructive: false idempotent: true call: metronome-billable-metrics.getbillablemetricv1 outputParameters: - type: object mapping: $. - name: update-billable-metric description: Update a billable metric hints: readOnly: false destructive: false idempotent: true call: metronome-billable-metrics.updatebillablemetricv1 with: body: tools.body outputParameters: - type: object mapping: $. - name: get-billable-metrics-customer description: Get billable metrics for a customer hints: readOnly: true destructive: false idempotent: true call: metronome-billable-metrics.listbillablemetricsv1 with: on_current_plan: tools.on_current_plan include_archived: tools.include_archived outputParameters: - type: object mapping: $.