Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

OpenAI API Compatibility Issue: MissingadditionalProperties: false in Tool Parameter Schemas #376

Open
Labels
bugSomething isn't working
@p-breslin

Description

@p-breslin

Describe the bug

Thegithub-mcp-server is incompatible with OpenAI models (likegpt-4.1 andgpt-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 bygithub-mcp-server are missing this property in their schema, causing API requests to fail with a400 Bad Request error. This prevents the server from being used effectively with OpenAI-based clients.

Affected version

GitHub MCP ServerVersion: v0.2.1Commit: 9fa582d8d63522d70ce8f3af58265effb9645323Build Date: 2025-04-21T23:03:01Z

Steps to reproduce the behavior

  1. Run theghcr.io/github/github-mcp-server:v0.2.1 Docker image (or build from source commit9fa582d) with a validGITHUB_PERSONAL_ACCESS_TOKEN.
  2. Configure an MCP client to use this server with an OpenAI model that supports function/tool calling (e.g.,gpt-4.1-nano).
  3. Attempt to invoke a tool likeadd_issue_comment orget_pull_request through the client.
  4. Observe the error returned by the OpenAI API (either in server logs or client response).

Expected vs actual behavior

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.

Actual: The OpenAI API rejects the tool call with a400 Bad Request error because the schema is invalid. The specific error indicates thatadditionalProperties is required and must befalse in the tool's parameter schema.

Logs

Example OpenAI Error Log:

ERROR    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          to be false.", 'type': 'invalid_request_error', 'param': 'tools[0].function.parameters', 'code': 'invalid_function_parameters'}}                                                                 WARNING  Attempt 1/1 failed: Invalid schema for function 'add_issue_comment': In context=(), 'additionalProperties' is required to be supplied and to be false.

Additional Context:

The root cause appears to be the schema generation logic within the underlyingmcp-go framework (github.com/mark3labs/mcp-go), which doesn't add the requiredadditionalProperties: false property to the top-level parameter object for most tools defined viamcp.NewTool.

It's worth noting that while tools likePushFiles (repositories.go) andCreatePullRequestReview (pullrequests.go) correctly defineadditionalProperties: false for the schema ofitems within their specific array parameters (usingmcp.Items), this specific fix doesn't apply to thetop-level parameters object of those tools, nor does it apply to the simpler tools (likeadd_issue_comment) that lack such nested structures. The core issue remains the generation of the main tool parameter schema required by the OpenAI API.

A fix within themcp-go framework seems necessary for broad compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp