Skip to main content
Glama
Sunwood-ai-labs

GitHub Kanban MCP Server

create_issue

Create a new GitHub issue with title, body, emoji, labels, and assignees to add tasks to a Kanban board for automated task management.

Instructions

新しいissueを作成します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoGitリポジトリの絶対パス
titleYesissueのタイトル
emojiNoタイトルの先頭に付与するユニークな絵文字
bodyNoissueの本文(## の先頭には絵文字を付与して可読性を上げて)
labelsNoissueのラベル
assigneesNoアサインするユーザー

Implementation Reference

  • The main handler function for 'create_issue'. Uses `gh issue create` CLI command with title, body (written to temp file), labels, assignees, and optional emoji prefix. Also ensures labels exist before creating the issue.
    export async function handleCreateIssue(args: CreateIssueArgs): Promise<ToolResponse> {
      const { owner, repo } = await getRepoInfo(args);
      const assigneesFlag = args.assignees?.length ? `--assignee ${args.assignees.join(',')}` : '';
      const tempFile = 'issue_body.md';
      let bodyFlag = '';
    
      try {
        // ラベルの存在確認と作成
        if (args.labels?.length) {
          const existingLabels = await getExistingLabels(args.path);
          for (const label of args.labels) {
            if (!existingLabels.includes(label)) {
              await createLabel(args.path, label);
            }
          }
        }
        const labelsFlag = args.labels?.length ? `--label ${args.labels.join(',')}` : '';
    
        if (args.body) {
          const fullPath = await writeToTempFile(args.body, tempFile);
          bodyFlag = `--body-file "${fullPath}"`;
        }
    
        // タイトルに絵文字を付与(指定がある場合)
        const titleWithEmoji = args.emoji ? `${args.emoji} ${args.title}` : args.title;
    
        const { stdout } = await execAsync(
          `gh issue create --repo ${owner}/${repo} --title "${titleWithEmoji}" ${bodyFlag} ${labelsFlag} ${assigneesFlag}`
        );
    
        // URLから issue number を抽出
        const issueUrl = stdout.trim();
        const issueNumber = issueUrl.split('/').pop();
    
        // 作成したissueの詳細情報を取得
        const { stdout: issueData } = await execAsync(
          `gh issue view ${issueNumber} --repo ${owner}/${repo} --json number,title,url`
        );
    
        return {
          content: [
            {
              type: 'text',
              text: issueData,
            },
          ],
        };
      } finally {
        if (args.body) {
          await removeTempFile(tempFile);
        }
      }
    }
  • Input schema for 'create_issue' defining properties: path (repo absolute path), title (required), emoji, body, labels, and assignees.
    export const createIssueSchema = {
      type: 'object',
      properties: {
        path: {
          type: 'string',
          description: 'Gitリポジトリの絶対パス',
        },
        title: {
          type: 'string',
          description: 'issueのタイトル',
        },
        emoji: {
          type: 'string',
          description: 'タイトルの先頭に付与するユニークな絵文字',
        },
        body: {
          type: 'string',
          description: 'issueの本文(## の先頭には絵文字を付与して可読性を上げて)',
        },
        labels: {
          type: 'array',
          items: {
            type: 'string',
          },
          description: 'issueのラベル',
        },
        assignees: {
          type: 'array',
          items: {
            type: 'string',
          },
          description: 'アサインするユーザー',
        }
      },
      required: ['title'],
    };
  • src/server.ts:46-50 (registration)
    Registration of the 'create_issue' tool in the server's ListToolsRequestSchema handler, with its description and inputSchema.
    {
      name: 'create_issue',
      description: '新しいissueを作成します',
      inputSchema: createIssueSchema,
    },
  • Dispatch case in handleToolRequest that validates title presence and calls handleCreateIssue with parsed arguments.
    case 'create_issue': {
      if (!args?.title) {
        throw new McpError(ErrorCode.InvalidParams, 'Title is required');
      }
      return await handleCreateIssue({
        path: args.path as string,
        title: args.title as string,
        emoji: args?.emoji as string | undefined,
        body: args?.body as string | undefined,
        labels: args?.labels as string[] | undefined,
        assignees: args?.assignees as string[] | undefined,
      });
    }
  • TypeScript interface `CreateIssueArgs` defining the shape of arguments for the create_issue handler.
    export interface CreateIssueArgs {
      path: string;  // Gitリポジトリの絶対パス
      title: string;
      emoji?: string;
      body?: string;
      labels?: string[];
      assignees?: string[];
    }
Behavior1/5

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

No annotations provided and description gives no behavioral details (e.g., permissions, side effects, return value).

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 is concise and direct. Could include more context but no unnecessary words.

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?

No output schema and description omits return type, success/error behavior, or any important constraints beyond the schema.

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%, so parameter descriptions exist. The tool description adds no extra meaning beyond what the schema already provides.

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?

The description '新しいissueを作成します' clearly states it creates a new issue. This distinguishes it from siblings (add_comment, list_issues, update_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 vs alternatives. Does not mention any 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