render_tool_guidance#

Build typed tools from annotations and docstrings. See the guide.

zett_agent.tools.base.render_tool_guidance(tools, *, snippets=True, guidelines=True, returns=False)[source]#

Render grouped tool metadata for insertion into a system prompt.

Snippets are presented together so the model can scan the available call shapes first. Guidelines follow in one named group per tool, which avoids repeating a tool name for every rule. snippets and guidelines switch either section off. returns adds one sentence after each snippet saying what the tool returns, as JSON Schema, and ends that tool’s entry with the prose from its docstring Returns section; it is off by default, because most tools return plain text the model already reads. Return information belongs to the snippets section, so snippets=False removes it.

Parameters:
  • tools (Sequence[AgentTool])

  • snippets (bool)

  • guidelines (bool)

  • returns (bool)

Return type:

str