Skip to main content
Database Bot helps you get started with PlanetScale, understand database performance, and fix slow or failing queries using its MCP server and installed skills.

Add Database Bot

Open the Database Bot by PlanetScale template, then choose Add to Grok Bot.

Connect the PlanetScale plugin

Add PlanetScale to Grok Bot and authorize access to your databases.

Before you begin

You need a PlanetScale account and access to the databases you want to investigate. If you are new to Grok Bot, start with these resources:

Add Database Bot and connect it to PlanetScale

1

Review and add the bot

Open the Database Bot template. You should see Database Bot by PlanetScale.
Database Bot template preview in Grok Bot, showing Context, PlanetScale Webhook Triage, and the Add Bot button
2

Let the agent set itself up

Database Bot creates its memories, skills, and PlanetScale Webhook Triage routine, then prompts you to install the PlanetScale plugin. The routine starts paused.
Database Bot setting itself up and creating the PlanetScale Webhook Triage routine
3

Install the PlanetScale plugin

Accept the PlanetScale plugin installation prompt. If you don’t see it, open the PlanetScale plugin and choose Add.
Database Bot confirming setup is complete and prompting you to install the PlanetScale plugin
4

Authorize PlanetScale

Choose Authorize on the PlanetScale card and follow the PlanetScale authorization flow in your browser.
PlanetScale installed with an Authorize button on its connection card
5

Choose a database

Tell the bot which organization, database, and branch to use. Ask it to verify access with a read-only check before investigating.
For example:

Connect a codebase (optional)

With access to your repository, Database Bot can trace database issues back to your code and help fix them via Cursor Cloud Agents. Tell the bot which repository to work on. If it is not already connected to Cursor, connect your source control account through Cursor Integrations. See Work with Grok Bot for more.

Setting up the webhook routine

Webhooks are optional. They let Database Bot investigate events as they arrive, check whether database changes completed, and flag what needs your attention. Without webhooks, the bot responds when you ask.
1

Configure and enable the routine

Ask the bot to configure PlanetScale Webhook Triage for your chosen organizations and databases, then turn it on. Open the routine to find its Webhook URL and Authorization header.
PlanetScale Webhook Triage routine settings showing the active toggle and webhook endpoint, key, and header with values obscured

Webhook credentials are hidden in this screenshot.

2

Add the webhook in PlanetScale

In your database’s Settings → Webhooks → Add webhook, paste the routine’s Webhook URL into URL and the header value into Authorization header, including the scheme, such as Bearer <token>, without the Authorization: label.
PlanetScale Add webhook form with URL, Authorization header, and event selection fieldsPlanetScale Add webhook form with URL, Authorization header, and event selection fields
3

Choose events and test delivery

Choose the events you want the bot to follow, save the webhook, and use Test webhook. Confirm delivery in PlanetScale and acknowledgment in Grok Bot.Webhooks cover supported events; they don’t notify the bot about every slow query or CPU spike.
See Setting up webhooks for more details.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.