Chef · Capability

Chef Infra Server API — Cookbooks

Chef Infra Server API — Cookbooks. 2 operations. Lead operation: List cookbooks. Self-contained Naftiko capability covering one Chef business surface.

Run with Naftiko ChefCookbooks

What You Can Do

GET
Listcookbooks — List cookbooks
/v1/cookbooks
GET
Getcookbook — Get cookbook versions
/v1/cookbooks/{cookbookname}

MCP Tools

list-cookbooks

List cookbooks

read-only idempotent
get-cookbook-versions

Get cookbook versions

read-only idempotent

Capability Spec

infra-server-cookbooks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Chef Infra Server API — Cookbooks
  description: 'Chef Infra Server API — Cookbooks. 2 operations. Lead operation: List cookbooks. Self-contained Naftiko capability
    covering one Chef business surface.'
  tags:
  - Chef
  - Cookbooks
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CHEF_API_KEY: CHEF_API_KEY
capability:
  consumes:
  - type: http
    namespace: infra-server-cookbooks
    baseUri: https://{server}/organizations/{org}
    description: Chef Infra Server API — Cookbooks business capability. Self-contained, no shared references.
    resources:
    - name: cookbooks
      path: /cookbooks
      operations:
      - name: listcookbooks
        method: GET
        description: List cookbooks
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: cookbooks-cookbookName
      path: /cookbooks/{cookbookName}
      operations:
      - name: getcookbook
        method: GET
        description: Get cookbook versions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cookbookName
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: X-Ops-Authorization
      value: '{{env.CHEF_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: infra-server-cookbooks-rest
    port: 8080
    description: REST adapter for Chef Infra Server API — Cookbooks. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/cookbooks
      name: cookbooks
      description: REST surface for cookbooks.
      operations:
      - method: GET
        name: listcookbooks
        description: List cookbooks
        call: infra-server-cookbooks.listcookbooks
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/cookbooks/{cookbookname}
      name: cookbooks-cookbookname
      description: REST surface for cookbooks-cookbookName.
      operations:
      - method: GET
        name: getcookbook
        description: Get cookbook versions
        call: infra-server-cookbooks.getcookbook
        with:
          cookbookName: rest.cookbookName
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: infra-server-cookbooks-mcp
    port: 9090
    transport: http
    description: MCP adapter for Chef Infra Server API — Cookbooks. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-cookbooks
      description: List cookbooks
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: infra-server-cookbooks.listcookbooks
      outputParameters:
      - type: object
        mapping: $.
    - name: get-cookbook-versions
      description: Get cookbook versions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: infra-server-cookbooks.getcookbook
      with:
        cookbookName: tools.cookbookName
      outputParameters:
      - type: object
        mapping: $.