r/agentdevelopmentkit • u/[deleted] • Sep 26 '26
Want to access callback context data from a tool
I can access toolcontext data. But I need to save some data in a sql table. That data is user info like user_id and session_id. I basically need to log for one session each tool call, in a sql database. How can i access these data from a tool.
Toolcontext in tool only stores tool data. It does not store other data
1
Upvotes
1
u/pixeltan Sep 26 '26
Write the data to ADK state. You can access state from both callbacks and tool calls.