get_tool_snippet#

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

zett_agent.tools.base.get_tool_snippet(function)[source]#

Extract the Snippet section from a function docstring.

Parameters:

function (Callable[[...], Any]) – Undecorated Python function whose docstring follows the tool documentation format.

Returns:

The normalized snippet, or an empty string when the section is absent.

Return type:

str