"""
Saturday morning test: run a scenario N times and print hit rate + confusion.
"""

import asyncio
from tests.dummy_server import mcp
from mcpbench.runner import run_scenario

MODEL = "claude-sonnet-4-20250514"


async def main():
    result = await run_scenario(
        prompt="look up John",
        server=mcp,
        n=5,
        model=MODEL,
        expected_tool="search_users",
    )

    print(f"Prompt: {result.prompt!r}")
    print(f"Expected: {result.expected_tool}")
    print(f"Hit rate: {result.hit_rate:.0%} ({sum(1 for r in result.runs if r.tool_called == result.expected_tool)}/{len(result.runs)})")
    print(f"Confusion: {result.confusion}")


if __name__ == "__main__":
    asyncio.run(main())
