MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / Tool

Class Tool

backend/app/models/tool/tool.py:19–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class Tool(BaseModel):
20 tool_id: str = Field(
21 ...,
22 description="The tool ID.",
23 examples=["action_1"],
24 )
25
26 type: ToolType = Field(
27 ...,
28 description="The tool type, which can be `action`, `plugin` or `function`.",
29 examples=["action", "plugin", "function"],
30 )
31
32 function_def: Dict = Field(
33 ...,
34 description="The function definition for chat completion function-call.",
35 )
36
37 def function_name(self):
38 return self.function_def["name"]
39
40
41class ToolInput(BaseModel):

Callers 1

fetch_toolsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected