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

Class SearchTool

examples/06_tool_schema_demo.py:58–88  ·  view source on GitHub ↗

Example search tool.

Source from the content-addressed store, hash-verified

56
57
58class SearchTool(Tool):
59 """Example search tool."""
60
61 @property
62 def name(self) -> str:
63 return "search_web"
64
65 @property
66 def description(self) -> str:
67 return "Search the web for information about a topic"
68
69 @property
70 def parameters(self) -> dict[str, Any]:
71 return {
72 "type": "object",
73 "properties": {
74 "query": {
75 "type": "string",
76 "description": "Search query string",
77 },
78 "max_results": {
79 "type": "integer",
80 "description": "Maximum number of results to return (1-10)",
81 },
82 },
83 "required": ["query"],
84 }
85
86 async def execute(self, **kwargs) -> ToolResult:
87 """Mock execute method."""
88 return ToolResult(success=True, content="Search results")
89
90
91class CalculatorTool(Tool):

Callers 1

demo_tool_schemasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected