pub trait ToolOutputTruncationStrategy: Send + Sync {
// Required method
fn apply<'life0, 'async_trait>(
&'life0 self,
ctx: ToolOutputTruncationContext,
output: ToolOutput,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Strategy hook for enforcing model-facing tool-output budgets.
This runs centrally in BasicToolExecutor, so it applies uniformly to
native tools, filesystem tools, MCP tools, and any custom tool source.