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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| case_id | Yes | ||
| data | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- testmo/tools/cases.py:183-206 (handler)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 - testmo/tools/cases.py:183-183 (registration)Decorator registration of testmo_update_case as an MCP tool on the FastMCP 'mcp' instance.
@mcp.tool() - testmo/client.py:25-49 (helper)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() - testmo/server.py:6-6 (helper)FastMCP server instance that provides the @mcp.tool() decorator used for tool registration.
mcp = FastMCP("testmo-mcp")