Skip to content

Commit 004aef0

Browse files
committed
add feedback
Signed-off-by: Vikram Vaswani <2571660+vvaswani@users.noreply.github.com>
1 parent 49f6240 commit 004aef0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/google/adk/tools/mcp_tool/mcp_tool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,14 @@ async def run_async(
151151
self, *, args: dict[str, Any], tool_context: ToolContext
152152
) -> Any:
153153
if isinstance(self._require_confirmation, Callable):
154-
args_to_call = args.copy()
154+
args_to_call = args
155155
try:
156156
signature = inspect.signature(self._require_confirmation)
157157
if "tool_context" in signature.parameters:
158+
args_to_call = args.copy()
158159
args_to_call["tool_context"] = tool_context
159160
except (TypeError, ValueError):
160-
args_to_call = args
161+
pass
161162
require_confirmation = await self._invoke_callable(
162163
self._require_confirmation, args_to_call
163164
)

0 commit comments

Comments
 (0)