From 883be3864bf97da749c64c40b3129a12c1679ee7 Mon Sep 17 00:00:00 2001 From: Sam Tombury Date: Fri, 23 May 2025 11:45:06 +0100 Subject: [PATCH] docs: clarify docstring for Context implicit injection Resource functions do not (currently) support context injection --- src/mcp/server/fastmcp/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcp/server/fastmcp/server.py b/src/mcp/server/fastmcp/server.py index 3282baae6..955ad5171 100644 --- a/src/mcp/server/fastmcp/server.py +++ b/src/mcp/server/fastmcp/server.py @@ -897,7 +897,7 @@ class Context(BaseModel, Generic[ServerSessionT, LifespanContextT]): """Context object providing access to MCP capabilities. This provides a cleaner interface to MCP's RequestContext functionality. - It gets injected into tool and resource functions that request it via type hints. + It gets injected into tool functions that request it via type hints. To use context in a tool function, add a parameter with the Context type annotation: