MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / MockCalculatorTool

Class MockCalculatorTool

tests/test_tool_schema.py:38–63  ·  view source on GitHub ↗

Mock calculator tool for testing.

Source from the content-addressed store, hash-verified

36
37
38class MockCalculatorTool(Tool):
39 """Mock calculator tool for testing."""
40
41 @property
42 def name(self) -> str:
43 return "calculator"
44
45 @property
46 def description(self) -> str:
47 return "Perform calculations"
48
49 @property
50 def parameters(self) -> dict[str, Any]:
51 return {
52 "type": "object",
53 "properties": {
54 "expression": {
55 "type": "string",
56 "description": "Math expression",
57 },
58 },
59 "required": ["expression"],
60 }
61
62 async def execute(self, **kwargs) -> ToolResult:
63 return ToolResult(success=True, content="42")
64
65
66class MockSearchTool(Tool):

Callers 2

test_multiple_toolsFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_multiple_toolsFunction · 0.68