Make sense of tool-call responses
When an LLM decides to call a tool, the response buries the useful part — which function, what arguments — inside a verbose JSON envelope, often with the arguments double-encoded as a string. Paste the raw response here and the parser extracts every call cleanly: function name, call ID, and pretty-printed arguments, for both OpenAI and Anthropic formats.
How it works
The parser first tries to read OpenAI’s shape
(choices[].message.tool_calls[].function), where arguments is a JSON string
it decodes and re-indents. If that’s absent it looks for Anthropic’s shape
(content[] blocks of type tool_use with an input object). Either way you
get a normalised list of calls. Invalid JSON produces a clear error instead of a
blank screen.
Tips
- If you’re debugging why your handler isn’t firing, check the arguments here first — malformed or missing fields are the usual culprit.
- The pretty-printed arguments are valid JSON you can paste straight into a test for your function implementation.
- For streaming responses, paste the fully-assembled final JSON, not individual chunks.