{"openapi":"3.1.0","info":{"title":"Prisma Postgres (BYOK) API","version":"0.1.0","description":"Prisma Postgres (BYOK) lets an AI assistant read your own Prisma Postgres data through the Prisma Postgres API with a key you supply (Prisma service token). Read-only: 10 tools (get_current_principal, list_workspaces, get_workspace_subscription, list_projects, get_project, list_databases, get_database, list_database_backups, get_database_usage, list_postgres_regions). The BYOK key travels with...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-prisma.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-prisma/docs"},"termsOfService":"https://connectorbay.com/byok-prisma/terms"},"servers":[{"url":"https://byok-prisma.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-prisma/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_current_principal":{"post":{"operationId":"get_current_principal","summary":"Show who the token represents: user, workspace and the credential type (oauth, service_token, management_token or agent_","description":"Show who the token represents: user, workspace and the credential type (oauth, service_token, management_token or agent_token). Use for \"Which Prisma workspace is my service token for\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_current_principalArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_workspaces":{"post":{"operationId":"list_workspaces","summary":"List the workspaces the token can access with name and creation time. Use for \"Which Prisma workspaces can my token acce","description":"List the workspaces the token can access with name and creation time. Use for \"Which Prisma workspaces can my token access\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: pagination.nextCursor from the previous answer, to get the next page.","title":"Cursor"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum items per page (the API default is 100).","title":"Limit"}},"title":"list_workspacesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_workspace_subscription":{"post":{"operationId":"get_workspace_subscription","summary":"Get a workspace's plan name, whether usage is blocked and the upgrade link. Use for \"What Prisma plan is my workspace on","description":"Get a workspace's plan name, whether usage is blocked and the upgrade link. Use for \"What Prisma plan is my workspace on\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"workspace_id":{"description":"Workspace id from list_workspaces.","maxLength":100,"title":"Workspace Id","type":"string"}},"required":["workspace_id"],"title":"get_workspace_subscriptionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_projects":{"post":{"operationId":"list_projects","summary":"List the projects the token can access with name, logical id, default region and workspace. Use for \"What Prisma Postgre","description":"List the projects the token can access with name, logical id, default region and workspace. Use for \"What Prisma Postgres projects do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"logical_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only projects with this logical id.","title":"Logical Id"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: pagination.nextCursor from the previous answer, to get the next page.","title":"Cursor"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum items per page (the API default is 100).","title":"Limit"}},"title":"list_projectsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_project":{"post":{"operationId":"get_project","summary":"Get one project by id: name, logical id, default region, creation time and workspace. Use for \"Show Prisma project p1\".","description":"Get one project by id: name, logical id, default region, creation time and workspace. Use for \"Show Prisma project p1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id from list_projects.","maxLength":100,"title":"Project Id","type":"string"}},"required":["project_id"],"title":"get_projectArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_databases":{"post":{"operationId":"list_databases","summary":"List databases the token can access with name, status (provisioning, ready, recovering, failure) and default flag; conne","description":"List databases the token can access with name, status (provisioning, ready, recovering, failure) and default flag; connection credentials are not returned. Use for \"Which Prisma Postgres databases are ready\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only databases of this project id.","title":"Project Id"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor: pagination.nextCursor from the previous answer, to get the next page.","title":"Cursor"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum items per page (the API default is 100).","title":"Limit"}},"title":"list_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_database":{"post":{"operationId":"get_database","summary":"Get one database by id: name, status, default flag and creation time; connection credentials are not returned. Use for \"","description":"Get one database by id: name, status, default flag and creation time; connection credentials are not returned. Use for \"What is the status of Prisma database db_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database_id":{"description":"Database id from list_databases.","maxLength":100,"title":"Database Id","type":"string"}},"required":["database_id"],"title":"get_databaseArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_database_backups":{"post":{"operationId":"list_database_backups","summary":"List a database's backups with type (full, incremental, differential), status, size and time, plus the retention period ","description":"List a database's backups with type (full, incremental, differential), status, size and time, plus the retention period in days. Use for \"Does my Prisma database db_1 have recent backups\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database_id":{"description":"Database id from list_databases.","maxLength":100,"title":"Database Id","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Maximum backups to return (1 to 100, default 25).","title":"Limit"}},"required":["database_id"],"title":"list_database_backupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_database_usage":{"post":{"operationId":"get_database_usage","summary":"Get a database's usage over a period: operations and storage used with units. Use for \"How many operations did my Prisma","description":"Get a database's usage over a period: operations and storage used with units. Use for \"How many operations did my Prisma database db_1 use this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"database_id":{"description":"Database id from list_databases.","maxLength":100,"title":"Database Id","type":"string"},"start_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the period, ISO 8601 date, for example 2026-10-01.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the period, ISO 8601 date.","title":"End Date"}},"required":["database_id"],"title":"get_database_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_postgres_regions":{"post":{"operationId":"list_postgres_regions","summary":"List the regions where Prisma Postgres can be provisioned and whether each is available. Use for \"Which regions does Pri","description":"List the regions where Prisma Postgres can be provisioned and whether each is available. Use for \"Which regions does Prisma Postgres support\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_postgres_regionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}