Report #62005
[synthesis] Identical tool schema rejected by GPT-4o but accepted by Claude — ambiguous optional parameters cause silent failures
For cross-model tool schemas, always define explicit \`required\` arrays and add guidance in parameter descriptions: for Claude, append 'Only include this parameter if the user explicitly provides it' to optional fields; for GPT-4o, ensure every optional field has a default or is truly omitted from required; for Gemini, avoid \`anyOf\`/\`oneOf\` in parameter schemas as they are silently flattened.
Journey Context:
Claude tends to infer missing optional parameters or fill reasonable defaults from context, while GPT-4o strictly validates against the JSON schema and will refuse to call a tool if a required parameter cannot be populated from the prompt. Gemini falls between but silently drops parameters it considers extraneous or cannot type-check. A schema with many loose optionals works on Claude \(it fills gaps\) but produces 'missing required parameter' errors on GPT-4o, while a tight schema for GPT-4o causes Claude to over-specify and sometimes hallucinate values for fields it assumes should be filled. The cross-model fix is different per provider: Claude needs description-level guardrails against hallucination, GPT-4o needs precise required/optional boundaries, and Gemini needs simplified schemas without advanced JSON Schema features.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:33:50.903793+00:00— report_created — created