Prisma
Overview
Section titled “Overview”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.
- Composio documentation: docs.composio.dev/toolkits/prisma
Authentication
Section titled “Authentication”This tool supports OAuth 2.0 (OAUTH2) and API key (API_KEY) to connect.
Consult Composio for the required connection fields.
How to connect in SquadOS
Section titled “How to connect in SquadOS”- Go to Tools in the side menu (
/admin/tools). - Open the Available tab and search for
Prisma. - Click the card to open the details modal and hit Connect.
- You’re taken to the secure connection page hosted by Composio, where you authorize access (OAuth 2.0) or enter the credentials obtained above.
- 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.)
Available actions
Section titled “Available actions”Create Database Connection
Section titled “Create Database Connection”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-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. |
databaseId | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Project Database
Section titled “Create Project Database”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable name for the new database. This will be displayed in UIs and used for identification. Choose descriptive names like ‘Production DB’, ‘Analytics’, etc. |
region | string | Yes | AWS 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. |
isDefault | boolean | No | Whether 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. |
projectId | string | Yes | Unique project identifier to create database in (format: ‘prj_xxxxx’). Must be a project the authenticated user has write access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Prisma Project
Section titled “Create Prisma Project”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-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. |
region | string | Yes | AWS 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Database Connection
Section titled “Delete Database Connection”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Prisma Database
Section titled “Delete Prisma Database”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
databaseId | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Prisma Project
Section titled “Delete Prisma Project”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Execute SQL Command
Section titled “Execute SQL Command”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
command | string | Yes | SQL 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())’. |
parameters | array | No | Optional 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. |
connectionString | string | Yes | PostgreSQL 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Execute SQL Query
Section titled “Execute SQL Query”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | Database host with port (format: ‘db.prisma.io:5432’). Obtain this from create_connection action response field ‘host’. |
user | string | Yes | Database username (tenant ID from Prisma). Obtain this from create_connection action response field ‘user’. |
query | string | Yes | SQL 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. |
password | string | Yes | Database password (secret key from Prisma). Obtain this from create_connection action response field ‘pass’. Format is typically ‘sk_xxxxx’. Keep this secure. |
parameters | array | No | Optional 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Prisma Database
Section titled “Get Prisma Database”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
databaseId | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Database Usage Metrics
Section titled “Get Database Usage Metrics”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
endDate | string | No | End date for metrics query in ISO 8601 format (e.g., ‘2025-07-31T23:59:59Z’). Defaults to current date if not provided. |
startDate | string | No | Start 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. |
databaseId | string | Yes | Unique database identifier to retrieve usage metrics for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get Prisma Project
Section titled “Get Prisma Project”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Inspect Database Schema
Section titled “Inspect Database Schema”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
host | string | Yes | Database host with port (format: ‘db.prisma.io:5432’). Obtain this from create_connection action response field ‘host’. |
user | string | Yes | Database username (tenant ID from Prisma). Obtain this from create_connection action response field ‘user’. |
password | string | Yes | Database password (secret key from Prisma). Obtain this from create_connection action response field ‘pass’. Format is typically ‘sk_xxxxx’. Keep this secure. |
tableName | string | No | Optional 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. |
includeIndexes | boolean | No | Whether 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Prisma Accelerate Regions
Section titled “List Prisma Accelerate Regions”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.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Database Backups
Section titled “List Database Backups”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum 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. |
databaseId | string | Yes | Unique database identifier to list backups for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Database Connections
Section titled “List Database Connections”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum 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. |
cursor | string | No | Pagination 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. |
databaseId | string | Yes | Unique database identifier to list connections for (format: ‘db_xxxxx’). Must be a database the authenticated user has access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Project Databases
Section titled “List Project Databases”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of databases to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500. |
cursor | string | No | Pagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page. |
projectId | string | Yes | Unique project identifier to list databases for (format: ‘prj_xxxxx’). Must be a project the authenticated user has access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Prisma Postgres Regions
Section titled “List Prisma Postgres Regions”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.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Prisma Projects
Section titled “List Prisma Projects”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum 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. |
cursor | string | No | Pagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Workspace Integrations
Section titled “List Workspace Integrations”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of integrations to return in a single request. Defaults to 100 if not specified. Valid range is typically 1–500. |
cursor | string | No | Pagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page. |
workspaceId | string | Yes | Unique workspace identifier to list integrations for (format: ‘wksp_xxxxx’). Must be a workspace the authenticated user has access to. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Prisma Workspaces
Section titled “List Prisma Workspaces”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum 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. |
cursor | string | No | Pagination cursor for retrieving the next page of results. Use the ‘nextCursor’ value from a previous response. Leave as null for the first page. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Restore Database Backup
Section titled “Restore Database Backup”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
backupId | string | Yes | Unique backup identifier to restore. Must be a completed backup from the specified database. Use list_backups action to find available backup IDs. |
databaseId | string | Yes | Unique source database identifier containing the backup (format: ‘db_xxxxx’). Must be a database the authenticated user has access to. |
targetDatabaseName | string | Yes | Name for the new database created from backup restoration. Choose descriptive names like ‘Restored DB 2025-01-20’, ‘Production Rollback’, etc. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Transfer Prisma Project
Section titled “Transfer Prisma Project”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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique 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. |
recipientAccessToken | string | Yes | OAuth2 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. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |