{"record":{"id":"89df34d5ff51303c","repo":"BerriAI/litellm","slug":"timeout","errorCode":"timeout","errorMessage":"Listing tools from MCP server {server_name!r} failed","messagePattern":"Listing tools from MCP server (.+?) failed","errorType":"exception","errorClass":"MCPServerListError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/_experimental/mcp_server/mcp_server_manager.py","lineNumber":4270,"sourceCode":"        boundary then applies its own policy: single-server routes relay the\n        truthful status, the multi-server aggregator absorbs the failure into\n        that server's listing outcome.\n\n        Args:\n            client: MCP client instance\n            server_name: Name of the server for logging\n\n        Returns:\n            List of tools from the server\n        \"\"\"\n        try:\n            with anyio.fail_after(MCP_TOOL_LISTING_TIMEOUT):\n                tools: Final = await client.list_tools(raise_on_error=True)\n                verbose_logger.debug(\"Tools from %s: %s\", server_name, tools)\n                return tools\n        except TimeoutError as e:\n            verbose_logger.warning(\"Timeout while listing tools from %s\", server_name)\n            raise MCPServerListError(ServerListFault(tag=\"timeout\"), server_name) from e\n        except asyncio.CancelledError as e:\n            verbose_logger.warning(\"Task cancelled while listing tools from %s\", server_name)\n            raise MCPServerListError(ServerListFault(tag=\"internal\"), server_name) from e\n        except ConnectionError as e:\n            verbose_logger.warning(\"Connection error while listing tools from %s: %s\", server_name, e)\n            raise MCPServerListError(ServerListFault(tag=\"unreachable\"), server_name) from e\n        except Exception as e:\n            verbose_logger.warning(\"Error listing tools from %s: %s\", server_name, e)\n            raise_classified_list_failure(e, server_name)\n\n    _SHORT_PREFIX_MAX_REHASH_ATTEMPTS = 1024\n\n    def _assign_unique_short_prefix(\n        self,\n        server: MCPServer,\n        registry: dict[str, MCPServer] | None = None,\n    ) -> None:\n        \"\"\"Resolve and cache a collision-free short tool prefix on ``server``.","sourceCodeStart":4252,"sourceCodeEnd":4288,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py#L4252-L4288","documentation":"Raised in list_tools_from_server when anyio.fail_after(MCP_TOOL_LISTING_TIMEOUT) expires before client.list_tools returns: the upstream MCP server hung on tools/list and the call is aborted with a timeout fault.","triggerScenarios":"Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4270 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check upstream server reachability and credentials; see logs for the root cause."],"exampleFix":"Run the admin connection test for that server.","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}