naftiko: 1.0.0-alpha2 info: label: m3ter API — Charge description: 'm3ter API — Charge. 5 operations. Lead operation: List Charges. Self-contained Naftiko capability covering one M3ter business surface.' tags: - M3ter - Charge created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: M3TER_API_KEY: M3TER_API_KEY capability: consumes: - type: http namespace: m3ter-charge baseUri: https://api.m3ter.com description: m3ter API — Charge business capability. Self-contained, no shared references. resources: - name: organizations-orgId-charges path: /organizations/{orgId}/charges operations: - name: listcharges method: GET description: List Charges outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the organization required: true - name: pageSize in: query type: integer description: Number of Charges to retrieve per page - name: nextToken in: query type: string description: nextToken for multi page retrievals - name: accountId in: query type: string description: List Charge items for the Account UUID - name: entityType in: query type: string description: List Charge items for the EntityType - name: entityId in: query type: string description: List Charge items for the Entity UUID - name: billDate in: query type: string description: List Charge items for the Bill Date - name: ids in: query type: array description: List of Charge UUIDs to retrieve - name: scheduleId in: query type: string description: List Charge items for the Schedule UUID - name: createcharge method: POST description: Create Charge outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the organization required: true - name: body in: body type: object description: Request body (JSON). required: true - name: organizations-orgId-charges-id path: /organizations/{orgId}/charges/{id} operations: - name: getcharge method: GET description: Retrieve Charge outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the organization required: true - name: id in: path type: string description: The UUID of the Charge to retrieve. required: true - name: updatecharge method: PUT description: Update Charge outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the organization required: true - name: id in: path type: string description: The UUID of the Charge to update. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deletecharge method: DELETE description: Delete Charge outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the organization required: true - name: id in: path type: string description: The UUID of the Charge to update. required: true authentication: type: bearer token: '{{env.M3TER_API_KEY}}' exposes: - type: rest namespace: m3ter-charge-rest port: 8080 description: REST adapter for m3ter API — Charge. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/organizations/{orgid}/charges name: organizations-orgid-charges description: REST surface for organizations-orgId-charges. operations: - method: GET name: listcharges description: List Charges call: m3ter-charge.listcharges with: orgId: rest.orgId pageSize: rest.pageSize nextToken: rest.nextToken accountId: rest.accountId entityType: rest.entityType entityId: rest.entityId billDate: rest.billDate ids: rest.ids scheduleId: rest.scheduleId outputParameters: - type: object mapping: $. - method: POST name: createcharge description: Create Charge call: m3ter-charge.createcharge with: orgId: rest.orgId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/charges/{id} name: organizations-orgid-charges-id description: REST surface for organizations-orgId-charges-id. operations: - method: GET name: getcharge description: Retrieve Charge call: m3ter-charge.getcharge with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: updatecharge description: Update Charge call: m3ter-charge.updatecharge with: orgId: rest.orgId id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletecharge description: Delete Charge call: m3ter-charge.deletecharge with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: m3ter-charge-mcp port: 9090 transport: http description: MCP adapter for m3ter API — Charge. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-charges description: List Charges hints: readOnly: true destructive: false idempotent: true call: m3ter-charge.listcharges with: orgId: tools.orgId pageSize: tools.pageSize nextToken: tools.nextToken accountId: tools.accountId entityType: tools.entityType entityId: tools.entityId billDate: tools.billDate ids: tools.ids scheduleId: tools.scheduleId outputParameters: - type: object mapping: $. - name: create-charge description: Create Charge hints: readOnly: false destructive: false idempotent: false call: m3ter-charge.createcharge with: orgId: tools.orgId body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-charge description: Retrieve Charge hints: readOnly: true destructive: false idempotent: true call: m3ter-charge.getcharge with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $. - name: update-charge description: Update Charge hints: readOnly: false destructive: false idempotent: true call: m3ter-charge.updatecharge with: orgId: tools.orgId id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: delete-charge description: Delete Charge hints: readOnly: false destructive: true idempotent: true call: m3ter-charge.deletecharge with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $.