update_manual_run
Modify an existing manual test run by sending updated fields. Supports name, note, tags, and more while keeping closed runs read-only except for release assignment.
Instructions
Modify an existing manual test run. Send only the fields you want to change inside the updates object. Requires write permission. Allowed fields: name, note, environment, releaseId, state, forecast, tags, linkedIssues, attachments, links, selectionMode. Closed runs are read-only except for releaseId (so a run can be re-attached to a different release). IMPORTANT: updates.tags must be a JSON array of strings — e.g. ["smoke","regression"] — NOT a comma-separated string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (required). | |
| runId | Yes | Internal _id or counter-style ID (required). | |
| updates | Yes | Fields to update: name, note, environment, releaseId, state, forecast, tags, linkedIssues, attachments, links, selectionMode. |
Implementation Reference
- The handler function for the update_manual_run tool. It validates arguments (projectId, runId, updates), builds the endpoint URL, sends a PATCH request with the updates, and returns the response.
export async function handleUpdateManualRun(args?: UpdateManualRunArgs) { const token = getApiKey(args); if (!token) { throw new Error( "Missing TESTDINO_PAT environment variable. Configure it in your .cursor/mcp.json under 'env'." ); } if (!args?.projectId) throw new Error("projectId is required"); if (!args?.runId) throw new Error("runId is required"); if (!args?.updates || typeof args.updates !== "object") { throw new Error("updates must be an object containing fields to modify"); } try { const url = endpoints.updateManualRun( String(args.projectId), String(args.runId) ); const response = await apiRequestJson<unknown>(url, { method: "PATCH", headers: { Authorization: `Bearer ${token}` }, body: { updates: args.updates }, }); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); throw new Error(`Failed to update manual run: ${msg}`); } } - The tool definition (updateManualRunTool) with name 'update_manual_run', description, and inputSchema (projectId, runId, updates). Also includes the UpdateManualRunArgs interface (lines 9-13).
export const updateManualRunTool = { name: "update_manual_run", description: 'Modify an existing manual test run. Send only the fields you want to change inside the `updates` object. Requires write permission. Allowed fields: name, note, environment, releaseId, state, forecast, tags, linkedIssues, attachments, links, selectionMode. Closed runs are read-only except for releaseId (so a run can be re-attached to a different release). IMPORTANT: updates.tags must be a JSON array of strings — e.g. ["smoke","regression"] — NOT a comma-separated string.', inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (required)." }, runId: { type: "string", description: "Internal _id or counter-style ID (required).", }, updates: { type: "object", description: "Fields to update: name, note, environment, releaseId, state, forecast, tags, linkedIssues, attachments, links, selectionMode.", }, }, required: ["projectId", "runId", "updates"], }, }; - src/index.ts:61-62 (registration)Import of updateManualRunTool and handleUpdateManualRun from tools index.
updateManualRunTool, handleUpdateManualRun, - src/index.ts:122-122 (registration)Tool registration in the tools array passed to server.setToolHandler.
updateManualRunTool, - src/index.ts:311-315 (registration)Routing logic: when tool name is 'update_manual_run', it calls handleUpdateManualRun with the provided args.
if (name === "update_manual_run") { return await handleUpdateManualRun( args as Parameters<typeof handleUpdateManualRun>[0] ); }