mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 14:59:51 +08:00
Under a large tool surface and long history, providers intermittently emit a native function call with empty ``arguments`` even though the schema marks fields required. The call was dispatched anyway, so the tool did the rejecting: ``exec`` raised "requires a non-empty command", ``write_note`` answered "Unknown mode ''". Neither reads as "an argument is missing", so the model re-emitted the same malformed call until the loop budget ran out — one report saw 5 of 7 write_note calls arrive empty and retry 5-7 times. A guard in front of dispatch turns that into one self-correcting round: the call never runs, and the role=tool body names the missing arguments and their accepted values (including enums, which is what turns "Unknown mode ''" into a one-round fix). The rules stay narrow so nothing that used to work stops working: a parameter carrying a default is not required, empty collections are left alone, server-injected kwargs count as supplied, and an unknown tool name still reaches the registry that owns that error. Every required argument across the builtin tools is one the tool would have raised on anyway.