clear_test_cases
Clear all test cases to reset the testing environment and start defining new regex pattern requirements.
Instructions
Clear all test cases to start fresh with new requirements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcpgex/server.py:262-271 (handler)The handler logic for the 'clear_test_cases' tool. It clears the global test_cases list and returns a message with the count of removed test cases.
elif name == "clear_test_cases": count = len(test_cases) test_cases.clear() return [ types.TextContent( type="text", text=f"Cleared all test cases. Removed {count} test case(s)." ) ] - src/mcpgex/server.py:83-91 (schema)The tool registration with name 'clear_test_cases', description, and input schema (no parameters required).
types.Tool( name="clear_test_cases", description="Clear all test cases to start fresh with new requirements.", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False } ) - src/mcpgex/server.py:74-92 (registration)The tool is registered as part of the list_tools handler via @server.list_tools() decorator (line 19). The entry for 'clear_test_cases' is defined at lines 83-91 within the tools list.
types.Tool( name="get_test_cases", description="Get all current test cases to see what requirements the regex pattern needs to satisfy.", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False } ), types.Tool( name="clear_test_cases", description="Clear all test cases to start fresh with new requirements.", inputSchema={ "type": "object", "properties": {}, "additionalProperties": False } ) ] - src/mcpgex/server.py:13-13 (helper)The global 'test_cases' list that the clear_test_cases tool operates on.
test_cases: List[Dict[str, Any]] = []