We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2d4322 commit ee54acbCopy full SHA for ee54acb
README.md
@@ -204,7 +204,7 @@ mcp = FastMCP("My App", lifespan=app_lifespan)
204
def query_db() -> str:
205
"""Tool that uses initialized resources"""
206
ctx = mcp.get_context()
207
- db = ctx.request_context.lifespan_context["db"]
+ db = ctx.request_context.lifespan_context.db
208
return db.query()
209
```
210
0 commit comments