Skip to main content
Glama

create_issue_labels

Add predefined or custom labels to issues in a repository to organize and categorize them effectively. Specify repository details, issue number, and label names for streamlined issue management on AtomGit.

Instructions

Add labels to an issue in a repository

Input Schema

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

Implementation Reference

  • The core handler function that executes the tool logic by making 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:182-186 (registration)
    Registration of the tool in the MCP server's listTools handler, specifying 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)
    Dispatch handler in the MCP server's CallToolRequestSchema that parses arguments, calls the core handler, and formats the response.
    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