LLM Tool Call Fuzzy JSON Repair
Provides fault-tolerant repair for LLM tool call payloads, sanitizes unescaped quotes, and strips markdown codefences.
This tool offers a robust, fault-tolerant JSON repair engine designed to restore damaged, truncated, or markdown-polluted tool call payloads generated by Large Language Models. Inspired by existing parsers, it ensures that even malformed outputs can be processed, making LLM integrations more reliable by automatically cleaning up common parsing issues and normalizing various data formats into valid JSON for subsequent tool execution.
Key Features
01Recovers truncated streams by closing uncompleted brackets and quotes.
02Normalizes Python constants (True, False, None) and single quotes into standard JSON format.
038 GitHub stars
04Operates with zero external dependencies, leveraging only the standard Python 3.9+ library.
Use Cases
01Processing LLM responses that contain unescaped quotes or are wrapped in markdown code fences.
02Repairing malformed or incomplete JSON payloads generated by LLMs during tool invocation.
03Enhancing the reliability of LLM agents by ensuring robust parsing of tool call outputs.