Skip to main content
Glama

testmo_list_cases

Retrieve test cases from a project or specific folder with pagination. Specify project ID, optional folder filter, and page parameters.

Instructions

List test cases in a project or folder. Supports pagination.

Args: project_id: The project ID. folder_id: Filter by folder ID (optional). page: Page number (default: 1). per_page: Results per page (default: 100). Valid: 25, 50, 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
folder_idNo
pageNo
per_pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for testmo_list_cases tool. Registered via @mcp.tool() decorator. Makes a GET request to /projects/{project_id}/cases with optional folder_id filter and pagination support (page, per_page).
    @mcp.tool()
    async def testmo_list_cases(
        project_id: int,
        folder_id: int | None = None,
        page: int = 1,
        per_page: int = 100,
    ) -> dict[str, Any]:
        """List test cases in a project or folder. Supports pagination.
    
        Args:
            project_id: The project ID.
            folder_id: Filter by folder ID (optional).
            page: Page number (default: 1).
            per_page: Results per page (default: 100). Valid: 25, 50, 100.
        """
        params: dict[str, Any] = {"page": page, "per_page": per_page}
        if folder_id is not None:
            params["folder_id"] = folder_id
        return await _request("GET", f"/projects/{project_id}/cases", params=params)
  • testmo/server.py:6-6 (registration)
    The mcp FastMCP instance ('testmo-mcp') used by the @mcp.tool() decorator to register testmo_list_cases.
    mcp = FastMCP("testmo-mcp")
  • testmo-mcp.py:14-14 (registration)
    Import of testmo.tools.cases module which triggers registration of testmo_list_cases via the @mcp.tool() decorator.
    import testmo.tools.cases  # noqa: F401
  • The _request helper function used by testmo_list_cases to make HTTP requests to the Testmo API.
    async def _request(
        method: str,
        endpoint: str,
        data: dict[str, Any] | None = None,
        params: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        async with _get_client() as client:
            response = await client.request(
                method=method,
                url=endpoint,
                json=data,
                params=params,
            )
            if response.status_code == 204:
                return {"success": True}
            if response.status_code >= 400:
                try:
                    error_body = response.json()
                except Exception:
                    error_body = response.text
                raise RuntimeError(
                    f"Testmo API error {response.status_code}: "
                    f"{json.dumps(error_body) if isinstance(error_body, dict) else error_body}"
                )
            return response.json()
  • Configuration constants (RATE_LIMIT_DELAY, MAX_CASES_PER_REQUEST) used by the cases module.
    import os
    from typing import Any
    
    TESTMO_URL = os.environ.get("TESTMO_URL", "").rstrip("/")
    TESTMO_API_KEY = os.environ.get("TESTMO_API_KEY", "")
    REQUEST_TIMEOUT = 30.0
    UPLOAD_TIMEOUT = 300.0
    RATE_LIMIT_DELAY = 0.5
    MAX_CASES_PER_REQUEST = 100
Behavior3/5

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

With no annotations, the description carries the full burden. It states it is a list (read) operation with pagination, but does not disclose any potential behavioral traits like rate limits, auth requirements, or side effects.

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 short and front-loaded. Every sentence is useful: specifies purpose, parameters, and pagination details. No redundant information.

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?

Given the tool's simplicity and presence of an output schema, the description is largely complete. It covers parameters and pagination. Minor gap: could mention that it returns a list of cases, but the output schema handles return structure.

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

Parameters5/5

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

Schema description coverage is 0%, but the description provides clear explanations for each parameter: project_id is required, folder_id is optional, page default 1, per_page default 100 with valid values (25, 50, 100). This adds significant value beyond the schema.

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?

The description clearly states the action (list), resource (test cases), and scope (in a project or folder). It distinguishes from siblings like testmo_get_all_cases by mentioning pagination and folder filtering.

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 usage for listing cases with pagination and optional folder filter, but does not provide guidance on when to use this tool versus alternatives like testmo_search_cases or testmo_get_cases_recursive.

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/strelec00/testmo-mcp'

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