MCPcopy Create free account
hub / github.com/google/adk-python / run_async

Method run_async

src/google/adk/tools/base_tool.py:122–139  ·  view source on GitHub ↗

Runs the tool with the given arguments and context. NOTE: - Required if this tool needs to run at the client side. - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for Gemini. Args: args: The LLM-filled arguments. tool_context: The context

(
      self, *, args: dict[str, Any], tool_context: ToolContext
  )

Source from the content-addressed store, hash-verified

120 return None
121
122 async def run_async(
123 self, *, args: dict[str, Any], tool_context: ToolContext
124 ) -> Any:
125 """Runs the tool with the given arguments and context.
126
127 NOTE:
128 - Required if this tool needs to run at the client side.
129 - Otherwise, can be skipped, e.g. for a built-in GoogleSearch tool for
130 Gemini.
131
132 Args:
133 args: The LLM-filled arguments.
134 tool_context: The context of the tool.
135
136 Returns:
137 The result of running the tool.
138 """
139 raise NotImplementedError(f"{type(self)} is not implemented")
140
141 async def process_llm_request(
142 self, *, tool_context: ToolContext, llm_request: LlmRequest

Callers 9

run_and_printFunction · 0.45
execute_queryFunction · 0.45
_run_agentMethod · 0.45
workerMethod · 0.45
event_generatorMethod · 0.45
before_tool_callbackMethod · 0.45
run_llm_agent_as_nodeFunction · 0.45
_run_implMethod · 0.45

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected