MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / __call__

Method __call__

src/tool/default_tools/done.py:31–51  ·  view source on GitHub ↗

Indicate that the task has been completed. Args: reasoning (str): The reasoning of the task completion. Must be provided. result (str): The result of the task completion. Must be provided.

(self, 
                       reasoning: str,
                       result: str,
                       **kwargs)

Source from the content-addressed store, hash-verified

29 super().__init__(require_grad=require_grad, **kwargs)
30
31 async def __call__(self,
32 reasoning: str,
33 result: str,
34 **kwargs) -> ToolResponse:
35 """
36 Indicate that the task has been completed.
37
38 Args:
39 reasoning (str): The reasoning of the task completion. Must be provided.
40 result (str): The result of the task completion. Must be provided.
41 """
42 # Convert to string in case LLM returns non-string types
43 if reasoning is None or reasoning == "":
44 reasoning = "No reasoning provided"
45 else:
46 reasoning = str(reasoning)
47 if result is None or result == "":
48 result = "No result provided"
49 else:
50 result = str(result)
51 return ToolResponse(success=True, message=result, extra=ToolExtra(data={"reasoning": reasoning, "result": result}))

Callers

nothing calls this directly

Calls 2

ToolResponseClass · 0.90
ToolExtraClass · 0.90

Tested by

no test coverage detected