Skip to main content
Glama

get_label_by_name

Retrieve a specific label from an AtomGit repository using its name to manage issue categorization and organization.

Instructions

Get a single label by name from a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner, typically referred to as 'username'. Case-insensitive.
repoYesRepository name. Case-insensitive.
nameYesLabel name

Implementation Reference

  • Core handler function that performs a GET request to the AtomGit API to retrieve a specific label by its name in the given repository.
    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", } ); }
  • 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:197-201 (registration)
    Registers the get_label_by_name tool in the MCP server's list of tools, including its name, description, and input schema.
    { name: "get_label_by_name", description: "Get a single label by name from a repository", inputSchema: zodToJsonSchema(label.GetLabelByNameSchema), },
  • MCP request handler that parses the tool arguments using the schema and delegates execution to the core getLabelByName function, returning the result as text content.
    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) }], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaiyuanxiaobing/atomgit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server