MCPcopy
hub / github.com/shareAI-lab/learn-claude-code / execute_tool

Function execute_tool

s13_background_tasks/code.py:336–341  ·  view source on GitHub ↗

Execute a tool call block, return output.

(block)

Source from the content-addressed store, hash-verified

334
335
336def execute_tool(block) -> str:
337 """Execute a tool call block, return output."""
338 handler = TOOL_HANDLERS.get(block.name)
339 if handler:
340 return handler(**block.input)
341 return f"Unknown tool: {block.name}"
342
343
344def start_background_task(block) -> str:

Callers 2

workerFunction · 0.70
agent_loopFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected