Skip to content

Conversation

DaleSeo
Copy link
Contributor

@DaleSeo DaleSeo commented Sep 7, 2025

fixes #303

Motivation and Context

This fix resolves the OpenAI compatibility issue reported in Issue #303.

Before

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "EmptyObject",
    "description": "This is commonly used for representing empty objects in MCP messages..."
}

After

{}

How Has This Been Tested?

Updated existing test test_tool_macros_with_empty_param to validate the new behavior

Breaking Changes

None. This is a backward-compatible fix:

  • Tools with parameters continue to generate proper complex schemas
  • Only affects the schema generation for tools with no parameters

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@github-actions github-actions bot added T-test Testing related changes T-macros Macro changes labels Sep 7, 2025
@4t145 4t145 merged commit b482cfc into modelcontextprotocol:main Sep 8, 2025
11 checks passed
@4t145
Copy link
Collaborator

4t145 commented Sep 8, 2025

Thanks for PR!

@github-actions github-actions bot mentioned this pull request Sep 8, 2025
@DaleSeo DaleSeo deleted the input-schema-with-no-parameters branch September 8, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-macros Macro changes T-test Testing related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Improper JSON schema for functions that have no properties in parameters
2 participants