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

Function keep_first_message

tests/lib/tools/test_runners.py:1825–1826  ·  view source on GitHub ↗
(params: Any)

Source from the content-addressed store, hash-verified

1823 runner.remove_tools(get_weather)
1824
1825 def keep_first_message(params: Any) -> Any:
1826 return {**params, "messages": list(params["messages"])[:1]}
1827
1828 with pytest.warns(UserWarning, match="Tool 'get_weather' not found in tool runner"):
1829 await _run_with_tool_changes(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected