Re-fetch tool definitions from all connected global MCP servers and update the agent-level cache. New sessions created after this call will see the refreshed tool list. Existing sessions are unaffected.
(&self, py: Python<'_>)
| 1129 | /// New sessions created after this call will see the refreshed tool list. |
| 1130 | /// Existing sessions are unaffected. |
| 1131 | fn refresh_mcp_tools(&self, py: Python<'_>) -> PyResult<()> { |
| 1132 | let agent = self.inner.clone(); |
| 1133 | py.allow_threads(move || { |
| 1134 | get_runtime().block_on(async { |
| 1135 | agent |
| 1136 | .refresh_mcp_tools() |
| 1137 | .await |
| 1138 | .map_err(|e| PyRuntimeError::new_err(format!("refresh_mcp_tools failed: {e}"))) |
| 1139 | }) |
| 1140 | }) |
| 1141 | } |
| 1142 | |
| 1143 | /// Bind to a workspace directory, returning a Session. |
| 1144 | /// |
nothing calls this directly
no test coverage detected