list_states
Retrieve all states for a specific project using its unique identifier to manage and organize project workflows within the Plane MCP Server.
Instructions
Get all states for a specific project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The uuid identifier of the project to get states for |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"project_id": {
"description": "The uuid identifier of the project to get states for",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Implementation Reference
- src/tools/metadata.ts:128-148 (registration)The registration of the 'list_states' tool using server.tool(). Includes the input schema (project_id string) and the handler function that performs a GET request to the Plane API to list states for the given project and returns the JSON response as text content.server.tool( "list_states", "Get all states for a specific project", { project_id: z.string().describe("The uuid identifier of the project to get states for"), }, async ({ project_id }) => { const response = await makePlaneRequest( "GET", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/` ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/tools/metadata.ts:134-147 (handler)The handler function for the 'list_states' tool, which fetches states via API using makePlaneRequest and returns formatted JSON.async ({ project_id }) => { const response = await makePlaneRequest( "GET", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/states/` ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- src/tools/metadata.ts:131-133 (schema)Input schema for 'list_states' tool using Zod: requires project_id as string.{ project_id: z.string().describe("The uuid identifier of the project to get states for"), },
- src/tools/index.ts:14-14 (registration)Top-level registration call to registerMetadataTools, which includes the 'list_states' tool among metadata tools.registerMetadataTools(server);