Set up Database Bot to answer database questions, investigate performance, and follow webhook events.
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.
Database Bot creates its memories, skills, and PlanetScale Webhook Triage routine, then prompts you to install the PlanetScale plugin. The routine starts paused.
3
Install the PlanetScale plugin
Accept the PlanetScale plugin installation prompt. If you don’t see it, open the PlanetScale plugin and choose Add.
4
Authorize PlanetScale
Choose Authorize on the PlanetScale card and follow the PlanetScale authorization flow in your browser.
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:
Use PlanetScale organization <organization>, database <database>, branch <branch>.Confirm you can access it, then explain which queries account for the mostexecution time in Insights. Show your evidence and suggested next steps.Do not change the database.
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.
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.
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.
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.