# PlanetScale

```json
{
  "name": "PlanetScale",
  "slug": "planetscale",
  "url": "https://composio.dev/toolkits/planetscale",
  "markdown_url": "https://composio.dev/toolkits/planetscale.md",
  "logo_url": "https://logos.composio.dev/api/planetscale",
  "categories": [
    "developer tools & devops"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-10-07T05:32:18.195Z"
}
```

![PlanetScale logo](https://logos.composio.dev/api/planetscale)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with PlanetScale MCP or direct API to manage databases, create branches, review deploy requests, and inspect backups and insights through natural language.

## Summary

PlanetScale is a MySQL-compatible database platform built for branching and scalable development.
It helps teams ship schema changes safely with deploy requests, backups, and production insights.

## Categories

- developer tools & devops

## Toolkit Details

- Tools: 245

## Images

- Logo: https://logos.composio.dev/api/planetscale

## Authentication

- **Oauth2**
  - Type: `oauth2`
  - Description: Oauth2 authentication for PlanetScale.
  - Setup:
    - Configure Oauth2 credentials for PlanetScale.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- List all production databases and branches
- Review pending deploy requests for production
- Inspect recent query insights for slowdowns

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `PLANETSCALE_ADD_ORGANIZATION_TEAM_MEMBER` | Add a member to a team | Add a member to a team. |
| `PLANETSCALE_ASSIGN_SHARD_CONFIGURATION_PROFILE_SHARDS` | Assign shards to a Neki shard configuration profile | Assign shards to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_BULK_CREATE_SHARD_CONFIGURATION_PROFILE_SHARDS` | Add shards to a Neki shard configuration profile | Add shards to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_CANCEL_ADMIN_CHANGE_REQUEST` | Cancel a change request for a Neki admin | Cancel a change request for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_BOUNCER_RESIZE_REQUEST` | Cancel a resize request | Cancel a resize request. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_BRANCH_CHANGE_REQUEST` | Cancel a change request | Cancel a branch resize change request. Vitess/MySQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_DEPLOY_REQUEST` | Cancel a queued deploy request | Cancel a queued deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_CANCEL_NEKI_CHANGE_REQUEST` | Cancel a change request for a Neki branch | Cancel a change request for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_ROUTER_CHANGE_REQUEST` | Cancel a change request for a Neki router | Cancel a change request for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUEST` | Cancel a change request for a Neki shard configuration profile | Cancel a change request for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CANCEL_SIDECAR_CHANGE_REQUEST` | Cancel a change request for a Neki sidecar | Cancel a change request for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_CHECK_DEPLOY_REQUEST_STORAGE` | Check deploy request storage | Checks whether the deploy request's target branch cluster has enough storage to safely deploy the schema changes. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_CLOSE_DEPLOY_REQUEST` | Close a deploy request | Close a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_COMPLETE_ERRORED_DEPLOY` | Complete an errored deploy | Complete an errored deploy. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_COMPLETE_GATED_DEPLOY_REQUEST` | Complete a gated deploy request | Complete a gated deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_COMPLETE_REVERT` | Complete a revert | Complete a revert. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_CONFIGURE_ORGANIZATION_SSO` | Open the SSO configuration portal | Return a URL for configuring the identity provider. Requires at least one verified domain. |
| `PLANETSCALE_CREATE_BACKUP` | Create a backup | Create a backup. |
| `PLANETSCALE_CREATE_BACKUP_POLICY` | Create a backup policy | Create a backup policy. |
| `PLANETSCALE_CREATE_BOUNCER` | Create a bouncer | Create a bouncer. PostgreSQL databases only. |
| `PLANETSCALE_CREATE_BRANCH` | Create a branch | Create a branch. |
| `PLANETSCALE_CREATE_BRANCH_LOG_SIGNATURE` | Create a log signature | Creates a signed token that can be used to access branch logs. |
| `PLANETSCALE_CREATE_DATABASE` | Create a database | Create a database. |
| `PLANETSCALE_CREATE_DATABASE_POSTGRES_CIDR` | Create an IP restriction entry | Create an IP restriction entry. PostgreSQL databases only. |
| `PLANETSCALE_CREATE_DEPLOY_REQUEST` | Create a deploy request | Create a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_CREATE_INSIGHTS_AGENT_RUN` | Create an Insights agent run | Create an Insights agent run. |
| `PLANETSCALE_CREATE_ORGANIZATION_SSO_DOMAIN` | Start SSO domain verification | Enable SSO if needed and return a URL for verifying an email domain. |
| `PLANETSCALE_CREATE_ORGANIZATION_TEAM` | Create an organization team | Create an organization team. |
| `PLANETSCALE_CREATE_PASSWORD` | Create a password | Create a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_CREATE_PAYMENT_METHOD_SETUP` | Create a billing payment method setup | Create a hosted checkout session for adding or replacing an organization's payment method. |
| `PLANETSCALE_CREATE_QUERY_PATTERNS_REPORT` | Create a new query patterns report | Create a new query patterns report. |
| `PLANETSCALE_CREATE_READ_ONLY_REPLICA` | Create a read-only replica | Create a read-only replica. |
| `PLANETSCALE_CREATE_ROLE` | Create role credentials | Create role credentials. PostgreSQL databases only. |
| `PLANETSCALE_CREATE_ROUTER` | Create a router for a Neki branch | Create a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_CREATE_SHARD` | Add shards to a Neki branch | Add shards to a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_CREATE_SHARD_CONFIGURATION_PROFILE` | Create a shard configuration profile for a Neki branch | Create a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_CREATE_SHARD_CONFIGURATION_PROFILE_SHARD` | Add a shard to a Neki shard configuration profile | Add a shard to a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_CREATE_SWITCHOVER` | Create a switchover | Moves the primary of a Postgres branch. On a branch with replicas the primary steps down and a replica is promoted in its place. A branch running a single instance has nothing to promote, so that instance is restarted where it stands and the branch is unreachable while it comes back. Read `method` on the response to see which one the branch got. A branch accepts one switchover at a time. A switchover that ends in the `failed` state has an unconfirmed outcome: the primary may still have moved, and nothing is rolled back. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_CREATE_TRAFFIC_BUDGET` | Create a traffic budget | Create a traffic budget. PostgreSQL databases only. |
| `PLANETSCALE_CREATE_TRAFFIC_RULE` | Create a traffic rule | Create a traffic rule. PostgreSQL databases only. |
| `PLANETSCALE_CREATE_WEBHOOK` | Create a webhook | Create a webhook. |
| `PLANETSCALE_DELETE_BACKUP` | Delete a backup | Delete a backup. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_BACKUP_POLICY` | Delete a backup policy | Delete a backup policy. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_BOUNCER` | Delete a bouncer | Delete a bouncer. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_BRANCH` | Delete a branch | Delete a branch. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_DATABASE` | Delete a database | Delete a database. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_DATABASE_POSTGRES_CIDR` | Delete an IP restriction entry | Delete an IP restriction entry. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_ORGANIZATION_BILLING_PAYMENT_METHOD` | Delete the current billing payment method | Delete the current payment method for an organization. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_ORGANIZATION_SSO_DOMAIN` | Delete an SSO domain | Delete a verified or pending SSO domain. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_ORGANIZATION_TEAM` | Delete an organization team | Delete an organization team. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_PASSWORD` | Delete a password | Delete a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_QUERY_PATTERNS_REPORT` | Delete a query patterns report | Delete a query patterns report. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_READ_ONLY_REPLICA` | Delete a read-only replica | Delete a read-only replica. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_ROLE` | Delete role credentials | Delete role credentials. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_ROUTER` | Delete a router from a Neki branch | Delete a router from a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_SHARD` | Remove a shard from a Neki branch | Remove a shard from a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE` | Delete a shard configuration profile for a Neki branch | Delete a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE_SHARD` | Remove a shard from a Neki shard configuration profile | Remove a shard from a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_SHARD_CONFIGURATION_PROFILE_SHARDS` | Remove shards from a Neki shard configuration profile | Remove shards from a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_TRAFFIC_BUDGET` | Delete a traffic budget | Delete a traffic budget. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_TRAFFIC_RULE` | Delete a traffic rule | Delete a traffic rule. PostgreSQL databases only. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DELETE_WEBHOOK` | Delete a webhook | Delete a webhook. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DEMOTE_BRANCH` | Demote a branch | Demotes a branch from production to development. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_DISABLE_ORGANIZATION_SSO` | Disable organization SSO | Disable SSO and directory sync for the organization. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DISABLE_ORGANIZATION_SSO_DIRECTORY` | Disable directory sync | Disable directory sync for the organization. Non-admin directory members are removed. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DISABLE_SAFE_MIGRATIONS` | Disable safe migrations for a branch | Disable safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This is destructive: confirm the target before calling. |
| `PLANETSCALE_DISMISS_SCHEMA_RECOMMENDATION` | Dismiss a schema recommendation | Dismiss a schema recommendation. |
| `PLANETSCALE_ENABLE_ORGANIZATION_SSO` | Enable organization SSO | Enable the SSO add-on and return a URL for verifying an email domain. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_ENABLE_ORGANIZATION_SSO_DIRECTORY` | Open the directory sync portal | Return a URL for configuring directory sync. Requires SSO to be enabled. |
| `PLANETSCALE_ENABLE_SAFE_MIGRATIONS` | Enable safe migrations for a branch | Enable safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_FORCE_CUTOVER_DEPLOY_REQUEST` | Enable force cutover for a deploy request | Enable force cutover for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_GET_ADMIN` | Get the admin for a Neki branch | Get the admin for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_ADMIN_CHANGE_REQUEST` | Get a change request for a Neki admin | Get a change request for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_BACKUP` | Get a backup | Get a backup. |
| `PLANETSCALE_GET_BACKUP_POLICY` | Get a backup policy | Get a backup policy. |
| `PLANETSCALE_GET_BOUNCER` | Get a bouncer | Get a bouncer. PostgreSQL databases only. |
| `PLANETSCALE_GET_BRANCH` | Get a branch | Get a branch. |
| `PLANETSCALE_GET_BRANCH_ANOMALY` | Retrieve a branch anomaly | Retrieve a branch anomaly. |
| `PLANETSCALE_GET_BRANCH_CHANGE_REQUEST` | Get a branch change request | Get a branch change request. PostgreSQL databases only. |
| `PLANETSCALE_GET_BRANCH_KEYSPACE_TABLE_METRICS` | Get table storage metrics by keyspace | Get table storage metrics by keyspace. |
| `PLANETSCALE_GET_BRANCH_METRICS` | Get time-series metrics | Retrieve time-series metrics for a database branch. ```sh curl --get \\ --header "Authorization: $PLANETSCALE_SERVICE_TOKEN" \\ --data-urlencode "metrics=queries" \\ --data-urlencode "period=15m" \\ "https://api.planetscale.com/v1/organizations/acme/databases/app-db/branches/main/metrics" ``` Each series contains its metric name, display label, identifying labels, and sampled `[Unix timestamp, value]` points: ```json { "type": "MetricSeries", "start_date": "2026-09-09T17:00:00Z", "end_date": "2026-09-09T17:15:00Z", "interval": 60, "series": [ { "type": "TimeSeries", "metric": "queries", "label": "Queries", "labels": { "tablet_type": "primary" }, "points": [[1788973200, 42.0]] } ] } ```. |
| `PLANETSCALE_GET_BRANCH_QUERY` | Retrieve a branch query | Retrieve a branch query. |
| `PLANETSCALE_GET_BRANCH_QUERY_ERROR` | List queries for an error fingerprint | List queries for an error fingerprint. |
| `PLANETSCALE_GET_BRANCH_QUERY_METRICS` | Get time-series metrics for SQL queries | Get time-series metrics for SQL queries. |
| `PLANETSCALE_GET_BRANCH_QUERY_TAG` | Retrieve a query tag | Retrieve a query tag. |
| `PLANETSCALE_GET_BRANCH_RESIZE_REQUEST` | Get a branch resize request | Get a branch resize request. |
| `PLANETSCALE_GET_BRANCH_SCHEMA` | Get a branch schema | Get a branch schema. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_BRANCH_TABLE_METRICS` | Get table storage metrics | Get table storage metrics. |
| `PLANETSCALE_GET_BRANCH_TAG_METRICS` | Get time-series metrics grouped by query tags | Get time-series metrics grouped by query tags. |
| `PLANETSCALE_GET_CURRENT_USER` | Get current user | Get the user associated with the current OAuth access token. |
| `PLANETSCALE_GET_DATABASE` | Get a database | Get a database. |
| `PLANETSCALE_GET_DATABASE_POSTGRES_CIDR` | Get an IP restriction entry | Get an IP restriction entry. PostgreSQL databases only. |
| `PLANETSCALE_GET_DATABASE_THROTTLER` | Get database throttler configurations | Get database throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_DATA_TOPOLOGY` | Get the data topology for a Neki branch | Get the data topology for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_DEFAULT_ROLE` | Get the default postgres role | Get the default postgres role. PostgreSQL databases only. |
| `PLANETSCALE_GET_DEFAULT_SHARD_CONFIGURATION_PROFILE` | Get the default shard configuration profile for a Neki branch | Get the default shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_DEPLOYMENT` | Get a deployment | Get the deployment for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_DEPLOY_QUEUE` | Get the deploy queue | The deploy queue returns the current list of deploy requests in the order they will be deployed. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_DEPLOY_REQUEST` | Get a deploy request | Get a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_DEPLOY_REQUEST_THROTTLER` | Get deploy request throttler configurations | Get deploy request throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_INSIGHTS_AGENT_RUN` | Get an Insights agent run | Get an Insights agent run. |
| `PLANETSCALE_GET_INSTANT_BRANCH_METRICS` | Get current metric values | Get current metric values. |
| `PLANETSCALE_GET_INSTANT_TABLET_METRICS` | Get current tablet metrics | Get current tablet metrics. |
| `PLANETSCALE_GET_INVOICE` | Get an invoice | Get an invoice. |
| `PLANETSCALE_GET_INVOICE_LINE_ITEMS` | Get invoice line items | Get the line items for an invoice. |
| `PLANETSCALE_GET_MAINTENANCE_SCHEDULE` | Get a maintenance schedule | Get a maintenance schedule. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_NEKI_CHANGE_REQUEST` | Get a change request for a Neki branch | Get a change request for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_ORGANIZATION` | Get an organization | Get an organization. |
| `PLANETSCALE_GET_ORGANIZATION_BILLING_PAYMENT_METHOD` | Get the current billing payment method | Get the current payment method for an organization. |
| `PLANETSCALE_GET_ORGANIZATION_MEMBERSHIP` | Get an organization member | Get an organization member by a user ID or membership ID returned by `list_organization_members`. The action uses PlanetScale's documented detail route first and falls back to the paginated member list when the provider returns 404 for an ID it just listed. |
| `PLANETSCALE_GET_ORGANIZATION_SSO` | Get organization SSO status | Get SSO add-on status, identity provider connection state, directory sync, and verified domains. |
| `PLANETSCALE_GET_ORGANIZATION_SSO_DOMAIN` | Get an SSO domain | Get a registered SSO email domain and its verification state. |
| `PLANETSCALE_GET_ORGANIZATION_TEAM` | Get an organization team | Get an organization team. |
| `PLANETSCALE_GET_ORGANIZATION_TEAM_MEMBER` | Get a team member | Get a team member. |
| `PLANETSCALE_GET_PASSWORD` | Get a password | Get a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_GET_PAYMENT_METHOD_SETUP` | Get a billing payment method setup | Get the state of a billing payment method setup. |
| `PLANETSCALE_GET_QUERY_PATTERNS_REPORT` | Download a finished query patterns report | Download a finished query patterns report. |
| `PLANETSCALE_GET_QUERY_PATTERNS_REPORT_STATUS` | Show the status of a query patterns report | Show the status of a query patterns report. |
| `PLANETSCALE_GET_QUERY_STATISTICS` | Retrieve query statistics | Retrieve query statistics. |
| `PLANETSCALE_GET_QUERY_SUMMARY` | Retrieve a summary of query statistics | Retrieve a summary of query statistics. |
| `PLANETSCALE_GET_READ_ONLY_REPLICA` | Get a read-only replica | Get a read-only replica. |
| `PLANETSCALE_GET_ROLE` | Get a role | Get a role. PostgreSQL databases only. |
| `PLANETSCALE_GET_ROUTER` | Get a router for a Neki branch | Get a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_ROUTER_CHANGE_REQUEST` | Get a change request for a Neki router | Get a change request for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SCHEMA_RECOMMENDATION` | Get a schema recommendation | Get a schema recommendation. |
| `PLANETSCALE_GET_SHARD` | Get a shard for a Neki branch | Get a shard for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE` | Get a shard configuration profile for a Neki branch | Get a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUEST` | Get a change request for a Neki shard configuration profile | Get a change request for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SHARD_CONFIGURATION_PROFILE_SHARD` | Get a shard in a Neki shard configuration profile | Get a shard in a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SIDECAR` | Get a sidecar for a Neki branch | Get a sidecar for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SIDECAR_CHANGE_REQUEST` | Get a change request for a Neki sidecar | Get a change request for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_GET_SWITCHOVER` | Get a switchover | Get a switchover. PostgreSQL databases only. |
| `PLANETSCALE_GET_TABLET_METRICS` | Get time-series tablet metrics | Get time-series tablet metrics. |
| `PLANETSCALE_GET_TRAFFIC_BUDGET` | Get a traffic budget | Get a traffic budget. PostgreSQL databases only. |
| `PLANETSCALE_GET_WEBHOOK` | Get a webhook | Get a webhook. |
| `PLANETSCALE_LINT_BRANCH_SCHEMA` | Lint a branch schema | Lint a branch schema. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_ADMIN_CHANGE_REQUESTS` | List change requests for a Neki admin | List change requests for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ADMIN_PARAMETERS` | List parameters for a Neki admin | List parameters for a Neki admin. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ADMIN_SIZE_SKUS` | List admin size SKUs for a Neki branch | List admin size SKUs for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_AUDIT_LOGS` | List audit logs | List audit logs. |
| `PLANETSCALE_LIST_BACKUP_POLICIES` | List backup policies | List backup policies. |
| `PLANETSCALE_LIST_BACKUPS` | List backups | List backups. |
| `PLANETSCALE_LIST_BOUNCER_RESIZE_REQUESTS` | Get bouncer resize requests | Get bouncer resize requests. PostgreSQL databases only. |
| `PLANETSCALE_LIST_BOUNCERS` | List bouncers | List bouncers. PostgreSQL databases only. |
| `PLANETSCALE_LIST_BRANCH_ANOMALIES` | List branch anomalies | List branch anomalies. |
| `PLANETSCALE_LIST_BOUNCER_RESIZE_REQUESTS` | Get bouncer resize requests | Get bouncer resize requests. PostgreSQL databases only. |
| `PLANETSCALE_LIST_BRANCH_CHANGE_REQUESTS` | Get branch change requests | Get branch change requests. PostgreSQL databases only. |
| `PLANETSCALE_LIST_BRANCHES` | List branches | List branches. |
| `PLANETSCALE_LIST_BRANCH_QUERIES` | List branch queries | List branch queries. |
| `PLANETSCALE_LIST_BRANCH_QUERY_ERRORS` | List branch query errors | List branch query errors. |
| `PLANETSCALE_LIST_BRANCH_QUERY_TAGS` | List query tags | List query tags. |
| `PLANETSCALE_LIST_BRANCH_QUERY_TAG_SUMMARIES` | List query statistics grouped by tag | List query statistics grouped by tag. |
| `PLANETSCALE_LIST_BRANCH_RESIZE_REQUESTS` | Get branch resize requests | Get branch resize requests. |
| `PLANETSCALE_LIST_CLUSTER_SIZE_SKUS` | List available cluster sizes | List available cluster sizes for an organization. |
| `PLANETSCALE_LIST_DATABASE_POSTGRES_CIDRS` | List IP restriction entries | List IP restriction entries. PostgreSQL databases only. |
| `PLANETSCALE_LIST_DATABASE_REGIONS` | List database regions | List database regions. |
| `PLANETSCALE_LIST_DATABASES` | List databases | List databases. |
| `PLANETSCALE_LIST_DEPLOY_OPERATIONS` | List deploy operations | List deploy operations for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_DEPLOY_REQUEST_REVIEWS` | List deploy request reviews | List deploy request reviews. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_DEPLOY_REQUESTS` | List deploy requests | List deploy requests for a database. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_EXTENSIONS` | List cluster extensions | List cluster extensions. PostgreSQL databases only. |
| `PLANETSCALE_LIST_GENERATED_QUERY_PATTERNS_REPORTS` | List generated query patterns reports | List generated query patterns reports. |
| `PLANETSCALE_LIST_INSIGHTS_AGENT_RUNS` | List Insights agent runs | List Insights agent runs. |
| `PLANETSCALE_LIST_INSIGHTS_AGENT_SCHEDULES` | List Insights Agent schedules | List Insights Agent schedules. |
| `PLANETSCALE_LIST_INVOICES` | Get invoices | Get the invoices for an organization. |
| `PLANETSCALE_LIST_MAINTENANCE_SCHEDULES` | List maintenance schedules | List maintenance schedules. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_MAINTENANCE_WINDOWS` | List maintenance windows | List maintenance windows. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_NEKI_CHANGE_REQUESTS` | List change requests for a Neki branch | List change requests for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ORGANIZATION_MEMBERS` | List organization members | List organization members. |
| `PLANETSCALE_LIST_ORGANIZATIONS` | List organizations | When using a service token, returns the list of organizations the service token has access to. When using an OAuth token, returns the list of organizations the user has access to. |
| `PLANETSCALE_LIST_ORGANIZATION_SSO_DOMAINS` | List organization SSO domains | List email domains registered for organization SSO. |
| `PLANETSCALE_LIST_ORGANIZATION_TEAM_MEMBERS` | List team members | List team members. |
| `PLANETSCALE_LIST_ORGANIZATION_TEAMS` | List teams in an organization | List teams in an organization. |
| `PLANETSCALE_LIST_PARAMETERS` | List cluster parameters | Returns the parameters for a branch. To update the parameters, use the "update_branch_change_request" endpoint. PostgreSQL databases only. |
| `PLANETSCALE_LIST_PASSWORDS` | List passwords | List passwords. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_LIST_POSTGRES_VERSIONS` | List available Postgres versions | List the published Postgres versions available to the requested engine. PostgreSQL databases only. |
| `PLANETSCALE_LIST_READ_ONLY_REGIONS` | List read-only regions | List read-only regions for the database's default branch. |
| `PLANETSCALE_LIST_READ_ONLY_REPLICA_CHANGE_REQUESTS` | Get read-only replica change requests | Get read-only replica change requests. |
| `PLANETSCALE_LIST_READ_ONLY_REPLICAS` | List read-only replicas | List read-only replicas. |
| `PLANETSCALE_LIST_REGIONS_FOR_ORGANIZATION` | List regions for an organization | List regions for an organization. |
| `PLANETSCALE_LIST_ROLES` | List roles | List roles. PostgreSQL databases only. |
| `PLANETSCALE_LIST_ROUTER_CHANGE_REQUESTS` | List change requests for a Neki router | List change requests for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ROUTER_PARAMETERS` | List parameters for a Neki router | List parameters for a Neki router. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ROUTERS` | List routers for a Neki branch | List routers for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_ROUTER_SIZE_SKUS` | List router size SKUs for a Neki branch | List router size SKUs for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SCHEMA_RECOMMENDATIONS` | List schema recommendations | List schema recommendations. |
| `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_CHANGE_REQUESTS` | List change requests for a Neki shard configuration profile | List change requests for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_EXTENSIONS` | List extensions for a Neki shard configuration profile | List extensions for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_PARAMETERS` | List parameters for a Neki shard configuration profile | List parameters for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILES` | List shard configuration profiles for a Neki branch | List shard configuration profiles for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SHARD_CONFIGURATION_PROFILE_SHARDS` | List shards for a Neki shard configuration profile | List shards for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SHARDS` | List shards for a Neki branch | List shards for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SIDECAR_CHANGE_REQUESTS` | List change requests for a Neki sidecar | List change requests for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SIDECAR_PARAMETERS` | List parameters for a Neki sidecar | List parameters for a Neki sidecar. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SIDECARS` | List sidecars for a Neki branch | List sidecars for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_LIST_SWITCHOVERS` | List switchovers | List switchovers. PostgreSQL databases only. |
| `PLANETSCALE_LIST_TRAFFIC_BUDGETS` | List traffic budgets | List traffic budgets. PostgreSQL databases only. |
| `PLANETSCALE_LIST_TRAFFIC_BUDGETS_FOR_QUERY` | List traffic budgets affecting a query fingerprint | List traffic budgets affecting a query fingerprint. PostgreSQL databases only. |
| `PLANETSCALE_LIST_WEBHOOKS` | List webhooks | List webhooks for a database. |
| `PLANETSCALE_OAUTH_TOKEN_INFO` | Get OAuth token info | Inspect whether the current OAuth access token is active and return its scopes and expiry. |
| `PLANETSCALE_PROMOTE_BRANCH` | Promote a branch | Promotes a branch from development to production. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_QUEUE_DEPLOY_REQUEST` | Queue a deploy request | Queue a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_REASSIGN_ROLE_OBJECTS` | Reassign objects owned by one role to another role | Reassign objects owned by one role to another role. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_REMOVE_ORGANIZATION_MEMBER` | Remove a member from an organization | Remove a member from an organization. This is destructive: confirm the target before calling. |
| `PLANETSCALE_REMOVE_ORGANIZATION_TEAM_MEMBER` | Remove a member from a team | Remove a member from a team. This is destructive: confirm the target before calling. |
| `PLANETSCALE_RENEW_PASSWORD` | Renew a password | Renew a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_RENEW_ROLE` | Renew role expiration | Renew role expiration. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_RESET_DEFAULT_ROLE` | Reset default credentials | Reset default credentials. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_RESET_ROLE` | Reset a role's password | Reset a role's password. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_REVIEW_DEPLOY_REQUEST` | Review a deploy request | Review a deploy request by either approving or commenting on the deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_RUN_BRANCH_MAINTENANCE` | Run maintenance for a Postgres branch | Run maintenance for a Postgres branch. PostgreSQL databases only. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_RUN_SHARD_CONFIGURATION_PROFILE_MAINTENANCE` | Run maintenance for a Neki shard configuration profile | Run maintenance for a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_RUN_SHARD_CONFIGURATION_PROFILES_MAINTENANCE` | Run maintenance for selected Neki shard configuration profiles | Run maintenance for selected Neki shard configuration profiles. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_SET_DEFAULT_SHARD_CONFIGURATION_PROFILE` | Set the default shard configuration profile for a Neki branch | Set the default shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_SKIP_REVERT_PERIOD` | Skip revert period | Skips the revert period for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_TEST_WEBHOOK` | Test a webhook | Sends a test event to the webhook. This changes operational state and may not be safely reversible. |
| `PLANETSCALE_UPDATE_ADMIN` | Update the admin for a Neki branch | Update the admin for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_AUTO_APPLY` | Update auto-apply for deploy request | Enables or disabled the auto-apply setting for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_AUTO_DELETE_BRANCH` | Update auto-delete branch for deploy request | Enables or disabled the auto-delete branch setting for a deploy request. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_BACKUP` | Update a backup | Update a backup. |
| `PLANETSCALE_UPDATE_BACKUP_POLICY` | Update a backup policy | Update a backup policy. |
| `PLANETSCALE_UPDATE_BOUNCER_RESIZE_REQUEST` | Upsert a bouncer resize request | Upsert a bouncer resize request. PostgreSQL databases only. |
| `PLANETSCALE_UPDATE_BRANCH` | Update a branch | Update a branch. |
| `PLANETSCALE_UPDATE_BRANCH_CHANGE_REQUEST` | Upsert a change request for cluster size, replicas, storage, or parameters | Upsert a change request for cluster size, replicas, storage, or parameters. PostgreSQL databases only. |
| `PLANETSCALE_UPDATE_BRANCH_RESIZE_REQUEST` | Upsert a resize request | Upsert a resize request. |
| `PLANETSCALE_UPDATE_DATABASE_POSTGRES_CIDR` | Update an IP restriction entry | Update an IP restriction entry. PostgreSQL databases only. |
| `PLANETSCALE_UPDATE_DATABASE_SETTINGS` | Update database settings | Update database settings. |
| `PLANETSCALE_UPDATE_DATABASE_THROTTLER` | Update database throttler configurations | Update database throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_DATA_TOPOLOGY` | Set the data topology for a Neki branch | Set the data topology for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_DEPLOY_REQUEST_THROTTLER` | Update deploy request throttler configurations | Update deploy request throttler configurations. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_INSIGHTS_AGENT_SCHEDULE` | Update an Insights Agent schedule | Update an Insights Agent schedule. |
| `PLANETSCALE_UPDATE_ORGANIZATION` | Update an organization | Update an organization. |
| `PLANETSCALE_UPDATE_ORGANIZATION_MEMBERSHIP` | Update organization member role | Update organization member role. |
| `PLANETSCALE_UPDATE_ORGANIZATION_TEAM` | Update an organization team | Update an organization team. |
| `PLANETSCALE_UPDATE_PASSWORD` | Update a password | Update a password. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_READ_ONLY_REPLICA` | Update a read-only replica | Update a read-only replica. |
| `PLANETSCALE_UPDATE_ROLE` | Update role name | Update role name. PostgreSQL databases only. |
| `PLANETSCALE_UPDATE_ROUTER` | Update a router for a Neki branch | Update a router for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_SAFE_MIGRATIONS` | Update safe migrations for a branch | Update safe migrations for a branch. Vitess/MySQL databases only; PlanetScale returns 405 for PostgreSQL resources. |
| `PLANETSCALE_UPDATE_SHARD` | Update a shard for a Neki branch | Update a shard for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_SHARD_CONFIGURATION_PROFILE` | Update a shard configuration profile for a Neki branch | Update a shard configuration profile for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_SHARD_CONFIGURATION_PROFILE_SHARD` | Update a shard in a Neki shard configuration profile | Update a shard in a Neki shard configuration profile. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_SIDECAR` | Update a sidecar for a Neki branch | Update a sidecar for a Neki branch. Sharded Neki PostgreSQL databases only; non-sharded branches may return 404. |
| `PLANETSCALE_UPDATE_TRAFFIC_BUDGET` | Update a traffic budget | Update a traffic budget. PostgreSQL databases only. |
| `PLANETSCALE_UPDATE_WEBHOOK` | Update a webhook | Update a webhook. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to PlanetScale
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["planetscale"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["planetscale"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run PlanetScale tools with your agent

Send a request, execute the PlanetScale tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "List all databases in my PlanetScale organization"}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List all databases in my PlanetScale organization" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to PlanetScale and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["planetscale"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["planetscale"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a PlanetScale request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to PlanetScale tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("List all databases in my PlanetScale organization")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List all databases in my PlanetScale organization",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native PlanetScale Integration

- Supports both PlanetScale MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for managing organizations, databases, branches, deploy requests, backups, workflows, and insights

### 2. Managed Auth

- Built-in OAuth handling with automatic token refresh and rotation
- Central place to manage, scope, and revoke PlanetScale access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access PlanetScale
- Scoped, least privilege access to PlanetScale resources
- Full audit trail of agent actions to support review and compliance

## Use PlanetScale with any AI Agent Framework

Choose a framework you want to connect PlanetScale with:

- [ChatGPT](https://composio.dev/toolkits/planetscale/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/planetscale/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/planetscale/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/planetscale/framework/atomic-agent)

## Related Toolkits

- [Supabase](https://composio.dev/toolkits/supabase) - Supabase is an open-source backend platform offering scalable Postgres databases, authentication, storage, and real-time APIs. It lets developers build modern apps without managing infrastructure.
- [Codeinterpreter](https://composio.dev/toolkits/codeinterpreter) - Codeinterpreter is a Python-based coding environment with built-in data analysis and visualization. It lets you instantly run scripts, plot results, and prototype solutions inside supported platforms.
- [GitHub](https://composio.dev/toolkits/github) - GitHub is a code hosting platform for version control and collaborative software development. It streamlines project management, code review, and team workflows in one place.
- [1password](https://composio.dev/toolkits/_1password) - 1Password is a password manager and digital vault for storing logins, secrets, notes, and secure documents. It helps individuals and teams protect credentials, share access safely, and reduce password risk.
- [Ably](https://composio.dev/toolkits/ably) - Ably is a real-time messaging platform for live chat and data sync in modern apps. It offers global scale and rock-solid reliability for seamless, instant experiences.
- [Abuselpdb](https://composio.dev/toolkits/abuselpdb) - Abuselpdb is a central database for reporting and checking IPs linked to malicious online activity. Use it to quickly identify and report suspicious or abusive IP addresses.
- [Alchemy](https://composio.dev/toolkits/alchemy) - Alchemy is a blockchain development platform offering APIs and tools for Ethereum apps. It simplifies building and scaling Web3 projects with robust infrastructure.
- [Algolia](https://composio.dev/toolkits/algolia) - Algolia is a hosted search API that powers lightning-fast, relevant search experiences for web and mobile apps. It helps developers deliver instant, typo-tolerant, and scalable search without complex infrastructure.
- [Anakin](https://composio.dev/toolkits/anakin_io) - Anakin is a web automation platform offering scraping, crawling, search, and browser automation. Use it to extract structured data, automate site tasks, and monitor web changes reliably.
- [Anchor browser](https://composio.dev/toolkits/anchor_browser) - Anchor browser is a developer platform for AI-powered web automation. It transforms complex browser actions into easy API endpoints for streamlined web interaction.
- [Apiflash](https://composio.dev/toolkits/apiflash) - Apiflash is a website screenshot API for programmatically capturing web pages. It delivers high-quality screenshots on demand for automation, monitoring, or reporting.
- [Apiverve](https://composio.dev/toolkits/apiverve) - Apiverve delivers a suite of powerful APIs that simplify integration for developers. It's designed for reliability and scalability so you can build faster, smarter applications without the integration headache.
- [Appcircle](https://composio.dev/toolkits/appcircle) - Appcircle is an enterprise-grade mobile CI/CD platform for building, testing, and publishing mobile apps. It streamlines mobile DevOps so teams ship faster and with more confidence.
- [Appdrag](https://composio.dev/toolkits/appdrag) - Appdrag is a cloud platform for building websites, APIs, and databases with drag-and-drop tools and code editing. It accelerates development and iteration by combining hosting, database management, and low-code features in one place.
- [Appveyor](https://composio.dev/toolkits/appveyor) - AppVeyor is a cloud-based continuous integration service for building, testing, and deploying applications. It helps developers automate and streamline their software delivery pipelines.
- [Authyo](https://composio.dev/toolkits/authyo) - Authyo is a REST API service for passwordless authentication, OTP verification, session management, and transactional notifications. Use it to add secure login flows and user verification without building auth infrastructure from scratch.
- [AWS Marketplace MCP](https://composio.dev/toolkits/aws_marketplace_mcp) - AWS Marketplace MCP provides MCP access to AWS Marketplace's cloud software, data, and services catalog. Use it to discover, compare, and evaluate 30K+ AWS Marketplace listings faster.
- [Azure Monitor Activity Log](https://composio.dev/toolkits/azure_monitor_activity_log) - Azure Monitor Activity Log is Azure's service that records management and control-plane events for a subscription. Use it to audit changes, troubleshoot issues, and track resource operations across your Azure resources.
- [Backendless](https://composio.dev/toolkits/backendless) - Backendless is a backend-as-a-service platform for mobile and web apps, offering database, file storage, user authentication, and APIs. It helps developers ship scalable applications faster without managing server infrastructure.
- [Baserow](https://composio.dev/toolkits/baserow) - Baserow is an open-source no-code database platform for building collaborative data apps. It makes it easy for teams to organize data and automate workflows without writing code.

## Frequently Asked Questions

### Do I need my own developer credentials to use PlanetScale with Composio?

Yes, PlanetScale requires you to configure your own OAuth credentials. Once set up, Composio handles token storage, refresh, and lifecycle management for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
