messages_tools#

Connect a provider and configure retries, credentials, and transport. See the guide.

zett_agent.providers.anthropic_compatible.messages_tools(tools, server_tools=())[source]#

Render local tools, deferring the ones tool search is meant to load.

A tool marked deferred is declared with defer_loading: Anthropic keeps it out of the model’s context until a tool_reference names it. That only works when something can produce the reference, so the flag is honored only when the request carries a search: the local search tool, or Anthropic’s hosted tool_search_tool_*. Without one the tool is declared normally, because a deferred tool nothing can load would be unusable.

The local search tool is an ordinary function here, since Anthropic has no client-side search endpoint; the model calls it and its result carries the references (see search_result_blocks()).

Parameters:
Return type:

list[dict[str, JsonValue]]