Context object not populated with client details when accessed within tool call #1292
Unanswered
slimwizard
asked this question in
Q&A
Replies: 1 comment 1 reply
-
may i know, is this issue got sorted, ahve you find any solution for this ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm exploring using the Context object within my tools in order to grab things like
session_id
,client_id
, etc for logging/auditing purposes.The documentation seems to indicate that if I add the
ctx: Context
argument to any tool function, the underlying details will automatically be populated and available to use within the tool call. I've set this up but for some reason the only attribute of thectx
object that is being populated is my server's name - every other attribute is set to None. Does anyone have any experience with using the Context for this purpose?Just to note, I'm using Claude Desktop as a client although we will be writing custom clients in the near future. Even though I don't have access to the underlying Claude Desktop code, I would assume that the session and client values live somewhere within the managed connection between the client and server, and would be available in the server's context object accordingly, but maybe I'm missing something.
Beta Was this translation helpful? Give feedback.
All reactions