PtcRunner.SubAgent.Prompt.Tools (PtcRunner v0.4.1)
View SourceTool schema section generation for SubAgent prompts.
Generates the Available Tools section that shows all available tools with their signatures and descriptions. Optionally includes a separate "Tools for planning (do not call)" section for tools in the catalog.
Summary
Functions
Generate the tool schemas section.
Functions
Generate the tool schemas section.
Shows all available tools with their signatures and descriptions. Optionally includes a separate "Tools for planning (do not call)" section for tools in the catalog.
Parameters
tools- Map of tool name to functiontool_catalog- Optional map of tool names for planning (default: nil)
Returns
A string containing the tool schemas section.
Examples
iex> tools = %{"add" => fn %{x: x, y: y} -> x + y end}
iex> schemas = PtcRunner.SubAgent.Prompt.Tools.generate(tools)
iex> schemas =~ "# Available Tools"
true
iex> tools = %{"search" => fn _ -> [] end}
iex> catalog = %{"email_agent" => nil}
iex> schemas = PtcRunner.SubAgent.Prompt.Tools.generate(tools, catalog)
iex> schemas =~ "## Tools for planning (do not call)"
true