get_issue_labels
Retrieve all labels associated with a specific issue in an AtomGit repository to categorize and organize project tasks.
Instructions
Get all labels for 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 |
Implementation Reference
- operations/label.ts:122-133 (handler)Core implementation of the get_issue_labels tool: makes a GET request to the AtomGit API to fetch labels for a specific issue.export async function getIssueLabels( owner: string, repo: string, issue_number: number ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues/${encodeURIComponent(issue_number)}/labels`, { method: "GET", } ); }
- operations/label.ts:25-29 (schema)Input schema validation using Zod for the get_issue_labels tool parameters: owner, repo, issue_number.export const GetIssueLabelsSchema = 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"), });
- index.ts:187-191 (registration)Tool registration in the MCP server's listTools response, specifying name, description, and input schema.{ name: "get_issue_labels", description: "Get all labels for an issue in a repository", inputSchema: zodToJsonSchema(label.GetIssueLabelsSchema), },
- index.ts:475-483 (handler)MCP server request handler that parses arguments, calls the getIssueLabels function, and formats the response.case "get_issue_labels": { const args = label.GetIssueLabelsSchema.parse(request.params.arguments); const { owner, repo, issue_number } = args; const result = await label.getIssueLabels(owner, repo, issue_number); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }