from tools.bash import bash TOOL_SCHEMAS = [ { "name": "bash", "description": "Execute a bash command in the isolated sandbox environment. Use this to run shell commands, install packages, run scripts, etc.", "input_schema": { "type": "object", "properties": { "command": { "type": "string", "description": "The bash command to execute (e.g., 'ls -la', 'python script.py', 'pip install requests')", } }, "required": ["command"], }, } ] async def dispatch_tool(tool_name: str, tool_input: dict, sandbox) -> str: """Route tool calls to implementations.""" if tool_name == "bash": return await bash(command=tool_input["command"], sandbox=sandbox) return f"Unknown tool: {tool_name}"