Skip to main content

parse

pub fn parse(
    body: &str,
    markers: &ToolCallMarkers,
    shape: &BracketedJsonShape,
) -> Result<Vec<ParsedToolCall>, BracketedArgsFailure>
Expand description

ยงErrors

Returns BracketedArgsFailure when the body looks like a bracketed-JSON tool-call block (matches the name/args separator) but contains a structural issue: invalid JSON arguments or a JSON value truncated mid-stream.