Skip to content

Support strict schemas for MCP tools #404

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

Closed
jezell opened this issue Mar 31, 2025 · 1 comment
Closed

Support strict schemas for MCP tools #404

jezell opened this issue Mar 31, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@jezell
Copy link

jezell commented Mar 31, 2025

Strict tool calling significantly improves OpenAI's ability to send proper payloads to JSON tools. Unfortunately, MCP tools always use non strict tool calling in the Agents SDK, increasing the likelihood that bad data will be sent over the wire. Not all MCP schemas play nicely with strict tool callings current limitations, but when the schema is supported, but it would be nice to be able to opt into strict tool calling when the schema is supported.

@jezell jezell added the enhancement New feature or request label Mar 31, 2025
rm-openai added a commit that referenced this issue Apr 1, 2025
## Summary:
Towards #404. I made this configurable because it's not clear this is always a good thing to do. I also made it default to False because I'm not sure if this could cause errors.

If it works out well, we can switch the default in the future as a small breaking changes

## Test Plan:
Unit tests
rm-openai added a commit that referenced this issue Apr 1, 2025
## Summary:
Towards #404. I made this configurable because it's not clear this is always a good thing to do. I also made it default to False because I'm not sure if this could cause errors.

If it works out well, we can switch the default in the future as a small breaking changes

## Test Plan:
Unit tests
rm-openai added a commit that referenced this issue Apr 1, 2025
## Summary:
Towards #404. I made this configurable because it's not clear this is
always a good thing to do. I also made it default to False because I'm
not sure if this could cause errors.

If it works out well, we can switch the default in the future as a small
breaking changes

## Test Plan:
Unit tests
@rm-openai
Copy link
Collaborator

Should be good to go in the next version (0.0.8) @jezell

Lightblues pushed a commit to Lightblues/openai-agents-python that referenced this issue Apr 13, 2025
## Summary:
Towards openai#404. I made this configurable because it's not clear this is
always a good thing to do. I also made it default to False because I'm
not sure if this could cause errors.

If it works out well, we can switch the default in the future as a small
breaking changes

## Test Plan:
Unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants