"""
Tools for data-analytics-agent-for-busin agent.
"""

TOOLS = [
    {
        "name": "query_database",
        "desc": "Execute SQL query",
        "handler": "lambda a: f'Query: {a[\"query\"]}'"
    },
    {
        "name": "analyze_data",
        "desc": "Analyze dataset",
        "handler": "lambda a: 'Analysis complete'"
    }
]

def execute_tool(name: str, args: dict) -> str:
    """Execute a tool by name with given args."""
    handlers = {"query_database": lambda a: f'Query: {a["query"]}',
    "analyze_data": lambda a: 'Analysis complete'}
    handler = handlers.get(name)
    if handler:
        return handler(args)
    return f"Unknown tool: {name}"
