GitBook · Capability

GitBook API — Site Spaces

GitBook API — Site Spaces. 5 operations. Lead operation: GitBook List site spaces. Self-contained Naftiko capability covering one Gitbook business surface.

Run with Naftiko GitbookSite Spaces

What You Can Do

GET
Listsitespaces — GitBook List site spaces
/v1/orgs/{organizationid}/sites/{siteid}/site-spaces
POST
Addsitespace — GitBook Add a space to a docs site
/v1/orgs/{organizationid}/sites/{siteid}/site-spaces
PATCH
Updatesitespace — GitBook Update a site space
/v1/orgs/{organizationid}/sites/{siteid}/site-spaces/{sitespaceid}
DELETE
Removesitespace — GitBook Remove a space from a docs site
/v1/orgs/{organizationid}/sites/{siteid}/site-spaces/{sitespaceid}
POST
Movesitespace — GitBook Move a site space
/v1/orgs/{organizationid}/sites/{siteid}/site-spaces/{sitespaceid}/move

MCP Tools

gitbook-list-site-spaces

GitBook List site spaces

read-only idempotent
gitbook-add-space-docs-site

GitBook Add a space to a docs site

gitbook-update-site-space

GitBook Update a site space

idempotent
gitbook-remove-space-docs-site

GitBook Remove a space from a docs site

idempotent
gitbook-move-site-space

GitBook Move a site space

Capability Spec

gitbook-site-spaces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitBook API — Site Spaces
  description: 'GitBook API — Site Spaces. 5 operations. Lead operation: GitBook List site spaces. Self-contained Naftiko
    capability covering one Gitbook business surface.'
  tags:
  - Gitbook
  - Site Spaces
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITBOOK_API_KEY: GITBOOK_API_KEY
capability:
  consumes:
  - type: http
    namespace: gitbook-site-spaces
    baseUri: https://api.gitbook.com/v1
    description: GitBook API — Site Spaces business capability. Self-contained, no shared references.
    resources:
    - name: orgs-organizationId-sites-siteId-site-spaces
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces
      operations:
      - name: listsitespaces
        method: GET
        description: GitBook List site spaces
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: addsitespace
        method: POST
        description: GitBook Add a space to a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: orgs-organizationId-sites-siteId-site-spaces-siteSpaceId
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}
      operations:
      - name: updatesitespace
        method: PATCH
        description: GitBook Update a site space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: removesitespace
        method: DELETE
        description: GitBook Remove a space from a docs site
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: orgs-organizationId-sites-siteId-site-spaces-siteSpaceId-move
      path: /orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move
      operations:
      - name: movesitespace
        method: POST
        description: GitBook Move a site space
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: bearer
      token: '{{env.GITBOOK_API_KEY}}'
  exposes:
  - type: rest
    namespace: gitbook-site-spaces-rest
    port: 8080
    description: REST adapter for GitBook API — Site Spaces. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/orgs/{organizationid}/sites/{siteid}/site-spaces
      name: orgs-organizationid-sites-siteid-site-spaces
      description: REST surface for orgs-organizationId-sites-siteId-site-spaces.
      operations:
      - method: GET
        name: listsitespaces
        description: GitBook List site spaces
        call: gitbook-site-spaces.listsitespaces
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: addsitespace
        description: GitBook Add a space to a docs site
        call: gitbook-site-spaces.addsitespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{organizationid}/sites/{siteid}/site-spaces/{sitespaceid}
      name: orgs-organizationid-sites-siteid-site-spaces-sitespaceid
      description: REST surface for orgs-organizationId-sites-siteId-site-spaces-siteSpaceId.
      operations:
      - method: PATCH
        name: updatesitespace
        description: GitBook Update a site space
        call: gitbook-site-spaces.updatesitespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: removesitespace
        description: GitBook Remove a space from a docs site
        call: gitbook-site-spaces.removesitespace
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/orgs/{organizationid}/sites/{siteid}/site-spaces/{sitespaceid}/move
      name: orgs-organizationid-sites-siteid-site-spaces-sitespaceid-move
      description: REST surface for orgs-organizationId-sites-siteId-site-spaces-siteSpaceId-move.
      operations:
      - method: POST
        name: movesitespace
        description: GitBook Move a site space
        call: gitbook-site-spaces.movesitespace
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitbook-site-spaces-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitBook API — Site Spaces. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: gitbook-list-site-spaces
      description: GitBook List site spaces
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitbook-site-spaces.listsitespaces
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-add-space-docs-site
      description: GitBook Add a space to a docs site
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitbook-site-spaces.addsitespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-update-site-space
      description: GitBook Update a site space
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gitbook-site-spaces.updatesitespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-remove-space-docs-site
      description: GitBook Remove a space from a docs site
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gitbook-site-spaces.removesitespace
      outputParameters:
      - type: object
        mapping: $.
    - name: gitbook-move-site-space
      description: GitBook Move a site space
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitbook-site-spaces.movesitespace
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.