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) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a label but doesn't describe what happens if the label doesn't exist (e.g., error handling), whether it requires authentication, rate limits, or the format of the return value. For a read operation with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Get a single label by name from a repository'). There is no wasted verbiage, repetition, or unnecessary detail, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (a simple read operation), 100% schema coverage, and no output schema, the description is minimally adequate. However, it lacks details on error handling, authentication needs, or return format, which are important for a tool with no annotations. It's complete enough to understand the basic purpose but insufficient for full operational context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all three parameters ('owner', 'repo', 'name') well-documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as examples or edge cases. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't compensate for any gaps (none exist here).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a single label by name from a repository'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'get_repository_labels' (which lists all labels) and 'get_issue_labels' (which gets labels for an issue), though it doesn't explicitly name these alternatives. The description is specific but could be more precise about the distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_repository_labels' (for listing all labels) or 'get_issue_labels' (for labels on an issue), nor does it specify prerequisites or contextual constraints. Usage is implied by the name and description alone, with no explicit when/when-not instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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