naftiko: 1.0.0-alpha2 info: label: m3ter API — Account description: 'm3ter API — Account. 8 operations. Lead operation: List Accounts. Self-contained Naftiko capability covering one M3ter business surface.' tags: - M3ter - Account created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: M3TER_API_KEY: M3TER_API_KEY capability: consumes: - type: http namespace: m3ter-account baseUri: https://api.m3ter.com description: m3ter API — Account business capability. Self-contained, no shared references. resources: - name: organizations-orgId-accounts path: /organizations/{orgId}/accounts operations: - name: listaccounts method: GET description: List Accounts 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 accounts to retrieve per page. - name: nextToken in: query type: string description: '`nextToken` for multi-page retrievals.' - name: ids in: query type: array description: List of Account IDs to retrieve. - name: codes in: query type: array description: 'List of Account Codes to retrieve. ' - name: postaccount method: POST description: Create Account 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-accounts-search path: /organizations/{orgId}/accounts/search operations: - name: searchaccounts method: GET description: Search Accounts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the Organization. required: true - name: searchQuery in: query type: string description: 'Query for data using special syntax:' - name: fromDocument in: query type: integer description: '`fromDocument` for multi page retrievals.' - name: pageSize in: query type: integer description: Number of Accounts to retrieve per page. - name: operator in: query type: string description: Search Operator to be used while querying search. - name: sortBy in: query type: string description: Name of the parameter on which sorting is performed. Use any field available on the Account entity to sort by, such as `name`, `code`, and so on. - name: sortOrder in: query type: string description: Sorting order. - name: organizations-orgId-accounts-id path: /organizations/{orgId}/accounts/{id} operations: - name: getaccount method: GET description: Retrieve Account 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 Account to retrieve. required: true - name: putaccount method: PUT description: Update Account outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: orgId in: path type: string description: UUID of the Organization. The Organization represents your company as a direct customer of the m3ter service. required: true - name: id in: path type: string description: The UUID of the Account to update. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: deleteaccount method: DELETE description: Delete Account 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 Account to delete. required: true - name: organizations-orgId-accounts-id-children path: /organizations/{orgId}/accounts/{id}/children operations: - name: listaccountchildren method: GET description: List Account Children 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 Account to list children for. required: true - name: pageSize in: query type: integer - name: nextToken in: query type: string - name: organizations-orgId-accounts-id-enddatebillingentities path: /organizations/{orgId}/accounts/{id}/enddatebillingentities operations: - name: enddatebillingentitiesforaccount method: PUT description: End-date Account billing entities 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 Account. required: true - name: body in: body type: object description: Request body (JSON). required: true authentication: type: bearer token: '{{env.M3TER_API_KEY}}' exposes: - type: rest namespace: m3ter-account-rest port: 8080 description: REST adapter for m3ter API — Account. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/organizations/{orgid}/accounts name: organizations-orgid-accounts description: REST surface for organizations-orgId-accounts. operations: - method: GET name: listaccounts description: List Accounts call: m3ter-account.listaccounts with: orgId: rest.orgId pageSize: rest.pageSize nextToken: rest.nextToken ids: rest.ids codes: rest.codes outputParameters: - type: object mapping: $. - method: POST name: postaccount description: Create Account call: m3ter-account.postaccount with: orgId: rest.orgId body: rest.body outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/accounts/search name: organizations-orgid-accounts-search description: REST surface for organizations-orgId-accounts-search. operations: - method: GET name: searchaccounts description: Search Accounts call: m3ter-account.searchaccounts with: orgId: rest.orgId searchQuery: rest.searchQuery fromDocument: rest.fromDocument pageSize: rest.pageSize operator: rest.operator sortBy: rest.sortBy sortOrder: rest.sortOrder outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/accounts/{id} name: organizations-orgid-accounts-id description: REST surface for organizations-orgId-accounts-id. operations: - method: GET name: getaccount description: Retrieve Account call: m3ter-account.getaccount with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: putaccount description: Update Account call: m3ter-account.putaccount with: orgId: rest.orgId id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deleteaccount description: Delete Account call: m3ter-account.deleteaccount with: orgId: rest.orgId id: rest.id outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/accounts/{id}/children name: organizations-orgid-accounts-id-children description: REST surface for organizations-orgId-accounts-id-children. operations: - method: GET name: listaccountchildren description: List Account Children call: m3ter-account.listaccountchildren with: orgId: rest.orgId id: rest.id pageSize: rest.pageSize nextToken: rest.nextToken outputParameters: - type: object mapping: $. - path: /v1/organizations/{orgid}/accounts/{id}/enddatebillingentities name: organizations-orgid-accounts-id-enddatebillingentities description: REST surface for organizations-orgId-accounts-id-enddatebillingentities. operations: - method: PUT name: enddatebillingentitiesforaccount description: End-date Account billing entities call: m3ter-account.enddatebillingentitiesforaccount with: orgId: rest.orgId id: rest.id body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: m3ter-account-mcp port: 9090 transport: http description: MCP adapter for m3ter API — Account. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-accounts description: List Accounts hints: readOnly: true destructive: false idempotent: true call: m3ter-account.listaccounts with: orgId: tools.orgId pageSize: tools.pageSize nextToken: tools.nextToken ids: tools.ids codes: tools.codes outputParameters: - type: object mapping: $. - name: create-account description: Create Account hints: readOnly: false destructive: false idempotent: false call: m3ter-account.postaccount with: orgId: tools.orgId body: tools.body outputParameters: - type: object mapping: $. - name: search-accounts description: Search Accounts hints: readOnly: true destructive: false idempotent: true call: m3ter-account.searchaccounts with: orgId: tools.orgId searchQuery: tools.searchQuery fromDocument: tools.fromDocument pageSize: tools.pageSize operator: tools.operator sortBy: tools.sortBy sortOrder: tools.sortOrder outputParameters: - type: object mapping: $. - name: retrieve-account description: Retrieve Account hints: readOnly: true destructive: false idempotent: true call: m3ter-account.getaccount with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $. - name: update-account description: Update Account hints: readOnly: false destructive: false idempotent: true call: m3ter-account.putaccount with: orgId: tools.orgId id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: delete-account description: Delete Account hints: readOnly: false destructive: true idempotent: true call: m3ter-account.deleteaccount with: orgId: tools.orgId id: tools.id outputParameters: - type: object mapping: $. - name: list-account-children description: List Account Children hints: readOnly: true destructive: false idempotent: true call: m3ter-account.listaccountchildren with: orgId: tools.orgId id: tools.id pageSize: tools.pageSize nextToken: tools.nextToken outputParameters: - type: object mapping: $. - name: end-date-account-billing-entities description: End-date Account billing entities hints: readOnly: false destructive: false idempotent: true call: m3ter-account.enddatebillingentitiesforaccount with: orgId: tools.orgId id: tools.id body: tools.body outputParameters: - type: object mapping: $.