get_label_by_name
Retrieve a specific label by name from a repository on the AtomGit platform. Specify the owner, repository, and label name to fetch the desired label information.
Instructions
Get a single label by name from a repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Label name | |
| owner | Yes | Repository owner, typically referred to as 'username'. Case-insensitive. | |
| repo | Yes | Repository name. Case-insensitive. |
Implementation Reference
- operations/label.ts:162-173 (handler)Core handler function that performs the HTTP GET request to retrieve a specific label by name from the AtomGit API.export async function getLabelByName( owner: string, repo: string, name: string ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/labels/${encodeURIComponent(name)}`, { method: "GET", } ); }
- operations/label.ts:38-42 (schema)Zod schema defining the input parameters for the get_label_by_name tool: owner, repo, and name.export const GetLabelByNameSchema = z.object({ owner: z.string().describe("Repository owner, typically referred to as 'username'. Case-insensitive."), repo: z.string().describe("Repository name. Case-insensitive."), name: z.string().describe("Label name"), });
- index.ts:198-201 (registration)Tool registration in the list of available tools returned by ListToolsRequestHandler.name: "get_label_by_name", description: "Get a single label by name from a repository", inputSchema: zodToJsonSchema(label.GetLabelByNameSchema), },
- index.ts:495-503 (handler)MCP CallTool handler that parses arguments, calls the label.getLabelByName function, and formats the response.case "get_label_by_name": { const args = label.GetLabelByNameSchema.parse(request.params.arguments); const { owner, repo, name } = args; const result = await label.getLabelByName(owner, repo, name); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }