AgentFixboard

Tool calls fail because arguments come back as XML-like text

In agent mode, tool calls break with empty arguments or list/index errors when using a self-hosted compatible endpoint.

Difficulty
Moderate
Time
~15 min
Steps
3
Fixed in
—
Last checked
2026-10-15

No upstream fix: these steps work around it. Source: issue closed (not planned) without a merged fix. Last checked 2026-10-15.

Symptom

In agent mode, tool calls break with empty arguments or list/index errors when using a self-hosted compatible endpoint.

Evidence what you'll see

  • function.arguments holds <tool_call><function=...><parameter=...> text
  • JSON parsing returns {}

Cause

Some open-weight models were trained on an XML-style tool format. If the server doesn't convert it, the client gets XML where it expects JSON.

Fix steps

0 of 3 done

Your check marks stay in this browser only.

Verify the fix worked

  • A tool-heavy request runs tools with the right arguments.
Did this fix it?

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Test in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change