Skip to main content
Glama

testmo_delete_case_attachments

Delete one or more attachments from a test case by specifying the case ID and attachment IDs.

Instructions

Delete one or more attachments from a test case.

Args: case_id: The test case ID. attachment_ids: Array of attachment IDs to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
case_idYes
attachment_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the delete case attachments tool. Sends a DELETE request to /cases/{case_id}/attachments with the list of attachment IDs.
    @mcp.tool()
    async def testmo_delete_case_attachments(
        case_id: int,
        attachment_ids: list[int],
    ) -> dict[str, Any]:
        """Delete one or more attachments from a test case.
    
        Args:
            case_id: The test case ID.
            attachment_ids: Array of attachment IDs to delete.
        """
        return await _request(
            "DELETE", f"/cases/{case_id}/attachments", data={"ids": attachment_ids}
        )
  • Registration of the tool via the @mcp.tool() decorator, which registers it with the FastMCP server.
    @mcp.tool()
  • The _request helper function used by the handler to perform the actual 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()
  • Parameter schema for the tool: case_id (int) and attachment_ids (list of ints).
        case_id: int,
        attachment_ids: list[int],
    ) -> dict[str, Any]:
  • testmo-mcp.py:16-23 (registration)
    The entry point that imports the attachments module, triggering registration of all attachment tools including testmo_delete_case_attachments.
    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")
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose that deletion is permanent, what happens if attachment IDs are invalid, or any side effects. The output schema exists but is not referenced to clarify return values.

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

Conciseness3/5

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

The description is short but includes a redundant Args section that repeats parameter names. It is not wasteful but could be more concise by integrating the parameter explanation into a single sentence. Front-loading is good but not optimal.

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?

Given the tool is a deletion operation with two required parameters and an output schema, the description lacks essential context: it does not confirm permanence, error handling, or return value. The output schema exists but its content is not hinted at, leaving the agent with gaps about what to expect.

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 merely restates parameter names and types from the schema (e.g., 'case_id: The test case ID'). It adds no additional meaning beyond the schema, which already provides titles and types. With 0% schema description coverage, the description fails to compensate.

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 'Delete one or more attachments from a test case.' The verb 'delete' and resource 'attachments from a test case' are specific and distinct from sibling tools like testmo_delete_case (deletes entire case) or testmo_upload_case_attachment (uploads).

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. There is no mention of prerequisites (e.g., case must exist, permissions needed) or when not to use it. Sibling tools like testmo_list_case_attachments or testmo_upload_case_attachments exist but no comparison is provided.

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