update-issue
Modify existing project issues by updating titles, descriptions, priorities, states, or assignees to keep project management current and organized.
Instructions
Update an existing issue in a project, delete just update the issue title with 'delete' or 'remove'
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ID of the project containing the issue | |
| issue_id | Yes | ID of the issue to update | |
| name | No | Updated title of the issue (optional) | |
| description_html | No | HTML description of the issue (required by Plane API) | |
| priority | No | Updated priority of the issue (optional) | |
| state_id | No | Updated state ID of the issue (optional) | |
| assignees | No | Updated array of user IDs to assign to this issue (optional) |
Implementation Reference
- src/index.ts:387-433 (handler)The main handler function for the 'update-issue' tool. It validates inputs, normalizes assignees array, and calls the Plane API with PATCH to update the issue.case "update-issue": { if ( !args || typeof args.project_id !== "string" || typeof args.issue_id !== "string" ) { throw new Error("Project ID and Issue ID are required"); } const { project_id, issue_id, ...updateData } = args; // Ensure assignees is properly formatted as an array if (updateData.assignees) { // Special case: detect if entire issue is nested in assignees if ( typeof updateData.assignees === "object" && !Array.isArray(updateData.assignees) && (updateData.assignees as Record<string, any>).project_id && (updateData.assignees as Record<string, any>).name ) { // Issue is nested inside assignees, remove it completely delete updateData.assignees; } else if (!Array.isArray(updateData.assignees)) { if (typeof updateData.assignees === "string") { // Convert single string to array updateData.assignees = [updateData.assignees]; } else if (typeof updateData.assignees === "object") { // Convert object to array of values updateData.assignees = Object.values(updateData.assignees); } else { // Remove invalid assignees delete updateData.assignees; } } } const updatedIssue = await callPlaneAPI( `/projects/${project_id}/issues/${issue_id}/`, "PATCH", updateData ); return { content: [ { type: "text", text: JSON.stringify(updatedIssue, null, 2) }, ], isError: false, }; }
- src/index.ts:146-189 (schema)Tool schema definition including name, description, and input schema for validating parameters like project_id, issue_id, name, etc.const UPDATE_ISSUE_TOOL: Tool = { name: "update-issue", description: "Update an existing issue in a project, delete just update the issue title with 'delete' or 'remove'", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "ID of the project containing the issue", }, issue_id: { type: "string", description: "ID of the issue to update", }, name: { type: "string", description: "Updated title of the issue (optional)", }, description_html: { type: "string", description: "HTML description of the issue (required by Plane API)", }, priority: { type: "string", description: "Updated priority of the issue (optional)", enum: ["urgent", "high", "medium", "low", "none"], }, state_id: { type: "string", description: "Updated state ID of the issue (optional)", }, assignees: { type: "array", items: { type: "string", }, description: "Updated array of user IDs to assign to this issue (optional)", }, }, required: ["project_id", "issue_id"], }, };
- src/index.ts:262-271 (registration)Registration of the 'update-issue' tool (as UPDATE_ISSUE_TOOL) in the list of available tools returned by the listTools handler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LIST_PROJECTS_TOOL, GET_PROJECT_TOOL, CREATE_ISSUE_TOOL, LIST_ISSUES_TOOL, GET_ISSUE_TOOL, UPDATE_ISSUE_TOOL, ], }));