fn delimited_tool_output(output: &str, instructions: Option<&str>) -> StringExpand description
Wraps tool output for the LLM so that data from outside the conversation cannot be read as instructions about it, and enforces the one size limit every tool output has to respect.
The limit lives here rather than in each tool because an output the conversation cannot store ends the whole turn, so no tool may be trusted to opt in. A tool that would rather shape its own result than be cut off should bound its lists with CappedList instead of relying on this.