-
Notifications
You must be signed in to change notification settings - Fork 49
[MCP Apps] Have apps request display mode instead #152
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
Conversation
commit: |
|
Thanks @martinalong, looks good! Please note that there's an open PR for the display mode request (#38). It'd be great for you to sync |
specification/draft/apps.mdx
Outdated
|
|
||
| Host behavior: | ||
| * Host SHOULD check if the requested mode is in `availableDisplayModes` from host context. | ||
| * If the requested mode is available, Host SHOULD switch to that mode and return it in the response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about MUST? App developers will need to rely on this field in cases where they need to adjust the app's view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes good call! also the phrasing is wrong on that first one i realized. Will update to:
* App MUST check if the requested mode is in `availableDisplayModes` from host context.
* It is up to the host whether it honors the request, however regardless of whether it switches to the requested mode, host MUST return the resulting mode in the response.
I had claude took a look at #38 for comparison. I think after considering it, we should stick to the way it's done in this PR (#152). B/c this PR does it exactly the way it's done in OpenAI apps sdk (so easier for apps to move over), but with the addition of Also one issue with the approach #38 is that the only way to know if a display mode is supported is to request a change to that mode. This'll pose a problem b/c then you'll have apps displaying pip or full screen buttons that do nothing. |
I think we should keep the current naming b/c the naming choice ( |

Motivation and Context
Addresses issue #41
This adds
requestDisplayMode, a way for apps to request display mode changes (go full screen, etc). This is just a request, so is not guaranteed to be honored.Note that the host can initiate an update of
displayModeto inline without it being requested by the app (to ensure that the user always has a standard way to return to the default view)How Has This Been Tested?
Manually tested
Breaking Changes
No
Types of changes
Checklist
Additional context