naftiko: 1.0.0-alpha2 info: label: Vendure Shop API — Active Order description: >- Vendure Shop API capability for managing the active order (cart): read, add lines, adjust quantities, remove lines. Backed by the Shop GraphQL endpoint. Self-contained Naftiko capability covering one Vendure business surface. tags: - Vendure - Shop - Cart - ActiveOrder created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: VENDURE_SHOP_API_URL: VENDURE_SHOP_API_URL VENDURE_CHANNEL_TOKEN: VENDURE_CHANNEL_TOKEN VENDURE_AUTH_TOKEN: VENDURE_AUTH_TOKEN capability: consumes: - type: http namespace: shop-active-order baseUri: '{{env.VENDURE_SHOP_API_URL}}' description: Vendure Shop GraphQL endpoint for active order operations. resources: - name: shop-graphql path: / operations: - name: queryActiveOrder method: POST description: Query the active order (cart). outputRawFormat: json outputParameters: [ { name: result, type: object, value: $. } ] inputParameters: [ { name: body, in: body, type: object, required: true } ] - name: addItemToOrder method: POST description: Add a product variant to the active order. outputRawFormat: json outputParameters: [ { name: result, type: object, value: $. } ] inputParameters: [ { name: body, in: body, type: object, required: true } ] - name: adjustOrderLine method: POST description: Adjust quantity on an existing order line. outputRawFormat: json outputParameters: [ { name: result, type: object, value: $. } ] inputParameters: [ { name: body, in: body, type: object, required: true } ] - name: removeOrderLine method: POST description: Remove a line from the active order. outputRawFormat: json outputParameters: [ { name: result, type: object, value: $. } ] inputParameters: [ { name: body, in: body, type: object, required: true } ] - name: removeAllOrderLines method: POST description: Empty the active order. outputRawFormat: json outputParameters: [ { name: result, type: object, value: $. } ] inputParameters: [ { name: body, in: body, type: object, required: true } ] authentication: type: bearer token: '{{env.VENDURE_AUTH_TOKEN}}' exposes: - type: rest namespace: shop-active-order-rest port: 8080 description: REST adapter exposing active-order operations. resources: - path: /v1/active-order/query name: active-order operations: - method: POST name: queryActiveOrder call: shop-active-order.queryActiveOrder with: { body: rest.body } outputParameters: [ { type: object, mapping: $. } ] - path: /v1/active-order/lines name: active-order-lines operations: - method: POST name: addItemToOrder call: shop-active-order.addItemToOrder with: { body: rest.body } outputParameters: [ { type: object, mapping: $. } ] - path: /v1/active-order/line-adjust name: active-order-line-adjust operations: - method: POST name: adjustOrderLine call: shop-active-order.adjustOrderLine with: { body: rest.body } outputParameters: [ { type: object, mapping: $. } ] - path: /v1/active-order/line-remove name: active-order-line-remove operations: - method: POST name: removeOrderLine call: shop-active-order.removeOrderLine with: { body: rest.body } outputParameters: [ { type: object, mapping: $. } ] - type: mcp namespace: shop-active-order-mcp port: 9090 transport: http description: MCP adapter — one tool per active-order operation. tools: - name: vendure-shop-get-active-order description: Get the current active order (cart). hints: { readOnly: true, destructive: false, idempotent: true } call: shop-active-order.queryActiveOrder with: { body: tools.body } outputParameters: [ { type: object, mapping: $. } ] - name: vendure-shop-add-item description: Add an item to the active order. hints: { readOnly: false, destructive: false, idempotent: false } call: shop-active-order.addItemToOrder with: { body: tools.body } outputParameters: [ { type: object, mapping: $. } ] - name: vendure-shop-adjust-line description: Adjust quantity on an order line. hints: { readOnly: false, destructive: false, idempotent: false } call: shop-active-order.adjustOrderLine with: { body: tools.body } outputParameters: [ { type: object, mapping: $. } ] - name: vendure-shop-remove-line description: Remove a line from the active order. hints: { readOnly: false, destructive: true, idempotent: true } call: shop-active-order.removeOrderLine with: { body: tools.body } outputParameters: [ { type: object, mapping: $. } ]