Skip to main content
Glama

testmo_update_case

Update an existing test case by providing only the fields and issue links you want to change.

Instructions

Update an existing test case. Only include fields you want to change.

Issue Linking: Use issues array with objects like {"display_id": "PROJ-123", "integration_id": 1, "connection_project_id": "org/repo"}. Use testmo_list_issue_connections to discover integration_id values.

Args: project_id: The project ID. case_id: The test case ID to update. data: Fields to update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
case_idYes
dataYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for testmo_update_case tool. Takes project_id, case_id, and data dict, sends PATCH request to update a single case.
    @mcp.tool()
    async def testmo_update_case(
        project_id: int,
        case_id: int,
        data: dict[str, Any],
    ) -> dict[str, Any]:
        """Update an existing test case. Only include fields you want to change.
    
        Issue Linking: Use issues array with objects like
        {"display_id": "PROJ-123", "integration_id": 1, "connection_project_id": "org/repo"}.
        Use testmo_list_issue_connections to discover integration_id values.
    
        Args:
            project_id: The project ID.
            case_id: The test case ID to update.
            data: Fields to update.
        """
        payload: dict[str, Any] = {"ids": [case_id]}
        payload.update(data)
        result = await _request("PATCH", f"/projects/{project_id}/cases", data=payload)
        cases = result.get("result", result)
        if isinstance(cases, list) and len(cases) == 1:
            return cases[0]
        return cases
  • Decorator registration of testmo_update_case as an MCP tool on the FastMCP 'mcp' instance.
    @mcp.tool()
  • HTTP request helper used by testmo_update_case to make the PATCH call 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()
  • FastMCP server instance that provides the @mcp.tool() decorator used for tool registration.
    mcp = FastMCP("testmo-mcp")
Behavior2/5

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

With no annotations, the description carries full burden. It describes the update action but lacks details on idempotency, concurrency, error handling, or required permissions. The issue linking format is explained, but overall behavioral traits are insufficiently disclosed.

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 brief and front-loaded with the core purpose. It then adds a critical note on partial updates and issue linking, followed by a clear list of arguments. Every sentence adds value.

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

Completeness3/5

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

Given the presence of an output schema, return values need not be explained. However, the description omits error conditions, validation rules, and prerequisites. It adequately covers the issue linking aspect but could be more complete for a mutation tool with no annotations.

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

Parameters4/5

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

Schema coverage is 0%, so description must compensate. It explains the 'data' parameter as fields to update and provides a detailed example for issue linking. The 'project_id' and 'case_id' are not elaborated but are self-explanatory.

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 it updates an existing test case, which distinguishes it from create and delete siblings. Also mentions the partial update behavior (only include fields to change).

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?

Provides some context by mentioning issue linking and referencing testmo_list_issue_connections for discovering integration_id, but does not explicitly state when to use this tool versus alternatives like testmo_batch_update_cases or testmo_create_case.

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