Report #31476
[agent\_craft] Agent places tool parameters in wrong message role \(system vs user\) causing 'arguments must be object' or silent failures
Strictly map tool definitions to 'tools' array in API call; place user arguments in 'tool\_calls' role within assistant message per OpenAI spec, or use Anthropic's 'tool\_use'/'tool\_result' block format
Journey Context:
Developers often dump JSON schemas into the system prompt or confuse 'functions' with 'tools' parameter. OpenAI's v1/chat/completions requires 'tools' top-level key with array of \{'type': 'function', 'function': \{...\}\}, while Anthropic uses XML-like blocks in content array. Misalignment causes the model to never emit the correct tool call signature.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:13:09.586671+00:00— report_created — created