commercetools · Capability

commercetools HTTP API — Categories

commercetools HTTP API — Categories. 5 operations. Lead operation: List categories. Self-contained Naftiko capability covering one Commercetools business surface.

Run with Naftiko CommercetoolsCategories

What You Can Do

GET
Listcategories — List categories
/v1/{projectkey}/categories
POST
Createcategory — Create a category
/v1/{projectkey}/categories
GET
Getcategorybyid — Get a category by ID
/v1/{projectkey}/categories/{id}
POST
Updatecategorybyid — Update a category by ID
/v1/{projectkey}/categories/{id}
DELETE
Deletecategorybyid — Delete a category by ID
/v1/{projectkey}/categories/{id}

MCP Tools

list-categories

List categories

read-only idempotent
create-category

Create a category

get-category-id

Get a category by ID

read-only idempotent
update-category-id

Update a category by ID

delete-category-id

Delete a category by ID

idempotent

Capability Spec

http-categories.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: commercetools HTTP API — Categories
  description: 'commercetools HTTP API — Categories. 5 operations. Lead operation: List categories. Self-contained Naftiko
    capability covering one Commercetools business surface.'
  tags:
  - Commercetools
  - Categories
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COMMERCETOOLS_API_KEY: COMMERCETOOLS_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-categories
    baseUri: https://api.{region}.commercetools.com
    description: commercetools HTTP API — Categories business capability. Self-contained, no shared references.
    resources:
    - name: projectKey-categories
      path: /{projectKey}/categories
      operations:
      - name: listcategories
        method: GET
        description: List categories
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcategory
        method: POST
        description: Create a category
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: projectKey-categories-id
      path: /{projectKey}/categories/{id}
      operations:
      - name: getcategorybyid
        method: GET
        description: Get a category by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatecategorybyid
        method: POST
        description: Update a category by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletecategorybyid
        method: DELETE
        description: Delete a category by ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.COMMERCETOOLS_API_KEY}}'
  exposes:
  - type: rest
    namespace: http-categories-rest
    port: 8080
    description: REST adapter for commercetools HTTP API — Categories. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/{projectkey}/categories
      name: projectkey-categories
      description: REST surface for projectKey-categories.
      operations:
      - method: GET
        name: listcategories
        description: List categories
        call: http-categories.listcategories
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcategory
        description: Create a category
        call: http-categories.createcategory
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{projectkey}/categories/{id}
      name: projectkey-categories-id
      description: REST surface for projectKey-categories-id.
      operations:
      - method: GET
        name: getcategorybyid
        description: Get a category by ID
        call: http-categories.getcategorybyid
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updatecategorybyid
        description: Update a category by ID
        call: http-categories.updatecategorybyid
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecategorybyid
        description: Delete a category by ID
        call: http-categories.deletecategorybyid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-categories-mcp
    port: 9090
    transport: http
    description: MCP adapter for commercetools HTTP API — Categories. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-categories
      description: List categories
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-categories.listcategories
      outputParameters:
      - type: object
        mapping: $.
    - name: create-category
      description: Create a category
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-categories.createcategory
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-category-id
      description: Get a category by ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: http-categories.getcategorybyid
      outputParameters:
      - type: object
        mapping: $.
    - name: update-category-id
      description: Update a category by ID
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-categories.updatecategorybyid
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-category-id
      description: Delete a category by ID
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: http-categories.deletecategorybyid
      outputParameters:
      - type: object
        mapping: $.