From 06586ca1a35500d878db8297e5c47214bf73ed35 Mon Sep 17 00:00:00 2001 From: ali <46029474+HumanRupert@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:38:09 +0330 Subject: [PATCH] Fix agent_name assignment in log_tool_usage function --- docs/context/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/context/index.md b/docs/context/index.md index af9b9ebe9a..b2f0da3256 100644 --- a/docs/context/index.md +++ b/docs/context/index.md @@ -449,7 +449,7 @@ You'll frequently need to read information stored within the context. from google.adk.tools import ToolContext def log_tool_usage(tool_context: ToolContext, **kwargs): - agent_name = tool_context.agent_nameSystem.out.println("Found temporary result from last tool: " + lastToolResult); + agent_name = tool_context.agent_name inv_id = tool_context.invocation_id func_call_id = getattr(tool_context, 'function_call_id', 'N/A') # Specific to ToolContext