update_issue
Modify existing GitHub issues by updating titles, descriptions, assignees, labels, milestones, or status to track project progress and manage repository tasks.
Instructions
Update an existing issue in a GitHub repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| repo | Yes | ||
| issue_number | Yes | ||
| title | No | ||
| body | No | ||
| assignees | No | ||
| milestone | No | ||
| labels | No | ||
| state | No |
Implementation Reference
- index.ts:317-324 (handler)MCP tool handler for 'update_issue': parses input schema, extracts parameters, calls the updateIssue helper, and returns the result as JSON.case "update_issue": { const args = issues.UpdateIssueOptionsSchema.parse(request.params.arguments); const { owner, repo, issue_number, ...options } = args; const result = await issues.updateIssue(owner, repo, issue_number, options); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- index.ts:128-132 (registration)Registration of the 'update_issue' tool in the MCP server's tool list, including name, description, and input schema.{ name: "update_issue", description: "Update an existing issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.UpdateIssueOptionsSchema) },
- operations/issues.ts:43-53 (schema)Zod schema defining the input structure for the 'update_issue' tool, including owner, repo, issue_number, and optional update fields.export const UpdateIssueOptionsSchema = z.object({ owner: z.string(), repo: z.string(), issue_number: z.number(), title: z.string().optional(), body: z.string().optional(), assignees: z.array(z.string()).optional(), milestone: z.number().optional(), labels: z.array(z.string()).optional(), state: z.enum(["open", "closed"]).optional(), });
- operations/issues.ts:105-118 (helper)Helper function that executes the GitHub API PATCH request to update the specified issue with provided options.export async function updateIssue( owner: string, repo: string, issue_number: number, options: Omit<z.infer<typeof UpdateIssueOptionsSchema>, "owner" | "repo" | "issue_number"> ) { return githubRequest( `https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}`, { method: "PATCH", body: options, } ); }