diff --git a/litellm-proxy-extras/litellm_proxy_extras/schema.prisma b/litellm-proxy-extras/litellm_proxy_extras/schema.prisma index a2c83295403..1e9f0e60eda 100644 --- a/litellm-proxy-extras/litellm_proxy_extras/schema.prisma +++ b/litellm-proxy-extras/litellm_proxy_extras/schema.prisma @@ -273,6 +273,7 @@ model LiteLLM_ObjectPermissionTable { agent_access_groups String[] @default([]) models String[] @default([]) blocked_tools String[] @default([]) // Tool names blocked for any key/team/user with this permission + mcp_toolsets String[] @default([]) // Toolset IDs granted to this key/team/user teams LiteLLM_TeamTable[] projects LiteLLM_ProjectTable[] verification_tokens LiteLLM_VerificationToken[] @@ -327,6 +328,18 @@ model LiteLLM_MCPServerTable { review_notes String? } +// Named collection of {server_id, tool_name} pairs that can be granted to keys/teams +model LiteLLM_MCPToolsetTable { + toolset_id String @id @default(uuid()) + toolset_name String @unique + description String? + tools Json @default("[]") // [{server_id: string, tool_name: string}] + created_at DateTime @default(now()) + created_by String? + updated_at DateTime @updatedAt + updated_by String? +} + // Per-user BYOK credentials for MCP servers model LiteLLM_MCPUserCredentials { id String @id @default(uuid()) diff --git a/litellm/proxy/schema.prisma b/litellm/proxy/schema.prisma index 46be6b31e1f..edbc9a344c5 100644 --- a/litellm/proxy/schema.prisma +++ b/litellm/proxy/schema.prisma @@ -273,6 +273,7 @@ model LiteLLM_ObjectPermissionTable { agent_access_groups String[] @default([]) models String[] @default([]) blocked_tools String[] @default([]) // Tool names blocked for any key/team/user with this permission + mcp_toolsets String[] @default([]) // Toolset IDs granted to this key/team/user teams LiteLLM_TeamTable[] projects LiteLLM_ProjectTable[] verification_tokens LiteLLM_VerificationToken[] @@ -331,6 +332,18 @@ model LiteLLM_MCPServerTable { @@index([approval_status]) } +// Named collection of {server_id, tool_name} pairs that can be granted to keys/teams +model LiteLLM_MCPToolsetTable { + toolset_id String @id @default(uuid()) + toolset_name String @unique + description String? + tools Json @default("[]") // [{server_id: string, tool_name: string}] + created_at DateTime @default(now()) + created_by String? + updated_at DateTime @updatedAt + updated_by String? +} + // Per-user BYOK credentials for MCP servers model LiteLLM_MCPUserCredentials { id String @id @default(uuid()) diff --git a/schema.prisma b/schema.prisma index fde9a466a28..8a06d86b829 100644 --- a/schema.prisma +++ b/schema.prisma @@ -273,6 +273,7 @@ model LiteLLM_ObjectPermissionTable { agent_access_groups String[] @default([]) models String[] @default([]) blocked_tools String[] @default([]) // Tool names blocked for any key/team/user with this permission + mcp_toolsets String[] @default([]) // Toolset IDs granted to this key/team/user teams LiteLLM_TeamTable[] projects LiteLLM_ProjectTable[] verification_tokens LiteLLM_VerificationToken[] @@ -322,6 +323,18 @@ model LiteLLM_MCPServerTable { byok_api_key_help_url String? } +// Named collection of {server_id, tool_name} pairs that can be granted to keys/teams +model LiteLLM_MCPToolsetTable { + toolset_id String @id @default(uuid()) + toolset_name String @unique + description String? + tools Json @default("[]") // [{server_id: string, tool_name: string}] + created_at DateTime @default(now()) + created_by String? + updated_at DateTime @updatedAt + updated_by String? +} + // Per-user BYOK credentials for MCP servers model LiteLLM_MCPUserCredentials { id String @id @default(uuid())