Skip to main content
Glama

update_issue

Modify GitHub repository issues by updating titles, descriptions, assignees, milestones, labels, and states. Simplify issue management with direct access to repository data.

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 GitHub API PATCH request to update the specified issue with the 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, } ); }
  • Zod schema defining the input parameters for the update_issue tool, including owner, repo, issue_number, and optional update fields like title, body, etc.
    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(), });
  • index.ts:128-132 (registration)
    Tool registration in the MCP server's listTools response, specifying the name, description, and input schema for 'update_issue'.
    { name: "update_issue", description: "Update an existing issue in a GitHub repository", inputSchema: zodToJsonSchema(issues.UpdateIssueOptionsSchema) },
  • Dispatch handler in the MCP server's CallToolRequest handler that parses arguments, extracts parameters, calls the updateIssue function, and formats the response.
    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) }], }; }

Other Tools

Related Tools

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/PhialsBasement/mcp-github-server-plus'

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