Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

add_cycle_issues

Add specific issues to a project cycle in Plane by providing the project ID, cycle ID, and issue UUIDs. Streamlines issue management within cycles.

Instructions

Add issues to a cycle

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cycle_idYesThe uuid identifier of the cycle to add issues to
issuesYesArray of issue UUIDs to add to the cycle
project_idYesThe uuid identifier of the project containing the cycle

Implementation Reference

  • Handler function that makes a POST request to the Plane API to add the specified issues to the cycle and returns the response as text content.
    async ({ project_id, cycle_id, issues }) => {
      const response = await makePlaneRequest(
        "POST",
        `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/cycles/${cycle_id}/cycle-issues/`,
        { issues }
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Zod input schema defining project_id, cycle_id, and issues (array of strings).
    {
      project_id: z.string().describe("The uuid identifier of the project containing the cycle"),
      cycle_id: z.string().describe("The uuid identifier of the cycle to add issues to"),
      issues: z.array(z.string()).describe("Array of issue UUIDs to add to the cycle"),
    },
  • Direct registration of the add_cycle_issues tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
      "add_cycle_issues",
      "Add issues to a cycle",
      {
        project_id: z.string().describe("The uuid identifier of the project containing the cycle"),
        cycle_id: z.string().describe("The uuid identifier of the cycle to add issues to"),
        issues: z.array(z.string()).describe("Array of issue UUIDs to add to the cycle"),
      },
      async ({ project_id, cycle_id, issues }) => {
        const response = await makePlaneRequest(
          "POST",
          `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/cycles/${cycle_id}/cycle-issues/`,
          { issues }
        );
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      }
    );
  • Top-level registration call that invokes registerCycleIssueTools, which includes the add_cycle_issues tool registration.
    registerCycleIssueTools(server);
  • Utility function makePlaneRequest used by the handler to perform HTTP requests to the Plane API with authentication and error handling.
    export async function makePlaneRequest<T>(method: string, path: string, body: any = null): Promise<T> {
      const hostUrl = process.env.PLANE_API_HOST_URL || "https://api.plane.so/";
      const host = hostUrl.endsWith("/") ? hostUrl : `${hostUrl}/`;
      const url = `${host}api/v1/${path}`;
      const headers: Record<string, string> = {
        "X-API-Key": process.env.PLANE_API_KEY || "",
      };
    
      // Only add Content-Type for non-GET requests
      if (method.toUpperCase() !== "GET") {
        headers["Content-Type"] = "application/json";
      }
    
      try {
        const config: AxiosRequestConfig = {
          url,
          method,
          headers,
        };
    
        // Only include body for non-GET requests
        if (method.toUpperCase() !== "GET" && body !== null) {
          config.data = body;
        }
    
        const response = await axios(config);
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Request failed: ${error.message}`);
        }
        throw error;
      }
    }

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

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