Skip to main content
Glama

create_issue

Create and manage Issues in Gitee repositories by specifying owner, repo, title, body, assignees, milestones, and labels.

Instructions

在 Gitee 仓库中创建 Issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneesNoUsers assigned to the issue
bodyNoIssue content
labelsNoLabels
milestoneNoMilestone ID
ownerYesRepository owner path (enterprise, organization, or personal path)
repoYesRepository path
security_holeNoWhether the issue is private, default is false
titleYesIssue title

Implementation Reference

  • Main handler function implementing the logic to create a Gitee issue via API, including parameter validation, body preparation, and response parsing.
    export async function createIssue(
      owner: string,
      repo: string,
      options: Omit<CreateIssueOptions, "owner" | "repo">
    ) {
      owner = validateOwnerName(owner);
      repo = validateRepositoryName(repo);
    
      // Create the request body
      const body: Record<string, any> = {
        ...options,
        repo: repo,
      };
    
      // If `assignees` is an array, convert it to a comma-separated string.
      if (Array.isArray(body.assignees) && body.assignees.length > 0) {
        body.assignees = body.assignees.join(',');
      } else if (Array.isArray(body.assignees) && body.assignees.length === 0) {
        // If `assignees` is an empty array, delete the field.
        delete body.assignees;
      }
    
      // If `labels` is an array, convert it to a comma-separated string.
      if (Array.isArray(body.labels) && body.labels.length > 0) {
        body.labels = body.labels.join(',');
      } else if (Array.isArray(body.labels) && body.labels.length === 0) {
        // If `labels` is an empty array, delete the field.
        delete body.labels;
      }
    
      const url = `/repos/${owner}/${repo}/issues`;
      const response = await giteeRequest(url, "POST", body);
    
      return GiteeIssueSchema.parse(response);
    }
  • Zod schema defining the input parameters for creating an issue.
    export const CreateIssueSchema = z.object({
      // 仓库所属空间地址 (企业、组织或个人的地址 path)
      owner: z.string().describe("Repository owner path (enterprise, organization, or personal path)"),
      // 仓库路径 (path)
      repo: z.string().describe("Repository path"),
      // Issue 标题
      title: z.string().describe("Issue title"),
      // Issue 内容
      body: z.string().optional().describe("Issue content"),
      // Issue 分配的用户
      assignees: z.array(z.string()).optional().describe("Users assigned to the issue"),
      // 里程碑 ID
      milestone: z.number().optional().describe("Milestone ID"),
      // 标签
      labels: z.array(z.string()).optional().describe("Labels"),
      // 是否是私有 Issue,默认为 false
      security_hole: z.boolean().optional().describe("Whether the issue is private, default is false"),
    });
  • index.ts:139-147 (registration)
    Tool registration in the MCP server, linking name, description, schema, and handler wrapper.
    server.registerTool({
      name: "create_issue",
      description: "在 Gitee 仓库中创建 Issue",
      schema: issueOperations.CreateIssueSchema,
      handler: async (params: any) => {
        const { owner, repo, ...options } = params;
        return await issueOperations.createIssue(owner, repo, options);
      },
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While '创建 Issue' implies a write operation, it doesn't disclose important behavioral aspects like authentication requirements, rate limits, whether the operation is idempotent, what happens on failure, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap.

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 extremely concise - a single Chinese sentence that directly states the tool's purpose. There's zero waste or unnecessary elaboration, making it front-loaded and efficient for an AI agent to parse.

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?

For a mutation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after creation, what the return value might be, error conditions, or how this tool relates to the sibling tools. The description alone doesn't provide enough context for confident tool selection and invocation.

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?

The schema description coverage is 100%, with all 8 parameters well-documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema. According to the rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('创建 Issue' - create issue) and the resource ('在 Gitee 仓库中' - in Gitee repository), making the purpose immediately understandable. However, it doesn't differentiate this from sibling tools like 'update_issue' or explain how it differs from 'add_issue_comment', which would be needed for a perfect score.

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. There's no mention of when to choose 'create_issue' over 'update_issue' or 'add_issue_comment', nor any context about prerequisites or appropriate situations for creating issues versus other repository actions.

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

Related 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/normal-coder/gitee-mcp-server'

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