Metabase · Capability

Metabase API — Collections

Metabase API — Collections. 3 operations. Lead operation: List collections. Self-contained Naftiko capability covering one Metabase business surface.

Run with Naftiko MetabaseCollections

What You Can Do

GET
Get — List collections
/v1/collection
POST
Post — Create a collection
/v1/collection
GET
Get — Get a collection
/v1/collection/{id}

MCP Tools

list-collections

List collections

read-only idempotent
create-collection

Create a collection

get-collection

Get a collection

read-only idempotent

Capability Spec

metabase-collections.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Metabase API — Collections
  description: 'Metabase API — Collections. 3 operations. Lead operation: List collections. Self-contained Naftiko capability
    covering one Metabase business surface.'
  tags:
  - Metabase
  - Collections
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    METABASE_API_KEY: METABASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: metabase-collections
    baseUri: https://your-metabase-instance.com/api
    description: Metabase API — Collections business capability. Self-contained, no shared references.
    resources:
    - name: collection
      path: /collection
      operations:
      - name: get
        method: GET
        description: List collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: collection-id
      path: /collection/{id}
      operations:
      - name: get
        method: GET
        description: Get a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: x-api-key
      value: '{{env.METABASE_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: metabase-collections-rest
    port: 8080
    description: REST adapter for Metabase API — Collections. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/collection
      name: collection
      description: REST surface for collection.
      operations:
      - method: GET
        name: get
        description: List collections
        call: metabase-collections.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a collection
        call: metabase-collections.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/collection/{id}
      name: collection-id
      description: REST surface for collection-id.
      operations:
      - method: GET
        name: get
        description: Get a collection
        call: metabase-collections.get
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: metabase-collections-mcp
    port: 9090
    transport: http
    description: MCP adapter for Metabase API — Collections. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-collections
      description: List collections
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metabase-collections.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-collection
      description: Create a collection
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: metabase-collections.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-collection
      description: Get a collection
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: metabase-collections.get
      outputParameters:
      - type: object
        mapping: $.