Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

list_labels

Retrieve all GitHub labels to organize and categorize issues and pull requests for better project management.

Instructions

List all GitHub labels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Core handler function that executes the list_labels tool logic by querying GitHub's GraphQL API for repository labels.
    async listLabels(data: {
      limit?: number;
    }): Promise<Array<{ id: string; name: string; color: string; description: string }>> {
      try {
        const limit = data.limit || 100;
    
        const query = `
          query($owner: String!, $repo: String!, $limit: Int!) {
            repository(owner: $owner, name: $repo) {
              labels(first: $limit) {
                nodes {
                  id
                  name
                  color
                  description
                }
              }
            }
          }
        `;
    
        interface ListLabelsResponse {
          repository: {
            labels: {
              nodes: Array<{
                id: string;
                name: string;
                color: string;
                description: string;
              }>
            }
          }
        }
    
        const response = await this.factory.graphql<ListLabelsResponse>(query, {
          owner: this.factory.getConfig().owner,
          repo: this.factory.getConfig().repo,
          limit
        });
    
        if (!response.repository?.labels?.nodes) {
          return [];
        }
    
        return response.repository.labels.nodes;
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • ToolDefinition including Zod input schema validation, description, and usage examples for list_labels.
    export const listLabelsTool: ToolDefinition<ListLabelsArgs> = {
      name: "list_labels",
      description: "List all GitHub labels",
      schema: listLabelsSchema as unknown as ToolSchema<ListLabelsArgs>,
      examples: [
        {
          name: "List all labels",
          description: "Get all repository labels",
          args: {
            limit: 50
          }
        }
      ]
    };
  • Registers the listLabelsTool in the ToolRegistry singleton during initialization.
    this.registerTool(createLabelTool);
    this.registerTool(listLabelsTool);
  • MCP tool dispatch handler that routes list_labels calls to ProjectManagementService.listLabels.
    case "create_label":
      return await this.service.createLabel(args);
    
    case "list_labels":
      return await this.service.listLabels(args);
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. 'List all GitHub labels' implies a read-only operation, but it doesn't disclose behavioral traits like pagination, rate limits, authentication needs, or what 'all' entails (e.g., across all repos or a specific one). This leaves key operational details unclear for an agent.

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 with zero waste. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly without unnecessary elaboration.

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

Completeness2/5

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

Given the lack of annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't address key contextual aspects like return format, error handling, or usage constraints, leaving the agent with insufficient information to invoke the tool effectively.

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

Parameters2/5

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

The input schema has one parameter ('limit') with 0% description coverage, meaning its purpose is undocumented. The tool description adds no parameter semantics beyond the schema, failing to explain what 'limit' does or how it affects the listing. This is inadequate given the low schema coverage.

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 'List all GitHub labels' clearly states the verb ('List') and resource ('GitHub labels') with the scope 'all'. It's specific about what the tool does, though it doesn't explicitly distinguish itself from potential sibling tools like 'list_issues' or 'list_milestones' beyond the resource type.

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 prerequisites, context, or exclusions, such as whether it applies to a specific repository or requires authentication. With many sibling tools available, this lack of differentiation is a significant gap.

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/kunwarVivek/mcp-github-project-manager'

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