Skip to main content

Module parser

Module parser 

Source
Expand description

Multi-format tool call parser

Parses tool calls from LLM output across multiple formats: JSON → XML → Markdown (priority order).

Ported from zeroclaw’s parse_tool_calls which handles JSON, XML, Markdown, and GLM-style formats for maximum resilience.

Structs§

ParseResult
Result of parsing: extracted text (non-tool-call content) and tool calls.
ParsedToolCall
A parsed tool call extracted from LLM output.

Enums§

ToolCallFormat
The format in which the tool call was detected.

Functions§

parse
Parse tool calls from an LLM response string.