Skip to main content
Glama

testmo_delete_folder

Delete a folder and all its test cases from a Testmo project. Provide project ID and folder ID to permanently remove the folder.

Instructions

Delete a folder from a project. WARNING: This also deletes all test cases in the folder.

Args: project_id: The project ID. folder_id: The folder ID to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
folder_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for testmo_delete_folder tool. It sends a DELETE request to the Testmo API to delete a folder (and all its test cases) by project_id and folder_id.
    @mcp.tool()
    async def testmo_delete_folder(project_id: int, folder_id: int) -> dict[str, Any]:
        """Delete a folder from a project. WARNING: This also deletes all test cases in the folder.
    
        Args:
            project_id: The project ID.
            folder_id: The folder ID to delete.
        """
        return await _request(
            "DELETE", f"/projects/{project_id}/folders", data={"ids": [folder_id]}
        )
  • The @mcp.tool() decorator registers testmo_delete_folder as an MCP tool on the FastMCP instance imported from testmo.server.
    @mcp.tool()
  • testmo-mcp.py:12-23 (registration)
    The tools.folders module (containing testmo_delete_folder) is imported in testmo-mcp.py, which triggers registration of all @mcp.tool() decorated functions.
    import testmo.tools.folders  # noqa: F401
    import testmo.tools.milestones  # noqa: F401
    import testmo.tools.cases  # noqa: F401
    import testmo.tools.runs  # noqa: F401
    import testmo.tools.attachments  # noqa: F401
    import testmo.tools.automation  # noqa: F401
    import testmo.tools.issues  # noqa: F401
    import testmo.tools.composite  # noqa: F401
    import testmo.tools.utility  # noqa: F401
    
    if __name__ == "__main__":
        mcp.run(transport="stdio")
  • The _request helper function used by testmo_delete_folder to execute the HTTP DELETE request 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()
  • Input schema documentation for the tool: expects project_id (int) and folder_id (int).
    Args:
        project_id: The project ID.
        folder_id: The folder ID to delete.
    """
Behavior4/5

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

Annotations are absent, so the description carries full burden. It discloses the key behavioral trait: cascading deletion of test cases. This is a high-value disclosure for a delete operation. However, it does not mention reversibility, permission requirements, or error handling, which would further enhance transparency.

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?

Two sentences: first states the action, second provides a critical warning. No wasted words, front-loaded, and efficient. Every sentence adds value.

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 simple delete tool with two integer parameters and an output schema present, the description covers the essential purpose and the most important side effect. It could mention that the action is irreversible or that dependent resources are destroyed, but overall it is sufficiently complete for the agent to use correctly.

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?

The description paraphrases the schema parameter titles ('project_id: The project ID', 'folder_id: The folder ID to delete') but adds no extra meaning beyond the schema's property names. With 0% schema coverage, the description should provide more detail, such as how to obtain these IDs or constraints on values.

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 verb 'delete', the resource 'folder', and includes a critical side-effect warning about cascading deletion of test cases. It effectively distinguishes from sibling tools like testmo_delete_case.

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 warning 'This also deletes all test cases in the folder' provides implicit guidance on when to use cautiously, but there is no explicit guidance on when to avoid this tool or alternatives (e.g., moving cases first). The description lacks direct comparative usage 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/strelec00/testmo-mcp'

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