Skip to content

Commit 173e0ee

Browse files
authored
fix typo: server has get_context attribute instead of request_context. (#446)
1 parent 7b6a903 commit 173e0ee

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
@@ -619,7 +619,7 @@ server = Server("example-server", lifespan=server_lifespan)
619619
# Access lifespan context in handlers
620620
@server.call_tool()
621621
async def query_db(name: str, arguments: dict) -> list:
622-
ctx = server.request_context
622+
ctx = server.get_context()
623623
db = ctx.lifespan_context["db"]
624624
return await db.query(arguments["query"])
625625
```

0 commit comments

Comments
 (0)