update_release
Modify an existing release by updating specific fields like name, description, dates, and status. Send only the fields you want to change.
Instructions
Modify an existing release. Send only the fields you want to change inside the updates object. Requires write permission. Fields: name, description, note, type, startDate, endDate, isStarted, isCompleted, startedAt, completedAt, linkedIssues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (required). | |
| releaseId | Yes | Internal _id or counter-style ID (required). | |
| updates | Yes | Fields to update: name, description, note, type, startDate, endDate, isStarted, isCompleted, startedAt, completedAt, linkedIssues. |
Implementation Reference
- Main handler function for the update_release tool. Validates inputs (projectId, releaseId, updates), constructs the PATCH request URL using endpoints, calls the API with apiRequestJson, and returns the response.
export async function handleUpdateRelease(args?: UpdateReleaseArgs) { 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?.releaseId) throw new Error("releaseId 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.updateRelease( String(args.projectId), String(args.releaseId) ); 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 release: ${msg}`); } } - Type definition (UpdateReleaseArgs) and tool registration object (updateReleaseTool) with input schema defining required fields: projectId, releaseId, and updates object.
interface UpdateReleaseArgs { projectId: string; releaseId: string; updates: Record<string, unknown>; } export const updateReleaseTool = { name: "update_release", description: "Modify an existing release. Send only the fields you want to change inside the `updates` object. Requires write permission. Fields: name, description, note, type, startDate, endDate, isStarted, isCompleted, startedAt, completedAt, linkedIssues.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (required)." }, releaseId: { type: "string", description: "Internal _id or counter-style ID (required).", }, updates: { type: "object", description: "Fields to update: name, description, note, type, startDate, endDate, isStarted, isCompleted, startedAt, completedAt, linkedIssues.", }, }, required: ["projectId", "releaseId", "updates"], }, }; - src/index.ts:289-293 (registration)Registration in the main server handler: routes the tool call name 'update_release' to the handleUpdateRelease function.
if (name === "update_release") { return await handleUpdateRelease( args as Parameters<typeof handleUpdateRelease>[0] ); } - src/index.ts:117-130 (registration)Tool is listed in the tools array (line 117) which is registered via ListToolsRequestSchema (line 135-137).
updateReleaseTool, // Manual runs listManualRunsTool, getManualRunTool, createManualRunTool, updateManualRunTool, listRunTestCasesTool, updateRunTestCaseTool, // Sessions listSessionsTool, getSessionTool, createSessionTool, updateSessionTool, ]; - src/lib/endpoints.ts:373-376 (helper)Endpoint URL builder: constructs the PATCH URL for updating a release at /api/mcp/releases/:projectId/:releaseId.
updateRelease: (projectId: string, releaseId: string): string => { const baseUrl = getBaseUrl(); return `${baseUrl}/api/mcp/releases/${projectId}/${releaseId}`; },