planetscale · Capability

PlanetScale Platform API — Branches

PlanetScale Platform API — Branches. 6 operations. Lead operation: List branches. Self-contained Naftiko capability covering one Planetscale business surface.

Run with Naftiko PlanetscaleBranches

What You Can Do

GET
Listbranches — List branches
/v1/organizations/{organization}/databases/{database}/branches
POST
Createbranch — Create a branch
/v1/organizations/{organization}/databases/{database}/branches
GET
Getbranch — Get a branch
/v1/organizations/{organization}/databases/{database}/branches/{branch}
PATCH
Updatebranch — Update a branch
/v1/organizations/{organization}/databases/{database}/branches/{branch}
DELETE
Deletebranch — Delete a branch
/v1/organizations/{organization}/databases/{database}/branches/{branch}
GET
Lintbranchschema — Lint a branch schema
/v1/organizations/{organization}/databases/{database}/branches/{branch}/schema-lint

MCP Tools

list-branches

List branches

read-only idempotent
create-branch

Create a branch

get-branch

Get a branch

read-only idempotent
update-branch

Update a branch

idempotent
delete-branch

Delete a branch

idempotent
lint-branch-schema

Lint a branch schema

read-only idempotent

Capability Spec

platform-branches.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PlanetScale Platform API — Branches
  description: 'PlanetScale Platform API — Branches. 6 operations. Lead operation: List branches. Self-contained Naftiko capability
    covering one Planetscale business surface.'
  tags:
  - Planetscale
  - Branches
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PLANETSCALE_API_KEY: PLANETSCALE_API_KEY
capability:
  consumes:
  - type: http
    namespace: platform-branches
    baseUri: https://api.planetscale.com/v1
    description: PlanetScale Platform API — Branches business capability. Self-contained, no shared references.
    resources:
    - name: organizations-organization-databases-database-branches
      path: /organizations/{organization}/databases/{database}/branches
      operations:
      - name: listbranches
        method: GET
        description: List branches
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createbranch
        method: POST
        description: Create a branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: organizations-organization-databases-database-branches-branch
      path: /organizations/{organization}/databases/{database}/branches/{branch}
      operations:
      - name: getbranch
        method: GET
        description: Get a branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updatebranch
        method: PATCH
        description: Update a branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletebranch
        method: DELETE
        description: Delete a branch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: organizations-organization-databases-database-branches-branch-schema-lint
      path: /organizations/{organization}/databases/{database}/branches/{branch}/schema-lint
      operations:
      - name: lintbranchschema
        method: GET
        description: Lint a branch schema
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.PLANETSCALE_API_KEY}}'
  exposes:
  - type: rest
    namespace: platform-branches-rest
    port: 8080
    description: REST adapter for PlanetScale Platform API — Branches. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/organizations/{organization}/databases/{database}/branches
      name: organizations-organization-databases-database-branches
      description: REST surface for organizations-organization-databases-database-branches.
      operations:
      - method: GET
        name: listbranches
        description: List branches
        call: platform-branches.listbranches
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createbranch
        description: Create a branch
        call: platform-branches.createbranch
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{organization}/databases/{database}/branches/{branch}
      name: organizations-organization-databases-database-branches-branch
      description: REST surface for organizations-organization-databases-database-branches-branch.
      operations:
      - method: GET
        name: getbranch
        description: Get a branch
        call: platform-branches.getbranch
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatebranch
        description: Update a branch
        call: platform-branches.updatebranch
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletebranch
        description: Delete a branch
        call: platform-branches.deletebranch
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/organizations/{organization}/databases/{database}/branches/{branch}/schema-lint
      name: organizations-organization-databases-database-branches-branch-schema-lint
      description: REST surface for organizations-organization-databases-database-branches-branch-schema-lint.
      operations:
      - method: GET
        name: lintbranchschema
        description: Lint a branch schema
        call: platform-branches.lintbranchschema
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: platform-branches-mcp
    port: 9090
    transport: http
    description: MCP adapter for PlanetScale Platform API — Branches. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-branches
      description: List branches
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-branches.listbranches
      outputParameters:
      - type: object
        mapping: $.
    - name: create-branch
      description: Create a branch
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platform-branches.createbranch
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-branch
      description: Get a branch
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-branches.getbranch
      outputParameters:
      - type: object
        mapping: $.
    - name: update-branch
      description: Update a branch
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platform-branches.updatebranch
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-branch
      description: Delete a branch
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: platform-branches.deletebranch
      outputParameters:
      - type: object
        mapping: $.
    - name: lint-branch-schema
      description: Lint a branch schema
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-branches.lintbranchschema
      outputParameters:
      - type: object
        mapping: $.