Skip to content

fix: pass description as keyword argument in Server initialization#282

Open
vincent067 wants to merge 1 commit intotadata-org:mainfrom
vincent067:fix/description-param-bug
Open

fix: pass description as keyword argument in Server initialization#282
vincent067 wants to merge 1 commit intotadata-org:mainfrom
vincent067:fix/description-param-bug

Conversation

@vincent067
Copy link
Copy Markdown

Hey there! 👋

Found a small bug while reading through the codebase - the description parameter was being passed positionally to Server(), which actually maps it to the version parameter instead of description.

The fix:
Changed Server(self.name, self.description) to Server(self.name, description=self.description) to ensure the description goes to the right place.

This should fix #272 🙂

Noticed this while exploring how the MCP server gets initialized - loving the clean architecture of this project btw! The ASGI transport approach is really elegant.

Let me know if you need any changes!

The Server constructor signature is:
  def __init__(self, name: str, version: str | None = None, title: str | None = None, description: str | None = None, ...)

Previously, self.description was passed as the second positional argument,
which incorrectly mapped to the version parameter instead of description.

Fixes tadata-org#272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] self.description is passed to version parameter instead of description in Server initialization

1 participant