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

Function _run_tool

tests/test_esc_reject_message_dispatch.py:46–57  ·  view source on GitHub ↗
(ctx: ToolContext, tool, name: str, input_: dict, tid: str)

Source from the content-addressed store, hash-verified

44
45
46def _run_tool(ctx: ToolContext, tool, name: str, input_: dict, tid: str):
47 block = ToolUseBlock(id=tid, name=name, input=input_)
48
49 async def drive():
50 updates = []
51 async for u in run_tool_use(
52 block, AssistantMessage(content="t"), _allow, ctx
53 ):
54 updates.append(u)
55 return updates
56
57 return asyncio.run(drive())
58
59
60def _extract_tool_result(updates: list) -> Any:

Calls 3

ToolUseBlockClass · 0.90
driveFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected