get_repository_labels
Retrieve all labels from an AtomGit repository to organize issues and pull requests. Specify the repository owner and name to access label data.
Instructions
Get all labels 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. |
Implementation Reference
- operations/label.ts:82-92 (handler)Core handler function that makes the AtomGit API request to fetch all labels for the specified repository.export async function getLabels( owner: string, repo: string ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/labels`, { method: "GET", } ); }
- operations/label.ts:13-16 (schema)Zod schema defining the input parameters for the get_repository_labels tool: owner and repo.export const GetLabelsSchema = z.object({ owner: z.string().describe("Repository owner, typically referred to as 'username'. Case-insensitive."), repo: z.string().describe("Repository name. Case-insensitive."), });
- index.ts:177-181 (registration)Registration of the get_repository_labels tool in the MCP server's tool list, including schema reference.{ name: "get_repository_labels", description: "Get all labels in a repository", inputSchema: zodToJsonSchema(label.GetLabelsSchema), },
- index.ts:455-463 (handler)Dispatcher case in the CallToolRequestHandler that parses arguments, calls the core getLabels function, and formats the response.case "get_repository_labels": { const args = label.GetLabelsSchema.parse(request.params.arguments); const { owner, repo } = args; const result = await label.getLabels(owner, repo); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }