Skip to main content

parse_tool_call_blocks

Function parse_tool_call_blocks 

Source
pub fn parse_tool_call_blocks(content: &str) -> Vec<FunctionCall>
Expand description

Parse <tool_call> blocks from LLM text output into structured function calls.

Expected format:

<tool_call>
{"name": "get_activities", "arguments": {"provider": "strava", "limit": 25}}
</tool_call>

Tolerant parser: malformed JSON blocks are skipped with a warning log.