You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
feat: improve error message when failing to get tools from MCP
Include the underlying exception message in the ConnectionError raised when session.list_tools() fails. PiperOrigin-RevId: 861889733
This commit is contained in:
committed by
Copybara-Service
parent
65cbf4b35c
commit
3480b3b82d
@@ -173,7 +173,7 @@ class McpToolset(BaseToolset):
|
||||
session.list_tools(), timeout=timeout_in_seconds
|
||||
)
|
||||
except Exception as e:
|
||||
raise ConnectionError("Failed to get tools from MCP server.") from e
|
||||
raise ConnectionError(f"Failed to get tools from MCP server: {e}") from e
|
||||
|
||||
# Apply filtering based on context and tool_filter
|
||||
tools = []
|
||||
|
||||
Reference in New Issue
Block a user