Readonly[A unique symbol to identify ADK base tool class.
ReadonlydescriptionReadonlyinputReadonlyisReadonlynameReadonlyretrieverThe Google API LLM variant to use.
Gets the OpenAPI specification of this tool in the form of a FunctionDeclaration.
NOTE
processLlmRequest to add function declaration to LLM request.The FunctionDeclaration of this tool, or undefined if it doesn't need to be added to LlmRequest.config.
Whether this tool needs a human to approve args before it runs.
The gate itself lives in the tool that owns it (see FunctionTool), but
the resume path has to ask the same question a turn later, to check that an
approval it is about to honour belongs to a tool that gates at all. A tool
that never gates returns false here, which is the safe default: an approval
naming it is meaningless and gets rejected rather than executed. Mirrors
Python's BaseTool.check_require_confirmation.
The arguments the tool would run with.
Optional_toolContext: ContextThe context of the call, when there is one.
Whether the call requires confirmation.
Processes the outgoing LLM request for this tool.
Use cases:
The request to process the LLM request.
Runs the tool with the given arguments and context.
NOTE
The request to run the tool.
A promise that resolves to the tool response.
StaticcreateIndexes every file under inputDir and returns a tool that retrieves
from it.
Requires the optional llamaindex and @llamaindex/readers packages,
and a configured LlamaIndex embedding model.
A retrieval tool over the files in a local directory.
Ported from adk-python
src/google/adk/tools/retrieval/files_retrieval.pyat refv0.1.0.adk-python reads the directory and builds the index inside
__init__. Both steps are asynchronous in LlamaIndexTS, so they live in the staticcreateinstead; the constructor takes the finished retriever, which also lets a caller supply one built some other way.Example