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

Class MockEnumTool

tests/test_tool_schema.py:108–134  ·  view source on GitHub ↗

Mock tool with enum parameter.

Source from the content-addressed store, hash-verified

106
107
108class MockEnumTool(Tool):
109 """Mock tool with enum parameter."""
110
111 @property
112 def name(self) -> str:
113 return "set_status"
114
115 @property
116 def description(self) -> str:
117 return "Set status"
118
119 @property
120 def parameters(self) -> dict[str, Any]:
121 return {
122 "type": "object",
123 "properties": {
124 "status": {
125 "type": "string",
126 "enum": ["active", "inactive", "pending"],
127 "description": "Status value",
128 }
129 },
130 "required": ["status"],
131 }
132
133 async def execute(self, **kwargs) -> ToolResult:
134 return ToolResult(success=True, content="Status set")
135
136
137def test_tool_to_schema():

Callers 1

test_tool_with_enumFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_tool_with_enumFunction · 0.68