File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -289,23 +289,3 @@ async def get_prompt(
289
289
) -> ResponsePromptParam | None :
290
290
"""Get the prompt for the agent."""
291
291
return await PromptUtil .to_model_input (self .prompt , run_context , self )
292
-
293
- async def get_all_tools (self , run_context : RunContextWrapper [Any ]) -> list [Tool ]:
294
- """All agent tools, including MCP tools and function tools."""
295
- mcp_tools = await self .get_mcp_tools (run_context )
296
-
297
- async def _check_tool_enabled (tool : Tool ) -> bool :
298
- if not isinstance (tool , FunctionTool ):
299
- return True
300
-
301
- attr = tool .is_enabled
302
- if isinstance (attr , bool ):
303
- return attr
304
- res = attr (run_context , self )
305
- if inspect .isawaitable (res ):
306
- return bool (await res )
307
- return bool (res )
308
-
309
- results = await asyncio .gather (* (_check_tool_enabled (t ) for t in self .tools ))
310
- enabled : list [Tool ] = [t for t , ok in zip (self .tools , results ) if ok ]
311
- return [* mcp_tools , * enabled ]
You can’t perform that action at this time.
0 commit comments