MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / before_execution

Method before_execution

helpers/mcp_handler.py:425–440  ·  view source on GitHub ↗
(self, **kwargs: Any)

Source from the content-addressed store, hash-verified

423 return Response(message=message, break_loop=False, additional=additional)
424
425 async def before_execution(self, **kwargs: Any):
426 (
427 PrintStyle(
428 font_color="#1B4F72", padding=True, background_color="white", bold=True
429 ).print(f"{self.agent.agent_name}: Using tool '{self.name}'")
430 )
431 self.log = self.get_log_object()
432
433 for key, value in self.args.items():
434 PrintStyle(font_color="#85C1E9", bold=True).stream(
435 self.nice_key(key) + ": "
436 )
437 PrintStyle(
438 font_color="#85C1E9", padding=isinstance(value, str) and "\n" in value
439 ).stream(value)
440 PrintStyle().print()
441
442 async def after_execution(self, response: Response, **kwargs: Any):
443 final_text_for_agent = self._raw_tool_response(response)

Callers

nothing calls this directly

Calls 5

get_log_objectMethod · 0.95
PrintStyleClass · 0.90
printMethod · 0.45
streamMethod · 0.45
nice_keyMethod · 0.45

Tested by

no test coverage detected