Skip to main content
Glama
Sunwood-ai-labs

GitHub Kanban MCP Server

update_issue

Update an existing GitHub issue's title, body, state, labels, assignees, or emoji with new values using the repository path and issue number. Enables modifying issue details for Kanban workflow management.

Instructions

既存のissueを更新します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoGitリポジトリの絶対パス
issue_numberYesissue番号
titleNo新しいタイトル
emojiNoタイトルの先頭に付与する絵文字
bodyNo新しい本文
stateNo新しい状態
labelsNo新しいラベル
assigneesNo新しいアサイン

Implementation Reference

  • The main handler function for update_issue. Uses `gh issue edit` and `gh issue close/reopen` to update an existing GitHub issue. Handles title (with optional emoji), body, labels, assignees, and state changes.
    export async function handleUpdateIssue(args: UpdateIssueArgs): Promise<ToolResponse> {
      const { owner, repo } = await getRepoInfo(args);
      // タイトルが更新される場合は絵文字を付与(指定がある場合)
      const titleFlag = args.title ? `--title "${args.emoji ? `${args.emoji} ${args.title}` : args.title}"` : '';
      const labelsFlag = args.labels?.length ? `--add-label ${args.labels.join(',')}` : '';
      const assigneesFlag = args.assignees?.length ? `--add-assignee ${args.assignees.join(',')}` : '';
    
      const tempFile = 'update_body.md';
      let bodyFlag = '';
    
      try {
        // 状態の更新を処理
        if (args.state) {
          const command = args.state === 'closed' ? 'close' : 'reopen';
          await execAsync(
            `gh issue ${command} ${args.issue_number} --repo ${owner}/${repo}`
          );
        }
    
        // その他の更新を処理
        if (args.title || args.body || args.labels?.length || args.assignees?.length) {
          if (args.body) {
            const fullPath = await writeToTempFile(args.body, tempFile);
            bodyFlag = `--body-file "${fullPath}"`;
          }
    
          await execAsync(
            `gh issue edit ${args.issue_number} --repo ${owner}/${repo} ${titleFlag} ${bodyFlag} ${labelsFlag} ${assigneesFlag}`
          );
        }
    
        const { stdout: issueData } = await execAsync(
          `gh issue view ${args.issue_number} --repo ${owner}/${repo} --json number,title,state,url`
        );
    
        return {
          content: [
            {
              type: 'text',
              text: issueData,
            },
          ],
        };
      } finally {
        if (args.body) {
          await removeTempFile(tempFile);
        }
      }
    }
  • JSON Schema definition for update_issue input. Defines fields: path, issue_number (required), title, emoji, body, state (open/closed), labels, assignees.
    export const updateIssueSchema = {
      type: 'object',
      properties: {
        path: {
          type: 'string',
          description: 'Gitリポジトリの絶対パス',
        },
        issue_number: {
          type: 'number',
          description: 'issue番号',
        },
        title: {
          type: 'string',
          description: '新しいタイトル',
        },
        emoji: {
          type: 'string',
          description: 'タイトルの先頭に付与する絵文字',
        },
        body: {
          type: 'string',
          description: '新しい本文',
        },
        state: {
          type: 'string',
          enum: ['open', 'closed'],
          description: '新しい状態',
        },
        labels: {
          type: 'array',
          items: {
            type: 'string',
          },
          description: '新しいラベル',
        },
        assignees: {
          type: 'array',
          items: {
            type: 'string',
          },
          description: '新しいアサイン',
        },
      },
      required: ['issue_number'],
    };
  • src/server.ts:51-55 (registration)
    Registration of the 'update_issue' tool in the ListToolsRequestSchema handler, with its description and inputSchema reference.
    {
      name: 'update_issue',
      description: '既存のissueを更新します',
      inputSchema: updateIssueSchema,
    },
  • TypeScript interface UpdateIssueArgs used as the parameter type for handleUpdateIssue.
    export interface UpdateIssueArgs {
      path: string;  // Gitリポジトリの絶対パス
      issue_number: number;
      title?: string;
      emoji?: string;
      body?: string;
      state?: 'open' | 'closed';
      labels?: string[];
      assignees?: string[];
    }
  • Routing logic in handleToolRequest that maps 'update_issue' tool name to handleUpdateIssue, extracting and casting arguments.
    case 'update_issue': {
      if (!args?.issue_number) {
        throw new McpError(ErrorCode.InvalidParams, 'Issue number is required');
      }
      return await handleUpdateIssue({
        path: args.path as string,
        issue_number: Number(args.issue_number),
        title: args?.title as string | undefined,
        emoji: args?.emoji as string | undefined,
        body: args?.body as string | undefined,
        state: args?.state as 'open' | 'closed' | undefined,
        labels: args?.labels as string[] | undefined,
        assignees: args?.assignees as string[] | undefined,
      });
    }
Behavior2/5

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

No annotations provided, and the description offers no behavioral details such as whether fields are overwritten or merged, idempotency, or required permissions.

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

Conciseness2/5

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

Single sentence but under-specified for a tool with 8 parameters; lacks necessary detail.

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

Completeness1/5

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

Given the complexity (8 parameters, no output schema, no annotations), the description is completely inadequate, failing to explain update semantics or return behavior.

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?

Schema coverage is 100% with descriptions for all 8 parameters, so the description adds no further value; baseline 3 applies.

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

Purpose2/5

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

Description is a tautology: '既存のissueを更新します' simply restates the tool name without specifying what aspects can be updated or any unique behavior.

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 siblings (add_comment, create_issue, list_issues). No mention of prerequisites or context.

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/Sunwood-ai-labs/github-kanban-mcp-server'

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