Skip to main content
Lightning Jar - Web Studio Lightning Jar Wordmark

Findings No. 15

Gemini rejects an array tool schema that omits items

One missing items declaration failed all 576 Gemini cells of a tools arm at the API layer. JSON Schema acceptance is per-vendor folklore; validate against every provider before a run you care about.

Barkup Bench Tooling verified Gemini API via Vercel AI Gateway; other vendors accepted the same encoding

Gemini's API rejects a tool declaration whose schema types a parameter as an array without specifying items. Other vendors accepted the same encoding without complaint. In Barkup Bench, that one omission failed all 576 Gemini cells of the tools arm at the API layer, before a single scored datum existed.

The fix changed no semantics: adding the items declaration left the accepted value space identical, and the arm re-ran cleanly. The interesting part is the failure's shape, loud and total rather than quiet and partial, which made it cheap: an encoding that one vendor rejects outright is far kinder than one a vendor silently misreads.

The general rule: JSON Schema acceptance is per-vendor folklore, not a standard you can assume. Validate your tool schemas against every provider you call before any run you care about, and prefer the strictest vendor's requirements as your baseline encoding.

Receipt: Barkup Bench REPORT.md, "Limitations" (the tool-schema encoding fix); the Barkup Bench dashboard.

Ask Eljay

Ask about the studio's work, research, packages, or writing. A few starters:

Answers come from this site's own content and link their sources. For anything that matters, email hello@lightningjar.com.