Skip to main content
Glama

update_issue

Modify an existing GitHub issue by updating its title, body, assignees, milestone, labels, or state using the MCP server for enhanced repository management.

Instructions

Update an existing issue in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNo
bodyNo
issue_numberYes
labelsNo
milestoneNo
ownerYes
repoYes
stateNo
titleNo

Implementation Reference

  • The core handler function that executes the tool logic by sending a PATCH request to the GitHub Issues API to update the specified issue.
    export async function updateIssue( github_pat: string, owner: string, repo: string, issue_number: number, options: Omit<z.infer<typeof UpdateIssueOptionsSchema>, "owner" | "repo" | "issue_number"> ) { return githubRequest( github_pat, `https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}`, { method: "PATCH", body: options, } ); }
  • Zod schema defining the input parameters for the update_issue tool, used to generate JSON schema and for validation.
    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(), });
  • src/index.ts:133-137 (registration)
    Registration of the update_issue tool in the ListToolsRequestHandler, providing name, description, and input schema.
    { name: "update_issue", description: "Update an existing issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.UpdateIssueOptionsSchema) },
  • src/index.ts:491-498 (registration)
    Dispatch logic in CallToolRequestHandler that validates arguments with the extended schema and delegates to the updateIssue handler.
    case "update_issue": { const argsWithPat = issues._UpdateIssueOptionsSchema.parse(params.arguments); const { github_pat, owner, repo, issue_number, ...options } = argsWithPat; const result = await issues.updateIssue(github_pat, owner, repo, issue_number, options); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MissionSquad/mcp-github'

If you have feedback or need assistance with the MCP directory API, please join our Discord server