The Planet Scale MCP connector routes your AI agent's tool calls to Planet Scale's own MCP server through Scalekit. Each user signs in to Planet Scale once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 26 tools.
- Tools
- 26
- What they doRead · write · destructive
- 15 · 10 · 115 read10 write1 destructive
- Users sign in with
- OAuth
- OAuth app
- Scalekit's or your own
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Planet Scale MCP connection
In AgentKit > Connections, create a Planet Scale MCP connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Scalekit credentials are available for Planet Scale MCP server, so you don't need to register an OAuth app.
Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'planetscalemcp'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Planet Scale MCP:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'planetscalemcp_planetscale_list_organizations',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "planetscalemcp"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Planet Scale MCP:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="planetscalemcp_planetscale_list_organizations",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user signs in once. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolplanetscalemcp_planetscale_execute_read_queryExecute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN) against a PlanetScale database branch.Read-onlyPlanetscale Execute Read Query
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN) against a PlanetScale database branch.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
querystringrequired- SQL SELECT query to execute
postgres_database_namestring- Postgres only: target database name to connect to. Use when the user has created additional databases in the same PlanetScale Postgres cluster (e.g. via CREATE DATABASE). Omit to use the default database for the branch.
use_replicaboolean- Route read queries to a read replica when the branch has replicas. Defaults to true. Set false to force the primary.
planetscalemcp_planetscale_get_branchGet details about a specific database branch.Read-onlyPlanetscale Get Branch
Get details about a specific database branch.
Inputs
pathParametersobjectrequired- No description.
planetscalemcp_planetscale_get_branch_schemaGet the schema (tables and columns) for a specific database branch.Read-onlyPlanetscale Get Branch Schema
Get the schema (tables and columns) for a specific database branch.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_get_databaseGet details about a specific PlanetScale database.Read-onlyPlanetscale Get Database
Get details about a specific PlanetScale database.
Inputs
pathParametersobjectrequired- No description.
planetscalemcp_planetscale_get_insightsGet query performance insights for a PlanetScale database branch, including top queries aggregated over a time period.Read-onlyPlanetscale Get Insights
Get query performance insights for a PlanetScale database branch, including top queries aggregated over a time period.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
fieldsarray- Request specific metric fields from the API (e.g. ['query', 'count', 'percentTime', 'totalTime', 'cpuTime', 'p50Latency', 'rowsRead', 'rowsReadPerQuery', 'rowsAffected', 'egressBytes', 'egressBytesPerQuery', 'maxEgressBytes', 'ingressBytes', 'ingressBytesPerQuery', 'maxIngressBytes', 'indexes', 'maxShardQueries']). 'cpuTime' is Postgres/Neki-only; 'maxEgressBytes' and ingress* are MySQL/Vitess-only. Ignored when fingerprint is provided.
fingerprintstring- Query fingerprint hash to drill down into a specific query pattern. Use the `fingerprint` value from an initial insights call. Always include `keyspace` (also from the initial results) to get summary data.
fromstring- Start of time range (ISO 8601 format). Defaults to 24 hours ago. A range wider than 25 hours must start on the hour (e.g. '2026-08-19T00:00:00Z') and span at most 365 days; a wide range that is not hour-aligned is rejected, not narrowed. Supported in both discovery and fingerprint modes, though in fingerprint mode only the summary honours a wide range.
keyspacestring- Keyspace for fingerprint drill-down. Required to get summary data. Use the `keyspace` value returned in insights results (e.g. 'my_keyspace' for MySQL/Vitess or 'postgres.public' for Postgres/Neki databases).
limitnumber- Number of results per metric (default: 5, max: 20)
periodstring- Shorthand for a recent time window ending at now. Cannot be combined with from/to — use one or the other. Only supported in discovery mode (ignored in fingerprint mode — use from/to instead).one of
15m1h3h6h12h1d2d7d8d querystring- Filter insights by search query. Supports plain text matching and structured filters: exact match with quotes ("select count"), statement_type:select|delete|update|insert, table:table_name, keyspace:keyspace_name, table_keyspace:keyspace_name, tag:tag_key:tag_value for queries carrying that tag with that value, tag:tag_key on its own for queries carrying the tag whatever its value (including ones whose value went unrecorded), where tag_key is the bare tag name without the 'S'/'B' prefix `list_query_tags` reports and a value containing spaces or colons needs quoting (tag:route:"GET /horses"), index:index_name or index:table.index_name, indexed:true|false, multishard:true|false, query_count:>N or query_count:<N, p99:>N or p50:<N (ms), max_latency:>N (ms). Any term can be negated by an immediately preceding '!' (!tag:app:web). Ignored when fingerprint is provided.
sort_bystring- Sort order: 'all' (default) aggregates curated API calls for a comprehensive view, or specify a single metric: 'count', 'percentTime', 'totalTime', 'cpuTime', 'p50Latency', 'p99Latency', 'rowsRead', 'rowsReadPerQuery', 'rowsReadPerReturned', 'rowsAffected', 'egressBytes', 'egressBytesPerQuery', 'maxEgressBytes', 'ingressBytes', 'ingressBytesPerQuery', 'maxIngressBytes'. 'cpuTime' is Postgres/Neki-only; 'maxEgressBytes' and ingress* are MySQL/Vitess-only. Ignored when fingerprint is provided.one of
allcountpercentTimetotalTimecpuTimep50Latencyp99LatencyrowsReadrowsReadPerQueryrowsReadPerReturnedrowsAffectedegressBytesegressBytesPerQuerymaxEgressBytesingressBytesingressBytesPerQuerymaxIngressBytes tablet_typestring- Filter by tablet type: 'primary' or 'replica'one of
primaryreplica tostring- End of time range (ISO 8601 format). Defaults to now. For a range wider than 25 hours it must land on an hour boundary -- either the top of an hour or its last second ('T13:00:00Z' or 'T12:59:59Z') -- so the simplest way to ask for a wide window is to omit it, which covers everything through the current hour. Supported in both discovery and fingerprint modes.
planetscalemcp_planetscale_get_invoice_line_itemsGet all line items for a specific invoice, broken down by database branch costs.Read-onlyPlanetscale Get Invoice Line Items
Get all line items for a specific invoice, broken down by database branch costs.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_get_organizationGet details about a specific PlanetScale organization.Read-onlyPlanetscale Get Organization
Get details about a specific PlanetScale organization.
Inputs
pathParametersobjectrequired- No description.
planetscalemcp_planetscale_list_branchesList all branches within a PlanetScale database.Read-onlyPlanetscale List Branches
List all branches within a PlanetScale database.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_list_cluster_sizesList available PlanetScale cluster sizes (SKUs) for an organization.Read-onlyPlanetscale List Cluster Sizes
List available PlanetScale cluster sizes (SKUs) for an organization.
Inputs
organizationstringrequired- PlanetScale organization name
enginestring- Database engine to list SKUs for (default: mysql)one of
mysqlpostgresqlneki typestring- Filter to only autoscaling (PS-*, network-backed) or metal (M-*, local storage) sizesone of
autoscalingmetal
planetscalemcp_planetscale_list_databasesList all databases within a PlanetScale organization.Read-onlyPlanetscale List Databases
List all databases within a PlanetScale organization.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_list_invoicesList all invoices for a PlanetScale organization.Read-onlyPlanetscale List Invoices
List all invoices for a PlanetScale organization.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_list_organizationsList all PlanetScale organizations you have access to.Read-onlyPlanetscale List Organizations
List all PlanetScale organizations you have access to.
Inputs
queryParametersobject- No description.
planetscalemcp_planetscale_list_regions_for_organizationList the regions available for a PlanetScale organization.Read-onlyPlanetscale List Regions For Organization
List the regions available for a PlanetScale organization.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_list_schema_recommendationsList all schema recommendations for a PlanetScale database based on production query patterns.Read-onlyPlanetscale List Schema Recommendations
List all schema recommendations for a PlanetScale database based on production query patterns.
Inputs
pathParametersobjectrequired- No description.
queryParametersobject- No description.
planetscalemcp_planetscale_search_documentationSearch the PlanetScale knowledge base for documentation, API references, code examples, and guides.Read-onlyPlanetscale Search Documentation
Search the PlanetScale knowledge base for documentation, API references, code examples, and guides.
Inputs
querystringrequired- Search query for PlanetScale docs and blog posts
planetscalemcp_planetscale_get_branch_metricsGet infrastructure metrics for a PlanetScale branch: CPU, memory, disk, replication lag, connections, PgBouncer, WAL, VTGate, and tablet health.WritePlanetscale Get Branch Metrics
Get infrastructure metrics for a PlanetScale branch: CPU, memory, disk, replication lag, connections, PgBouncer, WAL, VTGate, and tablet health. The database kind selects the endpoint. Vitess uses tablet metrics; Postgres and Neki use branch metrics. view summary (the default) returns latest, min, avg, and max for a small health set plus current disk and connection values, without raw samples. Pod memory utilization includes page cache, so the summary also returns RSS and cache bytes. Vitess shard_storage_usage is percent full, not bytes. Use view series or instant and pass metrics to drill in. Series disk is planetscale_volume_usage_percentages; the current value is planetscale_volume_usage_percentage. Postgres and Neki names look like planetscale_primary_pods_cpu_util_percentages. Vitess tablet names are short, like primary_cpu_usage and replication_lag. Use get_insights for which queries are slow. Set include_points to return samples, at most 60 per series. Summary rolls per-pod series up to the busiest shard or role.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
containerstring- Filter by container
fromstring- Start of a custom range as an ISO 8601 timestamp
include_pointsboolean- Include sampled points. Defaults to false. At most 60 points per series.
keyspacestring- Filter by keyspace
metricsarray- Metric names. Omit for summary. Required for series and instant. Unknown names are rejected using the branch catalog instead of being dropped.
periodstring- Named time period. Defaults to 1h. Ignored when from or to is set.one of
15m1h3h6h12h1d2d7d8d podstring- Filter by pod
rolestring- Filter by Postgres role, such as primary or replica
shardstring- Filter by shard
stepsnumber- Point count when include_points is true. Defaults to 24 and is capped at 60.
tablet_typestring- Filter Vitess branch series by tablet type
tostring- End of a custom range as an ISO 8601 timestamp
viewstring- summary (default) is a curated health snapshot. series is historical metrics. instant is current values.one of
summaryseriesinstant workflowstring- Vitess VReplication workflow id. Only valid with metric vreplication_lag.
planetscalemcp_planetscale_get_organization_billing_payment_methodGet the current payment method for an organizationWritePlanetscale Get Organization Billing Payment Method
Get the current payment method for an organization
Inputs
pathParametersobjectrequired- No description.
planetscalemcp_planetscale_get_payment_method_setupGet a Stripe Checkout payment method setup started by update_payment_method.WritePlanetscale Get Payment Method Setup
Get a Stripe Checkout payment method setup started by update_payment_method. Use the setup_id returned by that tool; it is not a payment method ID. This is a one-time check and does not wait. If pending, give checkout_url to the customer and call this tool again only after they finish Checkout. If completed, this tool also returns the saved card brand, last four digits, expiration, and cardholder name as confirmation. Failed or expired setups cannot be resumed. Requires full access to the organization's payment method to inspect the setup and return the saved card.
Inputs
organizationstringrequired- PlanetScale organization name
setup_idstringrequired- Payment method setup ID returned by update_payment_method, not a card or payment method ID
planetscalemcp_planetscale_get_postgres_logsFetch server logs for a PlanetScale Postgres or Neki database branch (not available for Vitess/MySQL databases).WritePlanetscale Get Postgres Logs
Fetch server logs for a PlanetScale Postgres or Neki database branch (not available for Vitess/MySQL databases). Returns recent log entries sorted newest first. Supports filtering by log level, time range, server role, and pod name, plus an optional raw LogsQL query for advanced filtering (e.g. word matching, field filters, and pipe stages like 'error | stats count()'). Default time window is the last hour.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
fromstring- Start of time range (ISO 8601, e.g. '2026-08-17T00:00:00Z'). Must be used together with 'to'.
levelsarray- Filter to specific log levels: 'INFO', 'DEBUG', 'WARNING', 'ERROR'. Omit for all levels.
limitinteger- Number of log entries to return (default: 50, max: 1000)
pageinteger- Page number for pagination (default: 1)
periodstring- Recent time window ending at now, written as number+unit with no spaces (units: ms, s, m, h, d, w, y), e.g. '5m', '30m', '1h', '6h', '24h', '7d'. Cannot be combined with from/to. Defaults to '1h' when no time range is given.
podsarray- Filter to specific pod names.
querystring- Optional LogsQL filter expression matched against log content (e.g. 'checkpoint', 'error AND connection'). May include pipe stages after '|'. The tool appends its own 'sort by (_time desc)' and pagination stages after any supplied here, so a custom 'sort by' stage is overridden. Defaults to '*' (all logs).
rolestring- Filter to servers in this role: 'primary' or 'replica'. Omit for all roles.one of
primaryreplica tostring- End of time range (ISO 8601). Must be used together with 'from'.
planetscalemcp_planetscale_get_query_tagFetch one query tag on a PlanetScale database branch, with its values and their query counts.WritePlanetscale Get Query Tag
Fetch one query tag on a PlanetScale database branch, with its values and their query counts. Pass the `id` from `list_query_tags`, prefix included -- an unprefixed or unknown id returns a not-found error. Value entries carry the same `kind` ('literal', 'overflow', 'collapsed') as the listing. Use this to re-read a single tag's values under different filters -- a narrower time window, a specific fingerprint or keyspace, or `literal_values_only` -- without listing every tag on the branch again. Data comes from PlanetScale Insights. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
tagstringrequired- The tag id to fetch, e.g. 'Sapp' or 'Busername'. Use an `id` value from `list_query_tags`, keeping its 'S'/'B' prefix. A tag whose name contains a '.' cannot be fetched here, because the API's route splits the path on it.
fingerprintstring- Only include tags that appear on queries with this fingerprint. Get one from `get_insights`.
fromstring- Start of time range (ISO 8601 format). Defaults to 24 hours ago. A range wider than 25 hours must start on the hour (e.g. '2026-08-19T00:00:00Z') and span at most 365 days; a wide range that is not hour-aligned is rejected, not narrowed.
keyspacestring- Only include tags that appear on queries against this keyspace.
literal_values_onlyboolean- Return only real recorded values, dropping the synthetic 'Other' (overflow) and 'Collapsed' entries. Note that 'Other' is the only signal that values beyond `values_limit` exist, so dropping it leaves no indication that the value list is partial -- the response's `truncated` field counts tags, not values.
periodstring- Shorthand for a recent time window ending at now. Cannot be combined with from/to.one of
15m1h3h6h12h1d2d7d8d tablet_typestring- Filter by tablet type: 'primary', 'replica', or 'rdonly'.one of
primaryreplicardonly tostring- End of time range (ISO 8601 format). Defaults to now. For a range wider than 25 hours it must land on an hour boundary -- either the top of an hour or its last second ('T13:00:00Z' or 'T12:59:59Z') -- so the simplest way to ask for a wide window is to omit it, which covers everything through the current hour.
values_limitnumber- Maximum number of literal values returned per tag (default: 25, max: 100). Values outside that range are clamped. The 'Other' and 'Collapsed' buckets are counted separately and still returned.
planetscalemcp_planetscale_list_query_error_executionsList the individual captured query executions that failed with a given error fingerprint on a PlanetScale database branch.WritePlanetscale List Query Error Executions
List the individual captured query executions that failed with a given error fingerprint on a PlanetScale database branch. Each execution includes the normalized SQL, tables, keyspace, user, row counts, duration, error message, and query tags. Get an `error_fingerprint` from `list_query_error_patterns` first. This endpoint cannot filter by tablet type, so executions from all tablet types are returned even when the fingerprint came from a tablet-filtered pattern list. Data comes from PlanetScale Insights. Default time window is the last 24 hours. These results describe individual query executions, so unlike `get_insights` and the query tag tools the window is capped at 25 hours: a wider from/to falls back to the default window server-side.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
error_fingerprintstringrequired- Error fingerprint identifying the error to list executions for. Use the `error_fingerprint` value from `list_query_error_patterns`.
organizationstringrequired- PlanetScale organization name
fromstring- Start of time range (ISO 8601 format). Defaults to 24 hours ago. These endpoints report individual query executions and do not serve the wide windows `get_insights` and the query tag tools do: a range longer than 25 hours falls back to the default window instead of being rejected, which makes recent data look like a wide-window answer.
limitnumber- Maximum number of results to return (default: 25, max: 100). These endpoints do not paginate, so when a response reports truncated: true, raise this limit or narrow the time window to see the rest.
periodstring- Shorthand for a recent time window ending at now. Cannot be combined with from/to.one of
15m1h3h6h12h1d2d7d8d tostring- End of time range (ISO 8601 format). Defaults to now.
planetscalemcp_planetscale_list_query_error_patternsList failing queries for a PlanetScale database branch, aggregated by error fingerprint.WritePlanetscale List Query Error Patterns
List failing queries for a PlanetScale database branch, aggregated by error fingerprint. Each pattern reports the error message, how many times it occurred, when it was last seen, and total/average duration. Use `list_query_error_executions` with an `error_fingerprint` from these results to see the individual failed executions behind a pattern. Data comes from PlanetScale Insights. Default time window is the last 24 hours. These results describe individual query executions, so unlike `get_insights` and the query tag tools the window is capped at 25 hours: a wider from/to falls back to the default window server-side.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
fromstring- Start of time range (ISO 8601 format). Defaults to 24 hours ago. These endpoints report individual query executions and do not serve the wide windows `get_insights` and the query tag tools do: a range longer than 25 hours falls back to the default window instead of being rejected, which makes recent data look like a wide-window answer.
limitnumber- Maximum number of results to return (default: 25, max: 100). These endpoints do not paginate, so when a response reports truncated: true, raise this limit or narrow the time window to see the rest.
periodstring- Shorthand for a recent time window ending at now. Cannot be combined with from/to.one of
15m1h3h6h12h1d2d7d8d querystring- Search error patterns by error message text.
sort_bystring- Sort error patterns by: 'count' (default, most frequent), 'lastRun' (most recent), 'error' (message), 'totalTime', or 'timePerQuery'.one of
errorlastRuncounttotalTimetimePerQuery tablet_typestring- Filter by tablet type: 'primary', 'replica', or 'rdonly'.one of
primaryreplicardonly tostring- End of time range (ISO 8601 format). Defaults to now.
planetscalemcp_planetscale_list_query_tag_summariesBreak query statistics on a PlanetScale database branch down by query tag value -- total time, latency, rows read, and errors per application, route, job, or user.WritePlanetscale List Query Tag Summaries
Break query statistics on a PlanetScale database branch down by query tag value -- total time, latency, rows read, and errors per application, route, job, or user. This is the tool that answers 'which part of my app is causing this load', as opposed to `get_insights`, which answers 'which query'. Pass one or more tag `id` values from `list_query_tags` in `tags`; several ids group by the combination of their values. Each row's `dimensions` maps the grouped tag ids to that row's values. Rows are sorted descending by `sort_by` (default 'totalTime'). A curated set of metrics is requested by default; `fields` widens or narrows it, and the response echoes the effective set as a map from each requested name to the key it is serialized under, since the two differ (`count` arrives as `query_count`). Metrics outside that set are stripped, so a 0 on a returned metric is a real measurement rather than an unrequested field. The `sort_by` metric is always included, whether or not it was asked for. `dimension_counts` reports how many matched queries had the grouping tag's value collapsed (`collapsed_count`) out of the total (`total_count`) -- those queries carry the tag, but their value was never recorded and cannot be recovered. Data comes from PlanetScale Insights. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
tagsarrayrequired- Tag ids to group by, taken from the `id` values returned by `list_query_tags` with their prefix intact, e.g. ['Sapp'] or ['Sapp', 'Broute']. Several ids group by the combination of their values. An id missing its 'S'/'B' prefix is rejected.
fieldsarray- Metric fields to return. Defaults to a curated set (dimensions, count, errorCount, totalTime, percentTime, p50Latency, p99Latency, rowsRead, rowsReadPerReturned, rowsAffected, egressBytes, lastRun), because omitting this server-side returns all 43 metrics and most of them will be zero-fill for any one question. 'dimensions' is always included, since without it the rows cannot be told apart. The response echoes the effective set as `fields`, mapping each requested name to the key it is serialized under (`count` arrives as `query_count`); metrics outside that set are stripped, so a 0 on a returned metric is a real measurement.
fromstring- Start of time range (ISO 8601 format). Defaults to 24 hours ago. A range wider than 25 hours must start on the hour (e.g. '2026-08-19T00:00:00Z') and span at most 365 days; a wide range that is not hour-aligned is rejected, not narrowed.
limitnumber- Maximum number of summary rows to return (default: 25, max: 100). This endpoint does not paginate, so when a response reports truncated: true, raise this limit or narrow the time window, tags, or query.
periodstring- Shorthand for a recent time window ending at now. Cannot be combined with from/to.one of
15m1h3h6h12h1d2d7d8d querystring- Filter the query statistics being summarized. This is a structured search, not a plain substring: supported terms include `fingerprint:<hash>`, `keyspace:<name>`, `tag:<key>:<value>` (or `tag:<key>` for any value), `user:<name>`, `statement_type:<type>`, `table:<name>`, `index:<name>`, and comparisons like `p99:>100`, while a bare word matches the normalized SQL. Prefix a term with '!' to negate it. This is also the only way to restrict these summaries to one fingerprint or keyspace -- unlike `list_query_tags`, this endpoint has no separate fingerprint or keyspace filter.
sort_bystring- Metric to sort rows by, descending. Defaults to 'totalTime'. Accepts any name listed under `fields`.one of
dimensionslastRuncounterrorCountrowsReadrowsAffectedrowsReturnedrowsReadPerReturnedrowsReadPerQueryrowsReturnedPerQueryrowsAffectedPerQuerytotalTimecpuTimeioTimepercentTimepercentCpuTimepercentIoTimesumShardQueriesmaxShardQueriesavgShardQueriesavgParallelWorkerstablequalifiedTabletableKeyspaceindexesroutingIndexesp50Latencyp99LatencymaxLatencyegressBytesegressBytesPerQuerymaxEgressBytesingressBytesingressBytesPerQuerymaxIngressBytesblocksReadblocksHitblockCacheHitRatioblocksDirtiedblocksWrittentrafficControlWarningstrafficControlThrottledtrafficControlChecked statement_typestring- Only summarize queries of this statement type.one of
SELECTINSERTUPDATEDELETE tablet_typestring- Filter by tablet type: 'primary', 'replica', or 'rdonly'.one of
primaryreplicardonly tostring- End of time range (ISO 8601 format). Defaults to now. For a range wider than 25 hours it must land on an hour boundary -- either the top of an hour or its last second ('T13:00:00Z' or 'T12:59:59Z') -- so the simplest way to ask for a wide window is to omit it, which covers everything through the current hour.
planetscalemcp_planetscale_update_payment_methodStart a secure Stripe Checkout session to add or replace an organization's billing card.WritePlanetscale Update Payment Method
Start a secure Stripe Checkout session to add or replace an organization's billing card. Use when a customer asks to add, set, replace, or update their PlanetScale payment method. This tool never collects card details: return checkout_url to the customer and let them complete Stripe Checkout in their browser. It returns a setup_id; do not call this tool again while that setup is pending. After the customer finishes, call get_payment_method_setup with the same organization and setup_id. Requires full access to the organization's payment method.
Inputs
organizationstringrequired- PlanetScale organization name
planetscalemcp_planetscale_execute_write_queryExecute a write SQL query (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database branch.DestructivePlanetscale Execute Write Query
Execute a write SQL query (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database branch.
Inputs
branchstringrequired- Branch name (e.g., 'main')
databasestringrequired- Database name
organizationstringrequired- PlanetScale organization name
querystringrequired- SQL INSERT/UPDATE/DELETE/DDL query to execute
confirm_destructiveboolean- HUMAN CONFIRMATION REQUIRED: Only set to true after explicitly asking the user and receiving their approval. Show them the exact DELETE or DDL query first.
postgres_database_namestring- Postgres only: target database name to connect to. Use when the user has created additional databases in the same PlanetScale Postgres cluster (e.g. via CREATE DATABASE). Omit to use the default database for the branch.
No tools match.