Skip to content

Prisma

Prisma

Prisma Data Platform provides database tools including Accelerate (global database cache), Optimize (AI-driven query analysis), and Prisma Postgres (managed PostgreSQL). With the SquadOS integration, your agents can manage workspaces, projects, environments, and API keys programmatically, and execute SQL queries directly against databases.

This tool supports OAuth 2.0 (OAUTH2) and API key (API_KEY) to connect.

Consult Composio for the required connection fields.

  1. Go to Tools in the side menu (/admin/tools).
  2. Open the Available tab and search for Prisma.
  3. Click the card to open the details modal and hit Connect.
  4. You’re taken to the secure connection page hosted by Composio, where you authorize access (OAuth 2.0) or enter the credentials obtained above.
  5. Once done, you’re sent back to SquadOS with the account connected and the tool available to your agents. (Connection-flow details in Organization Tools.)

PRISMA_CREATE_CONNECTION

Create new API key connection for database access. Creates connection string with embedded credentials for application database access. Returns complete connection details ready for immediate use.

NameTypeRequiredDescription
namestringYesHuman-readable name for the new connection/API key. This will be displayed in UIs and used for identification. Choose descriptive names like ‘Production API Key’, ‘Analytics Access’, ‘Dev Environment’, etc.
databaseIdstringYesUnique database identifier to create connection for (format: ‘db_xxxxx’). Must be a database the authenticated user has write access to. The new connection will provide API key access to this database.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_CREATE_DATABASE

Create new postgres database in an existing Prisma project. Creates database in specified region with connection strings and API keys. Returns complete database details ready for immediate use.

NameTypeRequiredDescription
namestringYesHuman-readable name for the new database. This will be displayed in UIs and used for identification. Choose descriptive names like ‘Production DB’, ‘Analytics’, etc.
regionstringYesAWS region where the database will be deployed. Valid values: ‘us-east-1’, ‘us-west-1’, ‘eu-central-1’, ‘eu-west-3’, ‘ap-southeast-1’, ‘ap-northeast-1’. Choose region closest to your users for optimal performance. Use LIST_POSTGRES_REGIONS to get current available regions.
isDefaultbooleanNoWhether this database should be the default for the project. Default false. Only one database can be default per project. Setting to true will make other databases non-default.
projectIdstringYesUnique project identifier to create database in (format: ‘prj_xxxxx’). Must be a project the authenticated user has write access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_CREATE_PROJECT

Create new Prisma project with managed postgres database. Creates project in authenticated user’s workspace with postgres database in specified region. Returns complete project details including connection strings and API keys.

NameTypeRequiredDescription
namestringYesHuman-readable name for the new project. This will be displayed in UIs and used for identification. Choose descriptive names like ‘Production API’, ‘Dev Environment’, etc.
regionstringYesAWS region where the postgres database will be deployed. Available regions: ‘us-east-1’, ‘us-west-1’, ‘eu-central-1’, ‘eu-west-3’, ‘ap-southeast-1’, ‘ap-northeast-1’. Choose region closest to your users for optimal performance.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_DELETE_CONNECTION

Permanently delete database connection and revoke API key access. WARNING: This immediately revokes database access for any applications using this connection string. Ensure no critical systems depend on this connection.

NameTypeRequiredDescription
idstringYesUnique connection identifier to delete (format: ‘con_xxxxx’). WARNING: This permanently revokes API key access to the database. Any applications using this connection string will lose access immediately. This action cannot be undone.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_DELETE_DATABASE

Permanently delete Prisma database and all stored data. WARNING: This action cannot be undone. All data in the database will be permanently destroyed. Default databases typically cannot be deleted.

NameTypeRequiredDescription
databaseIdstringYesUnique database identifier to delete (format: ‘db_xxxxx’). WARNING: This permanently deletes the database and all stored data. Default databases typically cannot be deleted. This action cannot be undone. Ensure all important data is backed up before deletion.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_DELETE_PROJECT

Permanently delete Prisma project and all associated resources. WARNING: This action cannot be undone. All databases, environments, and project data will be permanently destroyed. Use with extreme caution in production environments.

NameTypeRequiredDescription
idstringYesUnique project identifier to delete (format: ‘proj_xxxxx’). WARNING: This permanently deletes the project and all associated data including databases, environments, and configurations. This action cannot be undone.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_EXECUTE_SQL_COMMAND

Execute SQL commands that modify database data or structure. Runs INSERT, UPDATE, DELETE, CREATE TABLE, and other data modification commands safely through PostgreSQL driver with parameterized query support.

