create_issue_labels
Add labels to issues in AtomGit repositories to organize, categorize, and prioritize tasks for better project management.
Instructions
Add labels to an issue in a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner, typically referred to as 'username'. Case-insensitive. | |
| repo | Yes | Repository name. Case-insensitive. | |
| issue_number | Yes | Issue number | |
| labels | Yes | Array of label names |
Implementation Reference
- operations/label.ts:101-114 (handler)The main handler function that sends a POST request to the AtomGit API to add labels to a specific issue.export async function createIssueLabels( owner: string, repo: string, issue_number: number, labels: string[] ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues/${encodeURIComponent(issue_number)}/labels`, { method: "POST", body: labels, } ); }
- operations/label.ts:18-23 (schema)Zod schema defining the input parameters for the create_issue_labels tool.export const CreateIssueLabelsSchema = z.object({ owner: z.string().describe("Repository owner, typically referred to as 'username'. Case-insensitive."), repo: z.string().describe("Repository name. Case-insensitive."), issue_number: z.number().describe("Issue number"), labels: z.array(z.string()).describe("Array of label names"), });
- index.ts:183-186 (registration)Tool registration in the MCP server's list of tools, including name, description, and input schema.name: "create_issue_labels", description: "Add labels to an issue in a repository", inputSchema: zodToJsonSchema(label.CreateIssueLabelsSchema), },
- index.ts:465-473 (registration)Dispatcher case in the CallToolRequestHandler that parses arguments and calls the createIssueLabels handler.case "create_issue_labels": { const args = label.CreateIssueLabelsSchema.parse(request.params.arguments); const { owner, repo, issue_number, labels } = args; const result = await label.createIssueLabels(owner, repo, issue_number, labels); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }