Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

create_label

Generate new labels within a Plane project to organize and categorize work items. Specify label details like name, color, and project ID for clear project management.

Instructions

Create a new label in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
label_dataYes
project_idYesThe uuid identifier of the project to create the label in

Implementation Reference

  • The async handler function for the 'create_label' tool. It sends a POST request to the Plane API to create a new label in the specified project and returns the response as text.
    async ({ project_id, label_data }) => { const response = await makePlaneRequest( "POST", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/labels/`, label_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
  • The Zod schema for Label objects (exported as Label, imported as LabelSchema), used to validate the label_data input for create_label.
    export const Label = z.object({ color: z.string().max(255).optional(), created_at: z.string().datetime({ offset: true }).readonly(), created_by: z.string().uuid().readonly(), deleted_at: z.string().datetime({ offset: true }).readonly(), description: z.string().optional(), external_id: z.string().max(255).optional(), external_source: z.string().max(255).optional(), id: z.string().uuid().readonly(), name: z.string().max(255), parent: z.string().uuid().optional(), project: z.string().uuid().readonly(), sort_order: z.number().optional(), updated_at: z.string().datetime({ offset: true }).readonly(), updated_by: z.string().uuid().readonly(), workspace: z.string().uuid().readonly(), }); export type Label = z.infer<typeof Label>;
  • The server.tool() call that registers the 'create_label' tool, including its name, description, input schema (using LabelSchema), and inline handler function.
    server.tool( "create_label", "Create a new label in a project", { project_id: z.string().describe("The uuid identifier of the project to create the label in"), label_data: LabelSchema.partial().required({ name: true, color: true, }), }, async ({ project_id, label_data }) => { const response = await makePlaneRequest( "POST", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/labels/`, label_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
  • Invocation of registerMetadataTools which includes the create_label tool registration.
    registerMetadataTools(server);
  • The specific input schema for the create_label tool parameters.
    { project_id: z.string().describe("The uuid identifier of the project to create the label in"), label_data: LabelSchema.partial().required({ name: true, color: true, }),

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