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

Class MockSearchTool

tests/test_tool_schema.py:66–105  ·  view source on GitHub ↗

Mock search tool with complex schema.

Source from the content-addressed store, hash-verified

64
65
66class MockSearchTool(Tool):
67 """Mock search tool with complex schema."""
68
69 @property
70 def name(self) -> str:
71 return "search_database"
72
73 @property
74 def description(self) -> str:
75 return "Search the database"
76
77 @property
78 def parameters(self) -> dict[str, Any]:
79 return {
80 "type": "object",
81 "properties": {
82 "query": {
83 "type": "string",
84 "description": "Search query",
85 },
86 "filters": {
87 "type": "object",
88 "properties": {
89 "category": {"type": "string"},
90 "min_price": {"type": "number"},
91 "max_price": {"type": "number"},
92 },
93 },
94 "limit": {
95 "type": "integer",
96 "minimum": 1,
97 "maximum": 100,
98 "default": 10,
99 },
100 },
101 "required": ["query"],
102 }
103
104 async def execute(self, **kwargs) -> ToolResult:
105 return ToolResult(success=True, content="Search results")
106
107
108class MockEnumTool(Tool):

Callers 2

test_tool_schema_complexFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_tool_schema_complexFunction · 0.68