{"openapi":"3.1.0","info":{"title":"PlanetScale (BYOK) API","version":"0.1.0","description":"PlanetScale (BYOK) lets an AI assistant read your own PlanetScale data through the PlanetScale API with a key you supply (service token in the form ID:TOKEN (token id, a colon, then the token)). Read-only: 7 tools (list_organizations, get_organization, list_databases, get_database, list_branches, get_branch, list_backups). The BYOK key travels with each request, is used for that one call only and...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-planetscale.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-planetscale/docs"},"termsOfService":"https://connectorbay.com/byok-planetscale/terms"},"servers":[{"url":"https://byok-planetscale.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-planetscale/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_organizations":{"post":{"operationId":"list_organizations","summary":"List the PlanetScale organizations the service token can see with plan, database count and dates. The answer carries pag","description":"List the PlanetScale organizations the service token can see with plan, database count and dates. The answer carries paging fields (next_page). Use for \"Which PlanetScale organizations can I see\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100; PlanetScale's default is 25).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; use next_page from the previous answer.","title":"Page"}},"title":"list_organizationsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_organization":{"post":{"operationId":"get_organization","summary":"Get one PlanetScale organization: plan, database count, SSO flag, tenancy and billing-state flags. Use for \"What plan is","description":"Get one PlanetScale organization: plan, database count, SSO flag, tenancy and billing-state flags. Use for \"What plan is my PlanetScale organization on\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"}},"required":["organization"],"title":"get_organizationArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_databases":{"post":{"operationId":"list_databases","summary":"List the databases of a PlanetScale organization with kind (mysql, postgresql or neki), state, plan, region and branch c","description":"List the databases of a PlanetScale organization with kind (mysql, postgresql or neki), state, plan, region and branch counts. Use for \"What databases does my PlanetScale organization have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only databases whose name contains this text.","title":"Q"},"kind":{"anyOf":[{"enum":["mysql","postgresql","neki"],"type":"string"},{"type":"null"}],"default":null,"description":"Only databases of this kind: mysql, postgresql or neki.","title":"Kind"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100; PlanetScale's default is 25).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; use next_page from the previous answer.","title":"Page"}},"required":["organization"],"title":"list_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_database":{"post":{"operationId":"get_database","summary":"Get one PlanetScale database: kind, state, plan, region, default branch, branch counts and feature flags. Use for \"Show ","description":"Get one PlanetScale database: kind, state, plan, region, default branch, branch counts and feature flags. Use for \"Show details of my PlanetScale database\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"database":{"description":"Database name (slug), for example 'app-db', as returned by list_databases.","maxLength":100,"title":"Database","type":"string"}},"required":["organization","database"],"title":"get_databaseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_branches":{"post":{"operationId":"list_branches","summary":"List the branches of a PlanetScale database with state, production flag, safe migrations flag, parent branch and region.","description":"List the branches of a PlanetScale database with state, production flag, safe migrations flag, parent branch and region. Use for \"What branches does my PlanetScale database have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"database":{"description":"Database name (slug), for example 'app-db', as returned by list_databases.","maxLength":100,"title":"Database","type":"string"},"q":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only branches whose name contains this text.","title":"Q"},"production":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to list only production branches, false for development branches.","title":"Production"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by created_at: asc or desc.","title":"Order"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100; PlanetScale's default is 25).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; use next_page from the previous answer.","title":"Page"}},"required":["organization","database"],"title":"list_branchesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_branch":{"post":{"operationId":"get_branch","summary":"Get one PlanetScale branch: state, kind, production and safe-migrations flags, shard layout flags, parent and region. Us","description":"Get one PlanetScale branch: state, kind, production and safe-migrations flags, shard layout flags, parent and region. Use for \"Is my PlanetScale main branch ready\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"database":{"description":"Database name (slug), for example 'app-db', as returned by list_databases.","maxLength":100,"title":"Database","type":"string"},"branch":{"description":"Branch name, for example 'main', as returned by list_branches.","maxLength":100,"title":"Branch","type":"string"}},"required":["organization","database","branch"],"title":"get_branchArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_backups":{"post":{"operationId":"list_backups","summary":"List backups of one PlanetScale branch with state, size in bytes, start, completion and expiry times, and the backup pol","description":"List backups of one PlanetScale branch with state, size in bytes, start, completion and expiry times, and the backup policy name. Use for \"When was my PlanetScale database last backed up\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization":{"description":"PlanetScale organization name (slug), for example 'acme', as returned by list_organizations.","maxLength":100,"title":"Organization","type":"string"},"database":{"description":"Database name (slug), for example 'app-db', as returned by list_databases.","maxLength":100,"title":"Database","type":"string"},"branch":{"description":"Branch name, for example 'main', as returned by list_branches.","maxLength":100,"title":"Branch","type":"string"},"state":{"anyOf":[{"enum":["pending","running","success","failed","canceled","ignored"],"type":"string"},{"type":"null"}],"default":null,"description":"Only backups in this state.","title":"State"},"started_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only backups started after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Started After"},"started_before":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only backups started before this ISO 8601 time.","title":"Started Before"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results per page (1 to 100; PlanetScale's default is 25).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1; use next_page from the previous answer.","title":"Page"}},"required":["organization","database","branch"],"title":"list_backupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}