Skip to main content

compact_tool_description

Function compact_tool_description 

Source
pub fn compact_tool_description(
    original: &str,
    mode: ToolDocumentationMode,
    per_tool_max: Option<usize>,
) -> String
Expand description

Project a tool description for the given documentation mode.

per_tool_max (used for MCP tools) further lowers the limit in every mode. Whitespace runs are collapsed to single spaces in all modes.