-
Notifications
You must be signed in to change notification settings - Fork 53
Add structuredContent responses #83
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
base: main
Are you sure you want to change the base?
Add structuredContent responses #83
Conversation
|
@macbookandrew This is a really nice feature - I was actually thinking about implementing something similar myself, but you beat me to it 😄 @nunomaduro Were you considering using a different library for JSON Schema? The current one seems a bit limited - for example, it doesn’t support all properties defined in the spec. |
Hmm...good point. So maybe instead of |
|
Yes, or even a separate response class to build and validate |
|
Looks really great! I think your suggestion @macbookandrew of I guess we'd also need to define the output schema as we do the input schema as per the spec also? And then a few JSON assertions on the test response and it'd be perfect. Let me know if you like me to contribute! |
|
Thanks for your input guys! I'm not sure we need the output schema so haven't added it yet, but this now uses Any thoughts on this so far? Anybody want to add the output schema? |
|
Working on a project now and this fit exactly what i need. |
This adds the ability for MCP tools to return a
structuredContentkey/value object as defined in the spec.This will be useful for building ChatGPT Apps and passing tool responses to the app UI: