create_state
Add a new state to a project in the Plane MCP Server by specifying project ID and state details like color and name. Simplifies project management workflows.
Instructions
Create a new state in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The uuid identifier of the project to create the state in | |
| state_data | Yes |
Implementation Reference
- src/tools/metadata.ts:173-199 (registration)Registration of the 'create_state' MCP tool using server.tool(). Includes tool name, description, input schema (project_id and partial StateSchema requiring name, color, group), and inline asynchronous handler that sends a POST request to the Plane API to create the state and returns the JSON response as text content.server.tool( "create_state", "Create a new state in a project", { project_id: z.string().describe("The uuid identifier of the project to create the state in"), state_data: StateSchema.partial().required({ name: true, color: true, group: true, }), }, async ({ project_id, state_data }) => { const response = await makePlaneRequest( "POST", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/`, state_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/schemas.ts:125-145 (schema)Zod schema definition for the State object (exported as StateSchema), used in the input schema for create_state tool to validate state_data.export const State = z.object({ color: z.string().max(255), created_at: z.string().datetime({ offset: true }).readonly(), created_by: z.string().uuid().readonly(), default: z.boolean().optional(), 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(), group: z.any().optional(), id: z.string().uuid().readonly(), is_triage: z.boolean().optional(), name: z.string().max(255), project: z.string().uuid().readonly(), sequence: z.number().optional(), slug: z.string().regex(new RegExp("^[-a-zA-Z0-9_]+$")).max(100).optional(), updated_at: z.string().datetime({ offset: true }).readonly(), updated_by: z.string().uuid().readonly(), workspace: z.string().uuid().readonly(), }); export type State = z.infer<typeof State>;