Skip to content

[bug] Google tool-schema sanitizer can emit array schemas without required items #5689

Closed

Description

@RHODIZSECURITY

Client or integration

Direct HTTP/API client

Area

Tools / MCP / web search

Summary

The Google tool-schema sanitizer/compiler can emit a required array schema without an items schema. Some Google/Gemini tool-schema consumers reject or mishandle such arrays. Expected: when a required array lacks items, materialize a safe item schema during sanitization without changing valid existing item schemas.

Reproduction

  1. Supply a tool/function schema containing a required property with type: "array" and no items.
  2. Compile/sanitize it through the Google tool-schema path.
  3. Inspect the emitted schema.
  4. On official v2.63.0, the required array can remain without items.
  5. A local patch materializes the missing array item schema and keeps valid schemas unchanged.

Version

2.63.0 / commit 96b1406

Operating system

Ubuntu Server Linux x86_64

Provider and model

Google/Gemini-compatible tool schema path

Logs or error output

Representative invalid shape: {"type":"array"} on a required tool parameter, with no "items".

Screenshots and supporting files

Focused Google schema/compiler regressions pass with the local patch.

Redacted configuration

{"type":"object","required":["values"],"properties":{"values":{"type":"array"}}}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  2. added
    bugSomething isn't working
    toolstool_calls, MCP, web-search / sidecar tools
    on Sep 23, 2026
  3. lidge-jun commented on Sep 24, 2026

    @lidge-jun
    Owner

    Fixed on dev by bundle #5739 (squash-merged as a8d526f); it will ship in the next release. Closing manually because dev is not the default branch, so GitHub does not auto-close. If you still see this on a build that includes a8d526f, please reopen with the version and a redacted reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions