create_prisma_postgres_database
Create a new managed Prisma Postgres database.
Specify a name that makes sense to the user - maybe the name of the project they are working on.
Specify a region that makes sense for the user. Valid regions are: us-east-1,us-west-1,eu-west-3,eu-central-1,ap-northeast-1,ap-southeast-1. If you are unsure, pick us-east-1.
If the response indicates that you have reached the workspace plan limit, you should instruct the user to do one of these things:
- If they want to connect to an existing database, they should go to console.prisma.io and copy the connection string.
- If they want to upgrade their plan, they should go to console.prisma.io and upgrade their plan in order to be able to create more databases.
- If they want to delete a database, they can list these via the List-Prisma-Postgres-Databases tool and then delete one they no longer need.
If the response is successful:
- If the user has the prisma client installed, offer to populate their .env file with the DATABASE_URL value.
list_prisma_postgres_databases
Fetch a list of available Prisma Postgres Databases for user's workspace.
Each database in the response includes an 'id' field which should be used as the 'databaseId' parameter
for other tools like introspect_database_schema or execute_sql_query.
If the response indicates that you have no databases you should instruct the user to do one of these things:
- If they want to create a new database, they should use the Create-Prisma-Postgres-Database tool
- If they want to connect to an existing database, they should go to console.prisma.io and copy the connection string
- If they want to upgrade their plan, they should go to console.prisma.io and upgrade their plan in order to be able to create more databases
delete_prisma_postgres_database
Delete a Prisma Postgres database with the given database id.
Inform the user that this is a permanent action and cannot be undone. Ask them to confirm that they wish to proceed.
To obtain the correct database id, use the List-Prisma-Postgres-Databases tool first.
If the response indicates that the database was not found, instruct the user to verify the database id using the List-Prisma-Postgres-Databases tool.
If the response indicates that you cannot delete the default environment, instruct the user to delete the project instead or create a new default environment first.
create_prisma_postgres_connection_string
Create a new Connection String for a Prisma Postgres database with the given id.
To obtain the correct input parameters use the List-Prisma-Postgres-Databases tool.
If the response does not contain a Direct Connection String, only display the Prisma Connection String.
If the response contains both Direct and Prisma Connection Strings, display both.
If the response indicates that you have no databases you should instruct the user to do one of these things:
- If they want to create a new database, they should use the Create-Prisma-Postgres-Database tool.
- If they want to upgrade their plan, they should go to console.prisma.io and upgrade their plan in order to be able to create more databases.
delete_prisma_postgres_connection_string
Delete a Connection String with the given connection string id.
Inform the user that this is a permanent action and cannot be undone. Ask them to confirm that they wish to proceed.
To obtain the correct input parameters use the List-Prisma-Postgres-Connection-Strings tool
fetch_workspace_details
Fetch the details of a Prisma Postgres workspace. The Result will be returned as JSON.
list_prisma_postgres_connection_strings
Fetch a list of available Prisma Postgres Database Connection Strings for the given database id.
To obtain a list of available database ids, use the List-Prisma-Postgres-Databases tool
If the response indicates that you have no connection strings you should instruct the user to do one of these things:
- If they want to create a new connection string, they should use the Create-Prisma-Postgres-Connection-String tool
create_prisma_postgres_backup
Create a new managed Prisma Postgres Backup.
Note: On-demand backup creation is not currently supported. Backups are created automatically by the system.
Use the list_prisma_postgres_backups tool to view available automated backups.
list_prisma_postgres_backups
Fetch a list of available Prisma Postgres Backups for the given database id.
To obtain a list of available database ids, use the List-Prisma-Postgres-Databases tool
If the response indicates that you have no databases you should instruct the user to do one of these things:
- If they want to create a new database, they should use the Create-Prisma-Postgres-Database tool
If the response indicates that you have no backups you should instruct the user to do one of these things:
- If they want to create a new backup, they should use the Create-Prisma-Postgres-Backup tool
create_prisma_postgres_recovery
Restore a Prisma Postgres Database to a new database with the given Backup id.
To obtain the correct input parameters use the List-Prisma-Postgres-Backups tool.
The target database name should be unique and not already exist.
If the response is successful, use the List-Prisma-Postgres-Databases and Create-Prisma-Postgres-Connection-String tools to get the new connection string.
execute_sql_query
Execute a SQL query on a Prisma Postgres database with the given id.
To obtain the correct input parameters use the List-Prisma-Postgres-Databases tool.
To obtain context about the database use the Introspect-Database-Schema tool.
This tool will not have permission to execute schema updates.
To make schema updates use the Execute-Schema-Update tool.
The Result will be returned as JSON.
<caution>
- Make sure that the user is aware that this tool will execute a SQL query on a Prisma Postgres database and may result in data loss.
- Confirm that the user understands the risks.
- Confirm that the user understands the SQL query before you execute it.
- Try restrict queries to Read-Only.
</caution>
introspect_database_schema
Introspect the schema of a Prisma Postgres database with the given id.
To obtain the correct input parameters use the List-Prisma-Postgres-Databases tool.
The Result will be returned as JSON.
execute_prisma_postgres_schema_update
Execute a Schema Update on a Prisma Postgres database with the given id.
To obtain the correct input parameters use the List-Prisma-Postgres-Databases tool.
To obtain context about the database use the Introspect-Database-Schema tool.
This tool should be used for schema updates only.
To read/write data use the Execute-Sql-Query tool.
The Result will be returned as JSON.
<caution>
- Make sure that the user is aware that this tool will execute a Schema Update on a Prisma Postgres database and may result in data loss.
- Confirm that the user understands the risks.
- Confirm that the user understands the SQL query before you execute it.
</caution>