GitBook · Capability

GitBook API — Collections

GitBook API — Collections. 4 operations. Lead operation: GitBook Get a collection. Self-contained Naftiko capability covering one Gitbook business surface.

Run with Naftiko GitbookCollections

What You Can Do

GET
Getcollection — GitBook Get a collection
/v1/collections/{collectionid}
DELETE
Deletecollection — GitBook Delete a collection
/v1/collections/{collectionid}
GET
Listcollectionsinorganization — GitBook List collections
/v1/orgs/{organizationid}/collections
POST
Createcollection — GitBook Create a collection
/v1/orgs/{organizationid}/collections

MCP Tools

gitbook-get-collection

GitBook Get a collection

read-only idempotent
gitbook-delete-collection

GitBook Delete a collection

idempotent
gitbook-list-collections

GitBook List collections

read-only idempotent
gitbook-create-collection

GitBook Create a collection

Capability Spec

gitbook-collections.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitBook API — Collections
  description: 'GitBook API — Collections. 4 operations. Lead operation: GitBook Get a collection. Self-contained Naftiko
    capability covering one Gitbook business surface.'
  tags:
  - Gitbook
  - Collections
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITBOOK_API_KEY: GITBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: gitbook-collections
    baseUri: https://api.gitbook.com/v1
    description: GitBook API — Collections business capability. Self-contained, no shared references.
    resources:
    - name: collections-collectionId
      path: /collections/{collectionId}
      operations:
      - name: getcollection
        method: GET
        description: GitBook Get a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletecollection
        method: DELETE
        description: GitBook Delete a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationId-collections
      path: /orgs/{organizationId}/collections
      operations:
      - name: listcollectionsinorganization
        method: GET
        description: GitBook List collections
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcollection
        method: POST
        description: GitBook Create a collection
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.GITBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: gitbook-collections-rest
    port: 8080
    description: REST adapter for GitBook API — Collections. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/collections/{collectionid}
      name: collections-collectionid
      description: REST surface for collections-collectionId.
      operations:
      - method: GET
        name: getcollection
        description: GitBook Get a collection
        call: gitbook-collections.getcollection
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecollection
        description: GitBook Delete a collection
        call: gitbook-collections.deletecollection
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{organizationid}/collections
      name: orgs-organizationid-collections
      description: REST surface for orgs-organizationId-collections.
      operations:
      - method: GET
        name: listcollectionsinorganization
        description: GitBook List collections
        call: gitbook-collections.listcollectionsinorganization
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcollection
        description: GitBook Create a collection
        call: gitbook-collections.createcollection
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitbook-collections-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitBook API — Collections. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: gitbook-get-collection
      description: GitBook Get a collection
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitbook-collections.getcollection
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-delete-collection
      description: GitBook Delete a collection
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitbook-collections.deletecollection
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-list-collections
      description: GitBook List collections
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitbook-collections.listcollectionsinorganization
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-create-collection
      description: GitBook Create a collection
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitbook-collections.createcollection
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.