BerriAI/litellm · error · HTTPException
Toolset '{toolset_id}' not found.
Error message
Toolset '{toolset_id}' not found. What it means
Lookup/permission failure fetching an MCP toolset: the toolset_id matches no row (HTTP 404 path) — or, for non-admin keys, it was not granted; the message covers the not-found case after the grant check passed.
Source
Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2898
)
@management_endpoint_wrapper
async def fetch_mcp_toolset(
toolset_id: str,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
prisma_client: Final = get_prisma_client_or_throw("Database not connected. Connect a database to your proxy")
# Non-admin keys may only fetch toolsets they've been explicitly granted.
if not _user_has_admin_view(user_api_key_dict):
op: Final = user_api_key_dict.object_permission
granted: Final = getattr(op, "mcp_toolsets", None) if op else None
if granted is None or toolset_id not in granted:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail={"error": "API key does not have access to this toolset."},
)
toolset: Final = await get_mcp_toolset(prisma_client, toolset_id)
if toolset is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail={"error": f"Toolset '{toolset_id}' not found."},
)
return toolset
@router.put(
"/toolset",
description="Update an existing MCP toolset (admin only)",
)
@management_endpoint_wrapper
async def edit_mcp_toolset(
payload: UpdateMCPToolsetRequest,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
litellm_changed_by: str | None = Header(None),
):
prisma_client: Final = get_prisma_client_or_throw("Database not connected. Connect a database to your proxy")
if LitellmUserRoles.PROXY_ADMIN != user_api_key_dict.user_role:
raise HTTPException(View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the toolset_id. List toolsets to find the correct id.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2898 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/2f1da1d019e721c4.
Report an issue: GitHub.