NameTypeRequiredDescription
commandstringYesSQL command to execute against the database (INSERT, UPDATE, DELETE, CREATE TABLE, etc.). Examples: ‘INSERT INTO users (name, email) VALUES ($1, $2)’, ‘UPDATE users SET active = $1 WHERE id = $2’, ‘DELETE FROM sessions WHERE expires_at < NOW()’, ‘CREATE TABLE logs (id SERIAL PRIMARY KEY, message TEXT, created_at TIMESTAMP DEFAULT NOW())’.
parametersarrayNoOptional array of parameters for parameterized commands using $1, $2, etc. placeholders. Example: command=‘INSERT INTO users (name, email) VALUES ($1, $2)’, parameters=[‘John Doe’, ‘john@example.com’]. Parameters are automatically escaped to prevent SQL injection.
connectionStringstringYesPostgreSQL connection string for direct database access. Use the standard format: ‘postgresql://USER:PASSWORD@HOST:PORT/DATABASE?sslmode=require’. Get credentials from create_connection or create_database response fields. Note: Do NOT use Prisma Accelerate URLs (prisma+postgres://…) — those are for Prisma Client SDK only.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_EXECUTE_SQL_QUERY

Execute SQL SELECT queries against Prisma Postgres databases. Runs read-only queries safely through direct PostgreSQL connection with SSL. Uses credentials from create_connection action (host, user, pass fields). Perfect for data analysis, schema inspection, and reporting operations.

NameTypeRequiredDescription
hoststringYesDatabase host with port (format: ‘db.prisma.io:5432’). Obtain this from create_connection action response field ‘host’.
userstringYesDatabase username (tenant ID from Prisma). Obtain this from create_connection action response field ‘user’.
querystringYesSQL SELECT query to execute against the database. Use standard PostgreSQL syntax. Common examples: ‘SELECT * FROM users LIMIT 10’, ‘SELECT name, email FROM customers WHERE active = true’. Avoid INSERT/UPDATE/DELETE — use execute_sql_command for those operations.
passwordstringYesDatabase password (secret key from Prisma). Obtain this from create_connection action response field ‘pass’. Format is typically ‘sk_xxxxx’. Keep this secure.
parametersarrayNoOptional array of parameters for parameterized queries using %s placeholders. Example: query=‘SELECT * FROM users WHERE id = %s AND active = %s’, parameters=[123, true]. Parameters are automatically escaped to prevent SQL injection.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_GET_DATABASE

Retrieve specific Prisma database by ID. Returns database details including status, project context, and regional deployment. Use for database monitoring, validation, and administrative operations.

NameTypeRequiredDescription
databaseIdstringYesUnique database identifier to retrieve (format: ‘db_xxxxx’). This ID is obtained from database listing or creation operations. Must be a database the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_GET_DATABASE_USAGE

Retrieve usage metrics for a specific Prisma database. Returns metrics including storage usage and operation counts (reads/writes) for the specified time period. Use for monitoring resource consumption, cost analysis, and capacity planning.

NameTypeRequiredDescription
endDatestringNoEnd date for metrics query in ISO 8601 format (e.g., ‘2025-07-31T23:59:59Z’). Defaults to current date if not provided.
startDatestringNoStart date for metrics query in ISO 8601 format (e.g., ‘2025-07-01T00:00:00Z’). Defaults to start of current month if not provided. Use to specify custom date ranges for usage analysis.
databaseIdstringYesUnique database identifier to retrieve usage metrics for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_GET_PROJECT

Retrieve specific Prisma project by ID. Returns project details including name, creation timestamp, and workspace information. Use for project detail views, validation, and administrative operations.

NameTypeRequiredDescription
idstringYesUnique project identifier to retrieve (format: ‘proj_xxxxx’). This ID is obtained from project listing or creation operations. Must be a project the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_INSPECT_DATABASE_SCHEMA

Inspect database schema structure and table information. Returns comprehensive schema details including tables, columns, data types, constraints, and relationships. Essential for understanding database structure before executing queries.

NameTypeRequiredDescription
hoststringYesDatabase host with port (format: ‘db.prisma.io:5432’). Obtain this from create_connection action response field ‘host’.
userstringYesDatabase username (tenant ID from Prisma). Obtain this from create_connection action response field ‘user’.
passwordstringYesDatabase password (secret key from Prisma). Obtain this from create_connection action response field ‘pass’. Format is typically ‘sk_xxxxx’. Keep this secure.
tableNamestringNoOptional specific table name to inspect. If provided, returns detailed column information for that table only. If omitted, returns overview of all tables in the database.
includeIndexesbooleanNoWhether to include index information in the schema results. When true, shows primary keys, foreign keys, and other indexes. Useful for understanding table relationships and query optimization.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_ACCELERATE_REGIONS

Retrieve all available regions for Prisma Accelerate. Returns regions where Accelerate global database cache can be deployed. Use for cache region selection to minimize latency for your users.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_BACKUPS

