modelcontextprotocol / modelcontextprotocol/python-sdk

Replace Field(description=...) with proper docstrings in auth models

Open
#2,053 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auth enhancement v2
Dominant language
Python
Stars
24.3k
Forks
4k
Avg merge
1d 1h
Merged PRs (30d)
31

Description

From the V2 checklist in #1253 (under "Refactor the auth way of using it"):

Drop the use of Field(description=...), and use proper docstrings. As far as I know, we are not creating json schemas from it, so it's useless.

The auth-related Pydantic models currently use Field(description=...) to document fields. Since we are not generating JSON schemas from these models, the descriptions are not surfaced anywhere useful. They should be replaced with standard Python docstrings that are more discoverable via IDEs and help().

This is part of the broader auth refactor planned for V2.

Ref: Kludex's V2 checklist in #1253

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the auth-related Pydantic models that use Field(description=...), then review the V2 checklist in #1253 for intended scope. Replace those field descriptions with standard Python docstrings and verify that all targeted auth models no longer use this documentation pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.