naftiko: 1.0.0-alpha2 info: label: GitBook API — Spaces description: 'GitBook API — Spaces. 9 operations. Lead operation: GitBook List spaces in an organization. Self-contained Naftiko capability covering one Gitbook business surface.' tags: - Gitbook - 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-spaces baseUri: https://api.gitbook.com/v1 description: GitBook API — Spaces business capability. Self-contained, no shared references. resources: - name: orgs-organizationId-spaces path: /orgs/{organizationId}/spaces operations: - name: listspacesinorganization method: GET description: GitBook List spaces in an organization outputRawFormat: json outputParameters: - name: result type: object value: $. - name: createspaceinorganization method: POST description: GitBook Create a space in an organization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: spaces-spaceId path: /spaces/{spaceId} operations: - name: getspace method: GET description: GitBook Get a space outputRawFormat: json outputParameters: - name: result type: object value: $. - name: updatespace method: PATCH description: GitBook Update a space outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: deletespace method: DELETE description: GitBook Delete a space outputRawFormat: json outputParameters: - name: result type: object value: $. - name: spaces-spaceId-duplicate path: /spaces/{spaceId}/duplicate operations: - name: duplicatespace method: POST description: GitBook Duplicate a space outputRawFormat: json outputParameters: - name: result type: object value: $. - name: spaces-spaceId-move path: /spaces/{spaceId}/move operations: - name: movespace method: POST description: GitBook Move a space outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: spaces-spaceId-restore path: /spaces/{spaceId}/restore operations: - name: restorespace method: POST description: GitBook Restore a deleted space outputRawFormat: json outputParameters: - name: result type: object value: $. - name: spaces-spaceId-transfer path: /spaces/{spaceId}/transfer operations: - name: transferspace method: POST description: GitBook Transfer a space 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-spaces-rest port: 8080 description: REST adapter for GitBook API — Spaces. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/orgs/{organizationid}/spaces name: orgs-organizationid-spaces description: REST surface for orgs-organizationId-spaces. operations: - method: GET name: listspacesinorganization description: GitBook List spaces in an organization call: gitbook-spaces.listspacesinorganization outputParameters: - type: object mapping: $. - method: POST name: createspaceinorganization description: GitBook Create a space in an organization call: gitbook-spaces.createspaceinorganization with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/spaces/{spaceid} name: spaces-spaceid description: REST surface for spaces-spaceId. operations: - method: GET name: getspace description: GitBook Get a space call: gitbook-spaces.getspace outputParameters: - type: object mapping: $. - method: PATCH name: updatespace description: GitBook Update a space call: gitbook-spaces.updatespace with: body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletespace description: GitBook Delete a space call: gitbook-spaces.deletespace outputParameters: - type: object mapping: $. - path: /v1/spaces/{spaceid}/duplicate name: spaces-spaceid-duplicate description: REST surface for spaces-spaceId-duplicate. operations: - method: POST name: duplicatespace description: GitBook Duplicate a space call: gitbook-spaces.duplicatespace outputParameters: - type: object mapping: $. - path: /v1/spaces/{spaceid}/move name: spaces-spaceid-move description: REST surface for spaces-spaceId-move. operations: - method: POST name: movespace description: GitBook Move a space call: gitbook-spaces.movespace with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/spaces/{spaceid}/restore name: spaces-spaceid-restore description: REST surface for spaces-spaceId-restore. operations: - method: POST name: restorespace description: GitBook Restore a deleted space call: gitbook-spaces.restorespace outputParameters: - type: object mapping: $. - path: /v1/spaces/{spaceid}/transfer name: spaces-spaceid-transfer description: REST surface for spaces-spaceId-transfer. operations: - method: POST name: transferspace description: GitBook Transfer a space call: gitbook-spaces.transferspace with: body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: gitbook-spaces-mcp port: 9090 transport: http description: MCP adapter for GitBook API — Spaces. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: gitbook-list-spaces-organization description: GitBook List spaces in an organization hints: readOnly: true destructive: false idempotent: true call: gitbook-spaces.listspacesinorganization outputParameters: - type: object mapping: $. - name: gitbook-create-space-organization description: GitBook Create a space in an organization hints: readOnly: false destructive: false idempotent: false call: gitbook-spaces.createspaceinorganization with: body: tools.body outputParameters: - type: object mapping: $. - name: gitbook-get-space description: GitBook Get a space hints: readOnly: true destructive: false idempotent: true call: gitbook-spaces.getspace outputParameters: - type: object mapping: $. - name: gitbook-update-space description: GitBook Update a space hints: readOnly: false destructive: false idempotent: true call: gitbook-spaces.updatespace with: body: tools.body outputParameters: - type: object mapping: $. - name: gitbook-delete-space description: GitBook Delete a space hints: readOnly: false destructive: true idempotent: true call: gitbook-spaces.deletespace outputParameters: - type: object mapping: $. - name: gitbook-duplicate-space description: GitBook Duplicate a space hints: readOnly: false destructive: false idempotent: false call: gitbook-spaces.duplicatespace outputParameters: - type: object mapping: $. - name: gitbook-move-space description: GitBook Move a space hints: readOnly: false destructive: false idempotent: false call: gitbook-spaces.movespace with: body: tools.body outputParameters: - type: object mapping: $. - name: gitbook-restore-deleted-space description: GitBook Restore a deleted space hints: readOnly: false destructive: false idempotent: false call: gitbook-spaces.restorespace outputParameters: - type: object mapping: $. - name: gitbook-transfer-space description: GitBook Transfer a space hints: readOnly: false destructive: false idempotent: false call: gitbook-spaces.transferspace with: body: tools.body outputParameters: - type: object mapping: $.