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)[源代码]#
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.
snippetsandguidelinesswitch either section off.returnsadds one sentence after each snippet saying what the tool returns, as JSON Schema, and ends that tool's entry with the prose from its docstringReturnssection; it is off by default, because most tools return plain text the model already reads. Return information belongs to the snippets section, sosnippets=Falseremoves it.- 参数:
tools (Sequence[AgentTool])
snippets (bool)
guidelines (bool)
returns (bool)
- 返回类型:
str