get_issue_labels
Retrieve all labels associated with a specific issue in a repository by providing the repository owner, repository name, and issue number. Facilitates issue management in AtomGit.
Instructions
Get all labels for an issue in a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_number | Yes | Issue number | |
| owner | Yes | Repository owner, typically referred to as 'username'. Case-insensitive. | |
| repo | Yes | Repository name. Case-insensitive. |
Implementation Reference
- operations/label.ts:122-133 (handler)The core handler function that performs a GET request to the AtomGit API to retrieve 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)Zod schema defining the input parameters for the get_issue_labels tool: owner, repo, and 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:188-191 (registration)Registration of the 'get_issue_labels' tool in the MCP server's tools list, 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 (registration)Dispatch handler in the CallToolRequest switch statement that parses arguments, calls the getIssueLabels function, and formats the response for MCP.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) }], }; }