Skip to main content
Glama

get_test_cases

Retrieve all current test cases to identify requirements your regex pattern must satisfy.

Instructions

Get all current test cases to see what requirements the regex pattern needs to satisfy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get_test_cases' tool with no input parameters, listing it as an available tool.
    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
        }
    ),
  • Handler implementation for 'get_test_cases'. Checks the global test_cases list; if empty returns a message saying no test cases exist, otherwise formats and returns all current test cases with input strings, expected matches, groups, and descriptions.
    elif name == "get_test_cases":
        if not test_cases:
            return [
                types.TextContent(
                    type="text",
                    text="No test cases defined yet. Use add_test_case to add requirements for your regex pattern."
                )
            ]
    
        result = ["Current test cases:"]
        result.append("=" * 40)
    
        for i, test_case in enumerate(test_cases, 1):
            result.append(f"Test case {i}:")
            result.append(f"  Input: '{test_case['input_string']}'")
            result.append(f"  Expected matches: {test_case['expected_matches']}")
            result.append(f"   Groups: '{test_case['groups']}'")
            if test_case.get("description"):
                result.append(f"  Description: {test_case['description']}")
            result.append("")
    
        result.append(f"Total: {len(test_cases)} test cases")
    
        return [
            types.TextContent(
                type="text",
                text="\n".join(result)
            )
        ]
  • Global storage of test cases (List[Dict[str,Any]]) that the get_test_cases handler reads from.
    # Global storage for test cases
    test_cases: List[Dict[str, Any]] = []
Behavior4/5

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

No annotations, but 'get all' clearly indicates a read-only operation. Could add more detail about side effects, but safe assumption.

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?

One sentence with no wasted words, clearly stating action and rationale.

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

Completeness5/5

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

With no parameters and no output schema, the description fully covers the tool's functionality and context.

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

Parameters3/5

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

No parameters, so schema coverage is 100%. Description adds no parameter info, meeting baseline.

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?

Clearly states 'Get all current test cases' and explains the purpose, distinguishing it from siblings like add_test_case, clear_test_cases, and test_regex.

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 implies use before testing or adding regex patterns, but lacks explicit when-to-use or when-not-to-use guidance.

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