Skip to content

Commit 4445683

Browse files
authored
Merge branch 'main' into fix/resources-with-context
2 parents 5920bd2 + 58b989c commit 4445683

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ mcp = FastMCP("My App", lifespan=app_lifespan)
194194
@mcp.tool()
195195
def query_db(ctx: Context) -> str:
196196
"""Tool that uses initialized resources"""
197-
db = ctx.request_context.lifespan_context["db"]
197+
db = ctx.request_context.lifespan_context.db
198198
return db.query()
199199
```
200200

0 commit comments

Comments
 (0)