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 1 commit 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 1 commit into
github:mainfrom
Mazen-Embaby:fix/issue-write-boolean-enum

Conversation

@Mazen-Embaby

Copy link
Copy Markdown

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).

@Mazen-Embaby Mazen-Embaby requested a review from a team as a code owner July 14, 2026 22:52
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.

1 participant