Skip to main content
Glama

testmo_delete_case

Delete a test case by specifying the project ID and case ID to remove it from your Testmo project.

Instructions

Delete a test case.

Args: project_id: The project ID. case_id: The test case ID to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
case_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'testmo_delete_case' tool. It calls the Testmo API with a DELETE request to /projects/{project_id}/cases with the case_id wrapped in an 'ids' array.
    @mcp.tool()
    async def testmo_delete_case(project_id: int, case_id: int) -> dict[str, Any]:
        """Delete a test case.
    
        Args:
            project_id: The project ID.
            case_id: The test case ID to delete.
        """
        return await _request(
            "DELETE", f"/projects/{project_id}/cases", data={"ids": [case_id]}
        )
  • Imports for the handler: mcp from server, _request from client, and configuration constants.
    import asyncio
    from typing import Any
    
    from ..server import mcp
    from ..client import _request
    from ..config import RATE_LIMIT_DELAY, MAX_CASES_PER_REQUEST
  • testmo/server.py:1-6 (registration)
    The mcp instance is created here via FastMCP and is used as the decorator @mcp.tool() to register the tool.
    from dotenv import load_dotenv
    from mcp.server.fastmcp import FastMCP
    
    load_dotenv()
    
    mcp = FastMCP("testmo-mcp")
  • testmo-mcp.py:14-14 (registration)
    Entry point that imports testmo.tools.cases, which triggers registration of the testmo_delete_case tool on the mcp instance.
    import testmo.tools.cases  # noqa: F401
  • The _request helper function that executes the HTTP DELETE request to the Testmo API endpoint.
    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()
Behavior2/5

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

With no annotations, description must disclose behaviors but only states 'Delete a test case.' No mention of irreversibility, permissions, or effects on related data like attachments or test runs.

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

Conciseness4/5

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

Very concise, one-line verb plus structured args list. No redundant information, but could be more efficiently front-loaded with essential context.

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

Completeness2/5

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

Output schema exists but description doesn't explain outcome of deletion (e.g., success response). With 0% param documentation and no annotations, the tool is under-described for safe use.

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

Parameters2/5

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

Schema description coverage is 0%, but description merely repeats param names without adding meaning, validation, or examples beyond what the schema provides.

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 'Delete a test case' with specific verb and resource, distinguishing it from sibling tools like testmo_update_case and testmo_create_case.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives, such as testmo_batch_delete_cases. Lacks prerequisites or scenarios where deletion is appropriate.

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