get_repository_labels
Retrieve all labels from a specified repository on AtomGit. Input the repository owner and name to fetch comprehensive label data for efficient repository management.
Instructions
Get all labels in a repository
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner, typically referred to as 'username'. Case-insensitive. | |
| repo | Yes | Repository name. Case-insensitive. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"owner": {
"description": "Repository owner, typically referred to as 'username'. Case-insensitive.",
"type": "string"
},
"repo": {
"description": "Repository name. Case-insensitive.",
"type": "string"
}
},
"required": [
"owner",
"repo"
],
"type": "object"
}
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 input parameters (owner, repo) for the get_repository_labels tool.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)Tool registration in the MCP server, specifying name, description, and input schema.{ name: "get_repository_labels", description: "Get all labels in a repository", inputSchema: zodToJsonSchema(label.GetLabelsSchema), },
- index.ts:455-463 (handler)MCP server request handler that parses arguments and delegates to the core label.getLabels function.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) }], }; }