MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / ToolEvent

Class ToolEvent

src/tool_system/renderers.py:21–35  ·  view source on GitHub ↗

Discrete event observed by the agent loop while executing tools. ``kind`` is one of ``tool_use`` (model emitted a tool_use block), ``tool_result`` (tool returned successfully), or ``tool_error`` / ``tool_result`` with ``is_error=True`` (tool failed). The bridge layer maps these to U

Source from the content-addressed store, hash-verified

19
20@dataclass(frozen=True)
21class ToolEvent:
22 """Discrete event observed by the agent loop while executing tools.
23
24 ``kind`` is one of ``tool_use`` (model emitted a tool_use block),
25 ``tool_result`` (tool returned successfully), or ``tool_error`` /
26 ``tool_result`` with ``is_error=True`` (tool failed). The bridge
27 layer maps these to UI rendering or stream-json events.
28 """
29 kind: str
30 tool_name: str
31 tool_input: dict[str, Any] | None = None
32 tool_output: Any | None = None
33 tool_use_id: str | None = None
34 is_error: bool = False
35 error: str | None = None
36
37
38@dataclass(frozen=True)

Callers 1

run_query_as_agent_loopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected