Constructor for ToolContext
OptionalfunctionOptionaleventReadonly_eventTODO: make this public for Agent Development Kit, but private for users.
Protected Readonly_invocationOptionalfunctionThe function call id of the current tool call. This id was returned in the function call event from LLM to identify a function call. If LLM didn't return this id, ADK will assign one to it. This id is used to map function call response to the original function call.
Gets the event actions associated with this context.
The user content that started this invocation. READONLY field.
The current invocation id.
The name of the agent that is currently running.
The application name for this invocation. READONLY field.
The user ID for this invocation. READONLY field.
The session ID for this invocation. READONLY field.
Gets the event actions of the current tool call
Searches the memory of the current user
The context of the tool.
This class provides the context for a tool invocation, including access to the invocation context, function call ID, event actions, and authentication response. It also provides methods for requesting credentials, retrieving authentication responses, listing artifacts, and searching memory.