refresh_tools
Method
This is a method of the Agent class in the agent module.Re-derive the live toolset from
self.tools.
Per-turn tool assembly already reads from self.tools directly, so
tools added/removed via add_mcp_server/remove_mcp_server are
picked up automatically on the next turn. This method clears any cached
tool definitions so callers (or an MCP tools/list_changed event) can
force an immediate refresh, and returns the current toolset.
Signature
Returns
List[Any]
The current list of tools/MCP instances on the agent.
Used By
Source
View on GitHub
praisonaiagents/agent/agent.py at line 4944
