Skip to main content
Glama

update_issue

Update an existing GitHub issue by modifying its title, description, state, labels, assignees, or milestone.

Instructions

Update an existing issue in a GitHub repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
issue_numberYesIssue number to update
titleNoNew title
bodyNoNew description
stateNoNew state
labelsNoNew labels
assigneesNoNew assignees
milestoneNoNew milestone number

Implementation Reference

  • The update_issue tool handler function. It takes owner, repo, issue_number, and optional fields (title, body, state, labels, assignees, milestone), calls octokit.rest.issues.update(), and returns a formatted response with the updated issue details.
    // Tool: Update Issue
    server.tool(
    	"update_issue",
    	"Update an existing issue in a GitHub repository.",
    	{
    		owner: z.string().describe("Repository owner"),
    		repo: z.string().describe("Repository name"),
    		issue_number: z.number().describe("Issue number to update"),
    		title: z.string().optional().describe("New title"),
    		body: z.string().optional().describe("New description"),
    		state: z.enum(["open", "closed"]).optional().describe("New state"),
    		labels: z.array(z.string()).optional().describe("New labels"),
    		assignees: z.array(z.string()).optional().describe("New assignees"),
    		milestone: z.number().optional().describe("New milestone number"),
    	},
    	async ({
    		owner,
    		repo,
    		issue_number,
    		title,
    		body,
    		state,
    		labels,
    		assignees,
    		milestone,
    	}) => {
    		try {
    			const response = await octokit.rest.issues.update({
    				owner,
    				repo,
    				issue_number,
    				title,
    				body,
    				state,
    				labels,
    				assignees,
    				milestone,
    			})
    			const i = response.data
    			let text = `Issue updated: **#${i.number}: ${i.title}**\n`
    			text += `URL: ${i.html_url}\n`
    			text += `State: ${i.state}\n`
    			text += `Updated: ${i.updated_at}\n`
    			return {
    				content: [{ type: "text", text }],
    			}
    		} catch (e: any) {
    			return {
    				content: [{ type: "text", text: `Error: ${e.message}` }],
    			}
    		}
    	},
    )
  • The registerIssueTools function exports the tool registration; it's called from src/index.ts with the server and octokit instances.
    export function registerIssueTools(server: McpServer, octokit: Octokit) {
  • src/index.ts:14-17 (registration)
    The central registration point that calls registerIssueTools to wire up all issue-related tools (including update_issue) to the MCP server.
    export function registerAllToolsAndResources(server: McpServer, octokit: Octokit): void {
    	registerSearchTools(server, octokit)
    	registerIssueTools(server, octokit)
    	registerRepositoryTools(server, octokit)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It does not disclose mutation semantics (e.g., overwrite vs. merge), authentication needs, rate limits, or side effects like notifications when closing an issue.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no fluff, but for a 9-parameter tool, slightly more context could be beneficial. Still, it is concise and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (9 parameters, no output schema, no annotations), the description is too sparse. It omits return value, error scenarios, and does not differentiate from sibling update tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers 100% of parameters with descriptions. The tool description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description 'Update an existing issue in a GitHub repository' clearly states the verb (update) and resource (existing issue), distinguishing it from sibling tools like get_issue or create_issue.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like update_pull_request or other issue-modifying tools. No context on prerequisites or conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/hithereiamaliff/mcp-github'

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