M3ter · Capability

m3ter API — Counter

m3ter API — Counter. 5 operations. Lead operation: List Counters. Self-contained Naftiko capability covering one M3ter business surface.

Run with Naftiko M3terCounter

What You Can Do

GET
Listcounters — List Counters
/v1/organizations/{orgid}/counters
POST
Postcounter — Create Counter
/v1/organizations/{orgid}/counters
GET
Getcounter — Retrieve Counter
/v1/organizations/{orgid}/counters/{id}
PUT
Putcounter — Update Counter
/v1/organizations/{orgid}/counters/{id}
DELETE
Deletecounter — Delete Counter
/v1/organizations/{orgid}/counters/{id}

MCP Tools

list-counters

List Counters

read-only idempotent
create-counter

Create Counter

retrieve-counter

Retrieve Counter

read-only idempotent
update-counter

Update Counter

idempotent
delete-counter

Delete Counter

idempotent

Capability Spec

m3ter-counter.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: m3ter API — Counter
  description: 'm3ter API — Counter. 5 operations. Lead operation: List Counters. Self-contained Naftiko capability covering
    one M3ter business surface.'
  tags:
  - M3ter
  - Counter
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    M3TER_API_KEY: M3TER_API_KEY
capability:
  consumes:
  - type: http
    namespace: m3ter-counter
    baseUri: https://api.m3ter.com
    description: m3ter API — Counter business capability. Self-contained, no shared references.
    resources:
    - name: organizations-orgId-counters
      path: /organizations/{orgId}/counters
      operations:
      - name: listcounters
        method: GET
        description: List Counters
        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 Counters 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 Counter IDs to retrieve.
        - name: codes
          in: query
          type: array
          description: List of Counter codes to retrieve. These are unique short codes to identify each Counter.
        - name: productId
          in: query
          type: array
          description: List of Products UUIDs to retrieve Counters for.
      - name: postcounter
        method: POST
        description: Create Counter
        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 m3ter.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: organizations-orgId-counters-id
      path: /organizations/{orgId}/counters/{id}
      operations:
      - name: getcounter
        method: GET
        description: Retrieve Counter
        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 m3ter.
          required: true
        - name: id
          in: path
          type: string
          description: The UUID of the Counter to retrieve.
          required: true
      - name: putcounter
        method: PUT
        description: Update Counter
        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 m3ter.
          required: true
        - name: id
          in: path
          type: string
          description: The UUID of the Counter to update.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecounter
        method: DELETE
        description: Delete Counter
        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 m3ter.
          required: true
        - name: id
          in: path
          type: string
          description: The UUID of the Counter to delete.
          required: true
    authentication:
      type: bearer
      token: '{{env.M3TER_API_KEY}}'
  exposes:
  - type: rest
    namespace: m3ter-counter-rest
    port: 8080
    description: REST adapter for m3ter API — Counter. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/organizations/{orgid}/counters
      name: organizations-orgid-counters
      description: REST surface for organizations-orgId-counters.
      operations:
      - method: GET
        name: listcounters
        description: List Counters
        call: m3ter-counter.listcounters
        with:
          orgId: rest.orgId
          pageSize: rest.pageSize
          nextToken: rest.nextToken
          ids: rest.ids
          codes: rest.codes
          productId: rest.productId
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: postcounter
        description: Create Counter
        call: m3ter-counter.postcounter
        with:
          orgId: rest.orgId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{orgid}/counters/{id}
      name: organizations-orgid-counters-id
      description: REST surface for organizations-orgId-counters-id.
      operations:
      - method: GET
        name: getcounter
        description: Retrieve Counter
        call: m3ter-counter.getcounter
        with:
          orgId: rest.orgId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putcounter
        description: Update Counter
        call: m3ter-counter.putcounter
        with:
          orgId: rest.orgId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecounter
        description: Delete Counter
        call: m3ter-counter.deletecounter
        with:
          orgId: rest.orgId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: m3ter-counter-mcp
    port: 9090
    transport: http
    description: MCP adapter for m3ter API — Counter. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-counters
      description: List Counters
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-counter.listcounters
      with:
        orgId: tools.orgId
        pageSize: tools.pageSize
        nextToken: tools.nextToken
        ids: tools.ids
        codes: tools.codes
        productId: tools.productId
      outputParameters:
      - type: object
        mapping: $.
    - name: create-counter
      description: Create Counter
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: m3ter-counter.postcounter
      with:
        orgId: tools.orgId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-counter
      description: Retrieve Counter
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: m3ter-counter.getcounter
      with:
        orgId: tools.orgId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: update-counter
      description: Update Counter
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: m3ter-counter.putcounter
      with:
        orgId: tools.orgId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-counter
      description: Delete Counter
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: m3ter-counter.deletecounter
      with:
        orgId: tools.orgId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.