Title: OpenAI API Compatibility Issue: Missing `additionalProperties: false` in Tool Parameter Schemas · Issue #376 · github/github-mcp-server · GitHub
Open Graph Title: OpenAI API Compatibility Issue: Missing `additionalProperties: false` in Tool Parameter Schemas · Issue #376 · github/github-mcp-server
X Title: OpenAI API Compatibility Issue: Missing `additionalProperties: false` in Tool Parameter Schemas · Issue #376 · github/github-mcp-server
Description: Describe the bug The github-mcp-server is incompatible with OpenAI models (like gpt-4.1 and gpt-4o-mini) that use function/tool calling. The OpenAI API requires tool parameter schemas to explicitly include "additionalProperties": false a...
Open Graph Description: Describe the bug The github-mcp-server is incompatible with OpenAI models (like gpt-4.1 and gpt-4o-mini) that use function/tool calling. The OpenAI API requires tool parameter schemas to explicitly...
X Description: Describe the bug The github-mcp-server is incompatible with OpenAI models (like gpt-4.1 and gpt-4o-mini) that use function/tool calling. The OpenAI API requires tool parameter schemas to explicitly...
Opengraph URL: https://github.com/github/github-mcp-server/issues/376
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OpenAI API Compatibility Issue: Missing `additionalProperties: false` in Tool Parameter Schemas","articleBody":"### Describe the bug\n\nThe `github-mcp-server` is incompatible with OpenAI models (like `gpt-4.1` and `gpt-4o-mini`) that use function/tool calling. The OpenAI API requires tool parameter schemas to explicitly include `\"additionalProperties\": false` at the top level. Most tools generated by `github-mcp-server` are missing this property in their schema, causing API requests to fail with a `400 Bad Request` error. This prevents the server from being used effectively with OpenAI-based clients.\n\n### Affected version\n\n```\nGitHub MCP Server\nVersion: v0.2.1\nCommit: 9fa582d8d63522d70ce8f3af58265effb9645323\nBuild Date: 2025-04-21T23:03:01Z\n```\n\n### Steps to reproduce the behavior\n\n1. Run the `ghcr.io/github/github-mcp-server:v0.2.1` Docker image (or build from source commit `9fa582d`) with a valid `GITHUB_PERSONAL_ACCESS_TOKEN`.\n2. Configure an MCP client to use this server with an OpenAI model that supports function/tool calling (e.g., `gpt-4.1-nano`).\n3. Attempt to invoke a tool like `add_issue_comment` or `get_pull_request` through the client.\n4. Observe the error returned by the OpenAI API (either in server logs or client response).\n\n### Expected vs actual behavior\n\n**Expected:** The tool call should be successfully sent to the OpenAI model, and the model should be able to invoke the tool using the provided schema.\n\n**Actual:** The OpenAI API rejects the tool call with a `400 Bad Request` error because the schema is invalid. The specific error indicates that `additionalProperties` is required and must be `false` in the tool's parameter schema.\n\n### Logs\n\n**Example OpenAI Error Log:**\n```log\nERROR API status error from OpenAI API: Error code: 400 - {'error': {'message': \"Invalid schema for function 'add_issue_comment': In context=(), 'additionalProperties' is required to be supplied and \n to be false.\", 'type': 'invalid_request_error', 'param': 'tools[0].function.parameters', 'code': 'invalid_function_parameters'}} \nWARNING Attempt 1/1 failed: Invalid schema for function 'add_issue_comment': In context=(), 'additionalProperties' is required to be supplied and to be false. \n```\n\n**Additional Context:**\n\nThe root cause appears to be the schema generation logic within the underlying `mcp-go` framework (`github.com/mark3labs/mcp-go`), which doesn't add the required `additionalProperties: false` property to the top-level parameter object for most tools defined via `mcp.NewTool`.\n\nIt's worth noting that while tools like `PushFiles` (`repositories.go`) and `CreatePullRequestReview` (`pullrequests.go`) correctly define `additionalProperties: false` for the schema of *items within their specific array parameters* (using `mcp.Items`), this specific fix doesn't apply to the *top-level parameters object* of those tools, nor does it apply to the simpler tools (like `add_issue_comment`) that lack such nested structures. The core issue remains the generation of the main tool parameter schema required by the OpenAI API.\n\nA fix within the `mcp-go` framework seems necessary for broad compatibility.","author":{"url":"https://github.com/p-breslin","@type":"Person","name":"p-breslin"},"datePublished":"2025-05-05T16:55:07Z","url":"https://github.com/github/github-mcp-server/issues/376"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2a8157b7-c14b-6fad-6ac2-7b0cd9b5dde0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E104:133FC:110114D:178FB45:6B06B89A |
| html-safe-nonce | 74eec8dbff205cfff9cffb5c0aec4c9d7505ccb98749e1e603518d06a9a6be55 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTA0OjEzM0ZDOjExMDExNEQ6MTc4RkI0NTo2QjA2Qjg5QSIsInZpc2l0b3JfaWQiOiI3NDU2NTQyNjAxODM2NDExMDM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | af2dea0356632eaa5729adbf7272c880483750c2f7ac42cb60944ca5000453d7 |
| hovercard-subject-tag | issue:3040243497 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/376/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1cd229e990e4abcd092895a4dcc96d53aa133d9ccdc18ac94466d5934c3e28a/github/github-mcp-server/issues/376 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1cd229e990e4abcd092895a4dcc96d53aa133d9ccdc18ac94466d5934c3e28a/github/github-mcp-server/issues/376 |
| og:image:alt | Describe the bug The github-mcp-server is incompatible with OpenAI models (like gpt-4.1 and gpt-4o-mini) that use function/tool calling. The OpenAI API requires tool parameter schemas to explicitly... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | p-breslin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 32031aaff792fa7ad778f7418e1fbfc0d525a5779804329b769aa75230448a18 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 37014d914b7d14eede971655595f687a0202af40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width