Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

update_state

Modify an existing state within a project by specifying its identifier and updating relevant fields such as name, description, or color using the Plane MCP Server.

Instructions

Update an existing state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe uuid identifier of the project containing the state
state_dataYesThe fields to update on the state
state_idYesThe uuid identifier of the state to update

Implementation Reference

  • Handler function that executes the update_state tool by sending a PATCH request to the Plane API to update the specified state with the provided data and returns the JSON response as text content.
    async ({ project_id, state_id, state_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/${state_id}/`, state_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
  • Input schema validation using Zod for the update_state tool parameters: project_id, state_id, and partial state_data based on StateSchema.
    { project_id: z.string().describe("The uuid identifier of the project containing the state"), state_id: z.string().describe("The uuid identifier of the state to update"), state_data: StateSchema.partial().describe("The fields to update on the state"), },
  • Registration of the 'update_state' tool on the MCP server within registerMetadataTools, including description, input schema, and handler function.
    server.tool( "update_state", "Update an existing state", { project_id: z.string().describe("The uuid identifier of the project containing the state"), state_id: z.string().describe("The uuid identifier of the state to update"), state_data: StateSchema.partial().describe("The fields to update on the state"), }, async ({ project_id, state_id, state_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/${state_id}/`, state_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
  • Base Zod schema for State object, imported as StateSchema and used in partial form for update_state input.
    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>;

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