from tools.base_tool import BaseTool, ToolResult class ToolGeneratorTool(BaseTool): name = "tool_generator" description = "生成agent工具代码" parameters = { "name": { "type": "string", "description": "tool name", }, "description": { "type": "string", "description": "tool description" }, "parameters": { "type": "object", "description": """tool parameters descriptions""" }, "code": { "type": "string", "description": "the code that the LLM generated" } } def execute(self, name: str, description: str, parameters: dict, code: str) -> ToolResult: pass