Platzi Fake Store API · Capability

Platzi Fake Store API — Products

Platzi Fake Store API — Products. 8 operations. Lead operation: List products. Self-contained Naftiko capability covering one Platzi Fake Store Api business surface.

Run with Naftiko Platzi Fake Store ApiProducts

What You Can Do

GET
Listproducts — List products
/v1/products
POST
Createproduct — Create product
/v1/products
GET
Getproductbyslug — Get product by slug
/v1/products/slug/{slug}
GET
Getrelatedproductsbyslug — Get related products by slug
/v1/products/slug/{slug}/related
GET
Getproduct — Get product by id
/v1/products/{id}
PUT
Updateproduct — Update product
/v1/products/{id}
DELETE
Deleteproduct — Delete product
/v1/products/{id}
GET
Getrelatedproducts — Get related products by id
/v1/products/{id}/related

MCP Tools

list-products

List products

read-only idempotent
create-product

Create product

get-product-slug

Get product by slug

read-only idempotent
get-related-products-slug

Get related products by slug

read-only idempotent
get-product-id

Get product by id

read-only idempotent
update-product

Update product

idempotent
delete-product

Delete product

idempotent
get-related-products-id

Get related products by id

read-only idempotent

Capability Spec

platzi-fake-store-products.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Platzi Fake Store API — Products
  description: 'Platzi Fake Store API — Products. 8 operations. Lead operation: List products. Self-contained Naftiko capability
    covering one Platzi Fake Store Api business surface.'
  tags:
  - Platzi Fake Store Api
  - Products
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PLATZI_FAKE_STORE_API_API_KEY: PLATZI_FAKE_STORE_API_API_KEY
capability:
  consumes:
  - type: http
    namespace: platzi-fake-store-products
    baseUri: https://api.escuelajs.co/api/v1
    description: Platzi Fake Store API — Products business capability. Self-contained, no shared references.
    resources:
    - name: products
      path: /products
      operations:
      - name: listproducts
        method: GET
        description: List products
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: offset
          in: query
          type: integer
        - name: limit
          in: query
          type: integer
        - name: title
          in: query
          type: string
        - name: price
          in: query
          type: number
        - name: price_min
          in: query
          type: number
        - name: price_max
          in: query
          type: number
        - name: categoryId
          in: query
          type: integer
      - name: createproduct
        method: POST
        description: Create product
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: products-slug-slug
      path: /products/slug/{slug}
      operations:
      - name: getproductbyslug
        method: GET
        description: Get product by slug
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: products-slug-slug-related
      path: /products/slug/{slug}/related
      operations:
      - name: getrelatedproductsbyslug
        method: GET
        description: Get related products by slug
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: products-id
      path: /products/{id}
      operations:
      - name: getproduct
        method: GET
        description: Get product by id
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateproduct
        method: PUT
        description: Update product
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteproduct
        method: DELETE
        description: Delete product
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: products-id-related
      path: /products/{id}/related
      operations:
      - name: getrelatedproducts
        method: GET
        description: Get related products by id
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.PLATZI_FAKE_STORE_API_API_KEY}}'
  exposes:
  - type: rest
    namespace: platzi-fake-store-products-rest
    port: 8080
    description: REST adapter for Platzi Fake Store API — Products. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/products
      name: products
      description: REST surface for products.
      operations:
      - method: GET
        name: listproducts
        description: List products
        call: platzi-fake-store-products.listproducts
        with:
          offset: rest.offset
          limit: rest.limit
          title: rest.title
          price: rest.price
          price_min: rest.price_min
          price_max: rest.price_max
          categoryId: rest.categoryId
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createproduct
        description: Create product
        call: platzi-fake-store-products.createproduct
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/products/slug/{slug}
      name: products-slug-slug
      description: REST surface for products-slug-slug.
      operations:
      - method: GET
        name: getproductbyslug
        description: Get product by slug
        call: platzi-fake-store-products.getproductbyslug
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/products/slug/{slug}/related
      name: products-slug-slug-related
      description: REST surface for products-slug-slug-related.
      operations:
      - method: GET
        name: getrelatedproductsbyslug
        description: Get related products by slug
        call: platzi-fake-store-products.getrelatedproductsbyslug
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/products/{id}
      name: products-id
      description: REST surface for products-id.
      operations:
      - method: GET
        name: getproduct
        description: Get product by id
        call: platzi-fake-store-products.getproduct
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateproduct
        description: Update product
        call: platzi-fake-store-products.updateproduct
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteproduct
        description: Delete product
        call: platzi-fake-store-products.deleteproduct
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/products/{id}/related
      name: products-id-related
      description: REST surface for products-id-related.
      operations:
      - method: GET
        name: getrelatedproducts
        description: Get related products by id
        call: platzi-fake-store-products.getrelatedproducts
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: platzi-fake-store-products-mcp
    port: 9090
    transport: http
    description: MCP adapter for Platzi Fake Store API — Products. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-products
      description: List products
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.listproducts
      with:
        offset: tools.offset
        limit: tools.limit
        title: tools.title
        price: tools.price
        price_min: tools.price_min
        price_max: tools.price_max
        categoryId: tools.categoryId
      outputParameters:
      - type: object
        mapping: $.
    - name: create-product
      description: Create product
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platzi-fake-store-products.createproduct
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-product-slug
      description: Get product by slug
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.getproductbyslug
      outputParameters:
      - type: object
        mapping: $.
    - name: get-related-products-slug
      description: Get related products by slug
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.getrelatedproductsbyslug
      outputParameters:
      - type: object
        mapping: $.
    - name: get-product-id
      description: Get product by id
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.getproduct
      outputParameters:
      - type: object
        mapping: $.
    - name: update-product
      description: Update product
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.updateproduct
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-product
      description: Delete product
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: platzi-fake-store-products.deleteproduct
      outputParameters:
      - type: object
        mapping: $.
    - name: get-related-products-id
      description: Get related products by id
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platzi-fake-store-products.getrelatedproducts
      outputParameters:
      - type: object
        mapping: $.