feat: support setting title and description for server#1793
Closed
feat: support setting title and description for server#1793
Conversation
Add support for the `title` and `description` fields in the `Implementation` type, allowing servers to provide human-readable metadata during initialization. Changes: - Add `description` field to `types.Implementation` - Add `server_title` and `server_description` to `InitializationOptions` - Wire up title/description through `Server` constructor and session - Add test for title and description passthrough Github-Issue:#1783
maxisbey
commented
Dec 17, 2025
Comment on lines
+142
to
+143
| title: str | None = None, | ||
| description: str | None = None, |
Contributor
Author
There was a problem hiding this comment.
move to bottom to avoid positional kwarg errors
maxisbey
commented
Dec 17, 2025
| ), | ||
| ) as server_session: | ||
| async for message in server_session.incoming_messages: # pragma: no branch | ||
| if isinstance(message, Exception): # pragma: no cover |
Contributor
Author
There was a problem hiding this comment.
remove pragma, instead just fail if there's an exception
maxisbey
commented
Dec 17, 2025
|
|
||
| if isinstance(message, ClientNotification) and isinstance( | ||
| message.root, InitializedNotification | ||
| ): # pragma: no branch |
Contributor
Author
There was a problem hiding this comment.
remove all pragmas if possible, use asserts with failures instead
maxisbey
commented
Dec 17, 2025
| tg.start_soon(run_server) | ||
|
|
||
| result = await client_session.initialize() | ||
| except anyio.ClosedResourceError: # pragma: no cover |
Contributor
Author
There was a problem hiding this comment.
remove exception catching and either accept it through asserts or fail
9 tasks
9 tasks
Member
|
Closed by #1634 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for the
titleanddescriptionfields in theImplementationtype, allowing servers to provide human-readable metadata during initialization.Changes:
descriptionfield totypes.Implementationserver_titleandserver_descriptiontoInitializationOptionsServerconstructor and sessionGithub-Issue:#1783
Motivation and Context
How Has This Been Tested?
Breaking Changes
Types of changes
Checklist
Additional context