Skip to main content

extract_output_format

Function extract_output_format 

Source
pub fn extract_output_format(
    args: &mut ToolArgs,
    schema: Option<&ToolSchema>,
) -> Option<OutputFormat>
Expand description

Extract and remove a global output format flag from ToolArgs.

Only applies to known tools with a schema. External commands (schema=None) must receive their flags untouched — cargo --json must not have –json stripped by the kernel.