mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
## Summary
- Adds a `list_databases` tool to the notebook AI tools
(`getNotebookTools`), returning `{ identifier, is_primary, region,
status }` for the project's primary and any read replicas, via
`getReadReplicas`.
- Registers `list_databases` in `tool-filter.ts` (opt-in validation
schema + SCHEMA category), and adds a mock fixture in `mock-tools.ts`
for evals.
Part 2/6 of the stack for FE-4225 (expose valid database identifiers to
the notebook AI agent). Stacked on #49327. A later PR in the stack
reinstates `database_identifier` on the agent-facing notebook schema and
requires the agent to call this tool first.
## Test plan
- [x] New test coverage in `notebook-tools.test.ts` for
`list_databases`, including `is_primary` computation
- [x] Existing exact-tool-set assertion updated
- [x] `pnpm --filter studio exec tsc --noEmit` passes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added an AI notebook tool for listing a project’s databases.
* Results include each database’s identifier, region, status, and
whether it is the primary database.
* Supports projects with read replicas.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->