You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to OpenAI, Windsurf and Gemini all handling JSON schemas in a conflicting manner, we need to remove commenting from create_pull_request_review. The LLM should still be able to leave comments on PRs using add_pull_request_review_comment. More info on modelcontextprotocol/modelcontextprotocol/issues/410.
To do this we're going to need to adjust add_pull_request_review_comment to use the GraphQL API, because the REST API doesn't allow you to add new comments to an existing review: microsoft/vscode-pull-request-github#908 (comment)
I have a branch now that implements most of this in an MVP manner: 1e9fbbc
Here's the results of the e2e test running:
➜ git:(343-remove-comments-from-create_pull_request_review) ✗ GITHUB_MCP_SERVER_E2E_TOKEN=$(gh auth token) go test -v -count=1 -run "TestPullRequestReview" --tags e2e ./e2e
=== RUN TestPullRequestReview
=== PAUSE TestPullRequestReview
=== CONT TestPullRequestReview
e2e_test.go:45: Building Docker image for e2e tests...
e2e_test.go:118: Starting Stdio MCP client...
e2e_test.go:221: Getting current user...
e2e_test.go:250: Creating repository williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:274: Creating branch in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:291: Creating commit with new file in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:319: Creating pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:334: Creating pending review for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:359: Adding review comment to pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:373: Submitting review for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:387: Getting reviews for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
e2e_test.go:259: Deleting repository williammartin/github-mcp-server-e2e-TestPullRequestReview-1745611991474...
--- PASS: TestPullRequestReview (7.81s)
PASS
ok github.com/github/github-mcp-server/e2e 8.103s
All that said, if we move to GQL, we might still be able to expose adding threads and submission in one flow since the types might be different. Haven't explored it yet.
For those who encountering argument schema type issue when connecting Github MCP with OpenAI / Gemini Github: pin docker image's version to v0.1.1 helps.
Tried out v0.2.0 and v0.2.1, both have errors:
Github MCP v0.2.1 with OpenAI models: OpenAIException - Invalid schema for function 'create_pull_request_review': 'STRING' is not valid under any of the given schemas.
Github MCP v0.2.1 with Gemini models: {'error': {'code': 400, 'message': 'Unable to submit request because create_pull_request_reviewfunctionDeclarationparameters.comments.sideschema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling', 'status': 'INVALID_ARGUMENT'}}
Github MCP v0.2.0 with ADK (any model): Pydantic error Input should be 'TYPE_UNSPECIFIED', 'STRING', 'NUMBER', 'INTEGER', 'BOOLEAN', 'ARRAY' or 'OBJECT' [type=enum, input_value=['number', 'null'], input_type=list]
Activity
williammartin commentedon Apr 25, 2025
To do this we're going to need to adjust
add_pull_request_review_comment
to use the GraphQL API, because the REST API doesn't allow you to add new comments to an existing review: microsoft/vscode-pull-request-github#908 (comment)williammartin commentedon Apr 25, 2025
I have a branch now that implements most of this in an MVP manner: 1e9fbbc
Here's the results of the e2e test running:
All that said, if we move to GQL, we might still be able to expose adding threads and submission in one flow since the types might be different. Haven't explored it yet.
MrOrz commentedon Apr 27, 2025
For those who encountering argument schema type issue when connecting Github MCP with OpenAI / Gemini Github: pin docker image's version to v0.1.1 helps.
Tried out v0.2.0 and v0.2.1, both have errors:
OpenAIException - Invalid schema for function 'create_pull_request_review': 'STRING' is not valid under any of the given schemas.
{'error': {'code': 400, 'message': 'Unable to submit request because
create_pull_request_reviewfunctionDeclaration
parameters.comments.sideschema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling', 'status': 'INVALID_ARGUMENT'}}