Skip to main content
Glama

create-issue

Create new issues in Plane projects by specifying title, description, priority, assignees, and project details for effective task management.

Instructions

Create a new issue in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesID of the project where the issue should be created
nameYesTitle of the issue
description_htmlNoHTML description of the issue (required by Plane API)
priorityNoPriority of the issue (urgent, high, medium, low, none)
state_idNoID of the state for this issue (optional)
assigneesNoArray of user IDs to assign to this issue (optional)

Implementation Reference

  • Handler for the 'create-issue' tool: validates input, normalizes assignees array, calls Plane API to POST new issue to /projects/{project_id}/issues/, returns JSON response.
    case "create-issue": {
      if (!args || typeof args.project_id !== "string") {
        throw new Error("Project ID is required");
      }
      const { project_id, ...issueData } = args;
    
      // Ensure assignees is properly formatted as an array
      if (issueData.assignees) {
        // Special case: detect if entire issue is nested in assignees
        if (
          typeof issueData.assignees === "object" &&
          !Array.isArray(issueData.assignees) &&
          (issueData.assignees as Record<string, any>).project_id &&
          (issueData.assignees as Record<string, any>).name
        ) {
          // Issue is nested inside assignees, remove it completely
          delete issueData.assignees;
        } else if (!Array.isArray(issueData.assignees)) {
          if (typeof issueData.assignees === "string") {
            // Convert single string to array
            issueData.assignees = [issueData.assignees];
          } else if (typeof issueData.assignees === "object") {
            // Convert object to array of values
            issueData.assignees = Object.values(issueData.assignees);
          } else {
            // Remove invalid assignees
            delete issueData.assignees;
          }
        }
      }
    
      const issue = await callPlaneAPI(
        `/projects/${project_id}/issues/`,
        "POST",
        issueData
      );
      return {
        content: [{ type: "text", text: JSON.stringify(issue, null, 2) }],
        isError: false,
      };
    }
  • Tool schema definition including name, description, and detailed inputSchema with properties and requirements for creating an issue.
    const CREATE_ISSUE_TOOL: Tool = {
      name: "create-issue",
      description: "Create a new issue in a project",
      inputSchema: {
        type: "object",
        properties: {
          project_id: {
            type: "string",
            description: "ID of the project where the issue should be created",
          },
          name: {
            type: "string",
            description: "Title of the issue",
          },
          description_html: {
            type: "string",
            description: "HTML description of the issue (required by Plane API)",
          },
          priority: {
            type: "string",
            description: "Priority of the issue (urgent, high, medium, low, none)",
            enum: ["urgent", "high", "medium", "low", "none"],
          },
          state_id: {
            type: "string",
            description: "ID of the state for this issue (optional)",
          },
          assignees: {
            type: "array",
            items: {
              type: "string",
            },
            description: "Array of user IDs to assign to this issue (optional)",
          },
        },
        required: ["project_id", "name"],
      },
    };
  • src/index.ts:263-271 (registration)
    Registration of the 'create-issue' tool (as CREATE_ISSUE_TOOL) in the listTools response handler, making it discoverable by MCP clients.
      tools: [
        LIST_PROJECTS_TOOL,
        GET_PROJECT_TOOL,
        CREATE_ISSUE_TOOL,
        LIST_ISSUES_TOOL,
        GET_ISSUE_TOOL,
        UPDATE_ISSUE_TOOL,
      ],
    }));
  • Shared helper function callPlaneAPI used by the create-issue handler to make authenticated HTTP requests to the Plane API.
    async function callPlaneAPI(
      endpoint: string,
      method: string,
      body?: any
    ): Promise<any> {
      const baseUrl = `${PLANE_HOST}/api/v1/workspaces/${PLANE_WORKSPACE_SLUG}`;
      const url = `${baseUrl}${endpoint}`;
    
      const options: RequestInit = {
        method,
        headers: {
          "Content-Type": "application/json",
          "X-API-Key": PLANE_API_KEY as string,
        },
      };
    
      if (body && (method === "POST" || method === "PATCH")) {
        options.body = JSON.stringify(body);
      }
    
      try {
        const response = await fetch(url, options);
    
        if (!response.ok) {
          let errorText;
          try {
            errorText = await response.text();
          } catch (parseError) {
            errorText = "Unable to parse error response";
          }
          throw new Error(
            `Plane API error: ${response.status} ${response.statusText}\n${errorText}`
          );
        }
    
        // For DELETE requests that return 204 No Content
        if (response.status === 204) {
          return { success: true };
        }
    
        return await response.json();
      } catch (error) {
        throw new Error(
          `Error calling Plane API: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
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. It states 'Create' which implies a write operation, but doesn't mention permissions, side effects, error handling, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 no wasted words. It's appropriately sized and front-loaded with the core action, making it easy to parse quickly.

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 creation tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation, error conditions, or provide enough context for safe usage despite the comprehensive schema.

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%, so the schema fully documents all 6 parameters. The description adds no additional parameter information beyond what's in the schema, maintaining the baseline score for high 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 clearly states the verb ('Create') and resource ('new issue in a project'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'update-issue' or specify what distinguishes creation from other operations.

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 like 'update-issue' or 'list-issues', nor does it mention prerequisites or context for creation. It's a basic statement without usage context.

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/kelvin6365/plane-mcp-server'

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