delete_state
Remove a specific state from a project in Plane MCP Server by providing the project and state UUID identifiers, simplifying state management within project workflows.
Instructions
Delete a state
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The uuid identifier of the project containing the state | |
| state_id | Yes | The uuid identifier of the state to delete |
Implementation Reference
- src/tools/metadata.ts:226-247 (registration)Registration of the 'delete_state' tool, including input schema (project_id and state_id) and the handler function that executes a DELETE request via makePlaneRequest to delete the state from the project.server.tool( "delete_state", "Delete a 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 delete"), }, async ({ project_id, state_id }) => { const response = await makePlaneRequest( "DELETE", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/${state_id}/` ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/common/request-helper.ts:2-36 (helper)Supporting utility function 'makePlaneRequest' that handles HTTP requests to the Plane API using axios, called by the delete_state handler.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; } }