Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)."
            )
        ]
  • 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
        }
    )
  • 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
            }
        )
    ]
  • The global 'test_cases' list that the clear_test_cases tool operates on.
    test_cases: List[Dict[str, Any]] = []
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must convey behavioral traits. It states the destructive nature ('clear'), but does not mention side effects, recovery, or prerequisites. More detail would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that efficiently communicates the tool's purpose. No unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no parameters, no output schema, and a simple purpose, the description is nearly complete. It explains what the tool does and why. A minor improvement would be to mention the result (e.g., confirmation of clearing), but it is not required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters, so the baseline is 4. The description adds no further parameter information, which is acceptable given the tool's simplicity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the action ('Clear all test cases') and the resource ('test cases'), directly indicating the tool's purpose. It is unambiguously distinct from siblings (add, get, test).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a hint about usage ('to start fresh with new requirements'), but lacks explicit when-to-use, when-not-to-use, or alternatives. It assumes the agent understands the context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PatzEdi/MCPGex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server