Skip to content

fix: include JsonSchema definitions in mcpTool inputSchema #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 26, 2025

Conversation

asanzfonetic
Copy link
Contributor

We noticed that the framework’s inputSchema parameter is expected to comply with JSON Schema standards. However, when the schema contains $ref references, the corresponding definitions were not being included. This caused incomplete schemas to be generated.

This PR fixes the issue by modifying a single line of code to ensure that all referenced JSON Schema definitions are properly included within the inputSchema.

This change improves schema completeness and compatibility with JSON Schema validators.

Copy link

changeset-bot bot commented Jul 22, 2025

🦋 Changeset detected

Latest commit: 24b7f05

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@openai/agents-core Patch
@openai/agents-openai Patch
@openai/agents-realtime Patch
@openai/agents Patch
@openai/agents-extensions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -3,11 +3,11 @@

export const METADATA = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to ask you to remove metadata.ts changes? Since the next release, these diff won't show up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@seratch seratch added package:agents-core bug Something isn't working labels Jul 23, 2025
@asanzfonetic asanzfonetic requested a review from seratch July 23, 2025 07:23
@seratch seratch merged commit d9c4ddf into openai:main Jul 26, 2025
5 checks passed
vrtnis pushed a commit to vrtnis/openai-agents-js that referenced this pull request Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:agents-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants