Support for http request injection propagation to tools (#816)

This commit is contained in:
ihrpr 2025-05-28 15:59:14 +01:00 • committed by GitHub
commit 70014a2bbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,11 +8,13 @@ from mcp.types import RequestId, RequestParams
SessionT = TypeVar("SessionT", bound=BaseSession[Any, Any, Any, Any, Any])
LifespanContextT = TypeVar("LifespanContextT")
RequestT = TypeVar("RequestT", default=Any)
@dataclass
class RequestContext(Generic[SessionT, LifespanContextT]):
class RequestContext(Generic[SessionT, LifespanContextT, RequestT]):
request_id: RequestId
meta: RequestParams.Meta | None
session: SessionT
lifespan_context: LifespanContextT
request: RequestT | None = None