Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

fix typo: server has get_context attribute instead of request_context.#446

Merged
ihrpr merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
shimizukawa:patch-1Copy head branch name to clipboard
May 13, 2025
Merged

fix typo: server has get_context attribute instead of request_context.#446
ihrpr merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
shimizukawa:patch-1Copy head branch name to clipboard

Conversation

@shimizukawa
Copy link
Contributor

@shimizukawa shimizukawa commented Apr 7, 2025

Motivation and Context

I fixed a typo that users might have misunderstood.

How Has This Been Tested?

I just verify with code.

def get_context(self) -> Context[ServerSession, object]:
"""
Returns a Context object. Note that the context will only be valid
during a request; outside a request, most methods will error.
"""
try:
request_context = self._mcp_server.request_context
except LookupError:
request_context = None
return Context(request_context=request_context, fastmcp=self)

Breaking Changes

no.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Copy link
Contributor

@ihrpr ihrpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@ihrpr ihrpr merged commit 173e0ee into modelcontextprotocol:main May 13, 2025
6 checks passed
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.