Create GitHub issue
wopee_create_github_issueCreate a GitHub issue to report bugs, track test failures, or add action items from testing sessions.
Instructions
Create a new GitHub issue in the project's connected repository. Use this to report bugs found during testing, track test failures, or create action items from chat discussions. The issue will be created in the GitHub repository linked to the current project. Requires the project to have GitHub integration configured and WOPEE_PROJECT_UUID to be set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | The title of the GitHub issue | |
| body | Yes | The body/description of the GitHub issue (supports Markdown) | |
| labels | No | Optional labels to apply to the issue (e.g., ['bug', 'testing']) |
Implementation Reference
- The main handler definition for the 'wopee_create_github_issue' tool. It validates input via Zod schema, reads WOPEE_PROJECT_UUID from config, sends a GraphQL mutation (CreateGitHubIssue) via requestClient, and returns the created issue details (URL, number, title) or an error message.
export const wopeeCreateGithubIssue = { name: ToolName.WOPEE_CREATE_GITHUB_ISSUE, config: { title: "Create GitHub issue", description: "Create a new GitHub issue in the project's connected repository. Use this to report bugs found during testing, track test failures, or create action items from chat discussions. The issue will be created in the GitHub repository linked to the current project. Requires the project to have GitHub integration configured and WOPEE_PROJECT_UUID to be set.", inputSchema: InputSchema.shape, }, handler: async (input: Input) => { try { const { WOPEE_PROJECT_UUID } = getConfig(); if (!WOPEE_PROJECT_UUID) return { content: [ { type: "text" as const, text: "WOPEE_PROJECT_UUID is not set" }, ], }; const result = await requestClient<{ createGitHubIssue: { url: string; number: number; title: string; } | null; }>(CreateGitHubIssue, { projectUuid: WOPEE_PROJECT_UUID, title: input.title, body: input.body, labels: input.labels || [], }); if (!result?.createGitHubIssue) return { content: [ { type: "text" as const, text: "Failed to create GitHub issue. Make sure the project has GitHub integration configured.", }, ], }; return { content: [ { type: "text" as const, text: `GitHub issue created successfully:\n- Title: ${result.createGitHubIssue.title}\n- Number: #${result.createGitHubIssue.number}\n- URL: ${result.createGitHubIssue.url}`, }, ], }; } catch (error) { return _parseError(error); } }, }; - Zod input schema for the tool: requires 'title' (string) and 'body' (string with Markdown), with optional 'labels' (array of strings).
const InputSchema = z.object({ title: z.string().describe("The title of the GitHub issue"), body: z .string() .describe("The body/description of the GitHub issue (supports Markdown)"), labels: z .array(z.string()) .optional() .describe( "Optional labels to apply to the issue (e.g., ['bug', 'testing'])", ), }); - src/tools/shared/types.ts:15-15 (registration)Enum registration of the tool name 'WOPEE_CREATE_GITHUB_ISSUE' in the ToolName enum, mapping to the string 'wopee_create_github_issue'.
WOPEE_CREATE_GITHUB_ISSUE = "wopee_create_github_issue", - src/tools/index.ts:11-11 (registration)Import of wopeeCreateGithubIssue from its module directory.
import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js"; - src/tools/index.ts:27-27 (registration)Registration of wopeeCreateGithubIssue in the TOOLS array, making it available to the MCP server.
wopeeCreateGithubIssue,