MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / main

Function main

examples/tools_runner_search_tool.py:64–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63
64def main() -> None:
65 tools: list[BetaFunctionTool[Any]] = [
66 get_weather,
67 # ... many more tools
68 ]
69 runner = client.beta.messages.tool_runner(
70 max_tokens=1024,
71 model="claude-sonnet-5",
72 tools=[*tools, make_tool_searcher(tools)],
73 messages=[{"role": "user", "content": "What is the weather in SF?"}],
74 betas=["tool-search-tool-2025-10-19"],
75 )
76 for message in runner:
77 rich.print(message)
78
79
80main()

Callers 1

Calls 2

make_tool_searcherFunction · 0.85
tool_runnerMethod · 0.45

Tested by

no test coverage detected