Skip to main content
Glama

create_issue_labels

Add labels to issues in AtomGit repositories to organize, categorize, and prioritize tasks for better project management.

Instructions

Add labels to an issue in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner, typically referred to as 'username'. Case-insensitive.
repoYesRepository name. Case-insensitive.
issue_numberYesIssue number
labelsYesArray of label names

Implementation Reference

  • The main handler function that sends a POST request to the AtomGit API to add labels to a specific issue.
    export async function createIssueLabels(
      owner: string,
      repo: string,
      issue_number: number,
      labels: string[]
    ) {
      return atomGitRequest(
        `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues/${encodeURIComponent(issue_number)}/labels`,
        {
          method: "POST",
          body: labels,
        }
      );
    }
  • Zod schema defining the input parameters for the create_issue_labels tool.
    export const CreateIssueLabelsSchema = z.object({
      owner: z.string().describe("Repository owner, typically referred to as 'username'. Case-insensitive."),
      repo: z.string().describe("Repository name. Case-insensitive."),
      issue_number: z.number().describe("Issue number"),
      labels: z.array(z.string()).describe("Array of label names"),
    });
  • index.ts:183-186 (registration)
    Tool registration in the MCP server's list of tools, including name, description, and input schema.
      name: "create_issue_labels",
      description: "Add labels to an issue in a repository",
      inputSchema: zodToJsonSchema(label.CreateIssueLabelsSchema),
    },
  • index.ts:465-473 (registration)
    Dispatcher case in the CallToolRequestHandler that parses arguments and calls the createIssueLabels handler.
    case "create_issue_labels": {
      const args = label.CreateIssueLabelsSchema.parse(request.params.arguments);
      const { owner, repo, issue_number, labels } = args;
    
      const result = await label.createIssueLabels(owner, repo, issue_number, labels);
      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