Skip to content

Gemini CLI v0.1.19: Issues with Schema for InputSchema #9

Closed

Description

@tanaikech

I've reencountered a schema-related error after updating the Gemini CLI from v0.1.18 to v0.1.19. All 115 tools worked correctly in v0.1.18, but the update caused two distinct problems:

  1. When a schema containing a $ref is used, the CLI fails to launch with a "missing types in its parameter schema" error.
  2. If I modify the same schema to remove the $ref and flatten it, a different error occurs: "FunctionDeclaration in the request exceeds the maximum allowed nesting depth" when running a prompt.

The following tools are affected:

  • classroom_courses_updateGradingPeriodSettings
  • classroom_courses_students_create
  • classroom_courses_teachers_create
  • classroom_courses_courseWorkMaterials_create
  • classroom_courses_courseWorkMaterials_patch
  • classroom_courses_courseWork_studentSubmissions_patch
  • classroom_courses_courseWork_rubrics_create
  • classroom_courses_courseWork_rubrics_patch
  • manage_google_docs_using_docs_api
  • manage_google_sheets_using_sheets_api
  • manage_google_slides_using_slides_api

The original schema caused the nesting depth error, so I had introduced $ref as a workaround in v0.1.18, which was successful. The update seems to have broken this fix.

I've noticed an additional issue: the following tools can't be used. When I include them, running a prompt results in the error, "FunctionDeclaration in the request exceeds the maximum allowed nesting depth." This error didn't occur in version 0.1.18.

  • classroom_courses_announcements_create
  • classroom_courses_announcements_patch

Action Required: For now, please continue to use Gemini CLI v0.1.18 when working with these tools.

Future: I will track and confirm the status of the tool updates in parallel with the Gemini CLI update.

Note: About the error "FunctionDeclaration in the request exceeds the maximum allowed nesting depth.", today, when I downgrade from v0.1.19 to v0.1.18 and test it again, I noticed that the tools that worked yesterday didn't work with this error now. So, this might be due to the change in the specification at Gemini.

Activity

  1. tanaikech commented on Aug 13, 2025

    @tanaikech
    OwnerAuthor
  2. tanaikech commented on Aug 14, 2025

    @tanaikech
    OwnerAuthor

    I updated to v1.0.24.

    I’ve dealt with an issue caused by the update of the Gemini CLI from v0.1.18 to v0.1.19.

    The update has lowered the schema nesting depth, which now requires the use of $ref. However, the parametersJsonSchema appears to be incompatible with this. This means that a request body, such as the batchUpdate for the Docs, Sheets, and Slides APIs, cannot be directly generated using the input schema. It would be very useful if an AI agent could directly generate this type of complex request body.

    To solve this, I explored solutions to manage the low depth without using $ref for these three tools. I came up with the following workaround:

    The JSON schema is included in the tool's description, and this description is used as a prompt for the AI agent.
    

    With this workaround, the input schema remains simple, and the complex JSON schema can still be used to generate the request body. Additionally, no errors occur when using the Gemini CLI.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions