Skip to content

fix: remove invalid boolean enum from issue_write delete parameter this appears in antigravity IDE cause error - #2887

Open
Mazen-Embaby wants to merge 2 commits into
github:mainfrom
Mazen-Embaby:fix/issue-write-boolean-enum
Open

fix: remove invalid boolean enum from issue_write delete parameter this appears in antigravity IDE cause error#2887
Mazen-Embaby wants to merge 2 commits into
github:mainfrom
Mazen-Embaby:fix/issue-write-boolean-enum

Conversation

@Mazen-Embaby

@Mazen-Embaby Mazen-Embaby commented Jul 14, 2026

Copy link
Copy Markdown

fix: #2904 This PR resolves the INVALID_ARGUMENT schema error by removing the Enum: []any{true} constraint on the boolean delete parameter in the issue_fields schema inside issue_write.

Since the Gemini API schemas only accept strings inside enum properties (repeated string enum in protobuf declarations), non-string values like the boolean true are serialized to an empty string "", triggering validation errors in client/bridge connections. Removing the redundant enum constraint fixes the issue and aligns the property definition with the one used in set_issue_fields.

Bug Description

When using the github-mcp-server with an LLM client (such as Gemini), the issue_write tool fails to load, returning a 400 INVALID_ARGUMENT error:

GenerateContentRequest.tools[51].function_declarations[0].parameters.properties[issue_fields].items.properties[delete].enum[0]: cannot be empty

Root Cause

The delete property within the issue_fields array in pkg/github/issues.go was defined with an enum constraint restricting it to a boolean true:

"delete": {
    Type: "boolean",
    Enum: []any{true},
    Description: "...",
}

Since the Gemini/client API schemas only accept strings inside the enum property (defined as repeated string enum in the protobuf declaration), non-string values like the boolean true are serialized to an empty string (""), triggering the validation error.

Solution
Remove the Enum: []any{true} constraint, making delete a simple optional boolean parameter, which is clean and matches the pattern already used in set_issue_fields (in pkg/github/issues_granular.go).

Fixes #2904

Fixes #2904

@JoannaaKL JoannaaKL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Mazen-Embaby! Thank you for opening a pull request. Couple of findings:

  1. The root cause is the client, not github-mcp-server and should be addressed there
    JSON Schema 2020-12 explicitly allows enum elements of any type. "enum": [true] on a "type": "boolean" is valid and correct. Gemini's Schema.enum is repeated string in protobuf. It coerces true"" and client's validator then rejects the empty string.
  2. Please add tests if suggesting changes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blocked bug from using MCP server in Antigravity IDE

3 participants