Retrieve list of available backups for a specific database. Returns backup details including status, size, type, and restoration readiness. Use for backup monitoring, restoration planning, and compliance auditing.

NameTypeRequiredDescription
limitintegerNoMaximum number of backups to return in a single request. Defaults to 25 if not specified. Typical range is 1–100. Use smaller values (10–25) for UI pagination, larger values (50–100) for processing.
databaseIdstringYesUnique database identifier to list backups for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_CONNECTIONS

Retrieve paginated list of connections for a specific database. Returns connection details including names, creation dates, and database context. Use for API key management, security audits, and access control.

NameTypeRequiredDescription
limitintegerNoMaximum number of connections to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500. Use smaller values (10–50) for faster responses when you only need a few connections.
cursorstringNoPagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response to get subsequent pages. Leave as null for the first page.
databaseIdstringYesUnique database identifier to list connections for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_DATABASES

Retrieve paginated list of databases for a specific Prisma project. Returns database details including status, region, and project context. Use for database discovery, monitoring, and project administration.

NameTypeRequiredDescription
limitintegerNoMaximum number of databases to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500.
cursorstringNoPagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page.
projectIdstringYesUnique project identifier to list databases for (format: ‘prj_xxxxx’). Must be a project the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_POSTGRES_REGIONS

Retrieve all available regions for Prisma Postgres. Returns regions where Prisma Postgres databases can be deployed with current availability status. Use for region selection during database creation and capacity planning.

NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_PROJECTS

Retrieve paginated list of Prisma projects accessible to authenticated user. Returns project IDs, names, workspace info, and timestamps with cursor-based pagination. Use for project discovery, UI selection flows, and administrative operations.

NameTypeRequiredDescription
limitintegerNoMaximum number of projects to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500. The API may return fewer results than requested if fewer projects exist.
cursorstringNoPagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_WORKSPACE_INTEGRATIONS

Retrieve paginated list of integrations for a specific Prisma workspace. Returns integration details including OAuth client info, granted scopes, and creator. Use for security audits, integration management, and workspace administration.

NameTypeRequiredDescription
limitintegerNoMaximum number of integrations to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500.
cursorstringNoPagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page.
workspaceIdstringYesUnique workspace identifier to list integrations for (format: ‘wksp_xxxxx’). Must be a workspace the authenticated user has access to.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_LIST_WORKSPACES

Retrieve paginated list of Prisma workspaces accessible to authenticated user. Returns workspace IDs, names, creation timestamps with cursor-based pagination. Use for workspace discovery, UI selection flows, and administrative operations.

NameTypeRequiredDescription
limitintegerNoMaximum number of workspaces to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500. The API may return fewer results than requested if fewer workspaces exist.
cursorstringNoPagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_RESTORE_BACKUP

Restore database backup to new database instance. Creates new database from existing backup with specified name. Operation is asynchronous — monitor the returned database status for completion. Restoration may take several minutes.

NameTypeRequiredDescription
backupIdstringYesUnique backup identifier to restore. Must be a completed backup from the specified database. Use list_backups action to find available backup IDs.
databaseIdstringYesUnique source database identifier containing the backup (format: ‘db_xxxxx’). Must be a database the authenticated user has access to.
targetDatabaseNamestringYesName for the new database created from backup restoration. Choose descriptive names like ‘Restored DB 2025-01-20’, ‘Production Rollback’, etc.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.

PRISMA_TRANSFER_PROJECT

Transfer Prisma project ownership to another user’s workspace. Transfers project ownership from the current authenticated user to the recipient specified by their OAuth2 access token. This is typically used in partner integrations where databases are provisioned on the partner’s workspace and later transferred to end users. The project and all its databases are moved to the recipient’s workspace. The current owner loses access unless the new owner explicitly grants it. Requirements: valid project ID owned by the current user; valid OAuth2 access token for the recipient user; recipient workspace must have sufficient quota for the project.

NameTypeRequiredDescription
idstringYesUnique project identifier to transfer (format: ‘proj_xxxxx’). Obtain from PRISMA_LIST_PROJECTS or PRISMA_CREATE_PROJECT response. Must be a project owned by the authenticated user’s workspace. After transfer, the current user loses access unless explicitly granted by the new owner.
recipientAccessTokenstringYesOAuth2 access token of the recipient user who will receive project ownership. This token must be obtained through Prisma’s OAuth2 flow for the recipient user. The recipient workspace must have sufficient quota to receive the project. Typically used in partner integrations to transfer provisioned databases to end users.
NameTypeRequiredDescription
datastringYesData from the action execution.
errorstringNoError if any occurred during the execution of the action.
successfulbooleanYesWhether or not the action execution was successful.