create_stage
Add a new stage to a project board to organize tasks and workflow steps.
Instructions
Create a new stage in a board
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | Board ID | |
| title | Yes | Stage title | |
| position | No | Stage position (optional) |
Implementation Reference
- src/tools/boards.ts:95-117 (handler)The handler function that executes the create_stage tool: destructures args, validates board access, constructs stage data, calls the API endpoint to create the stage, and formats the response.async (args) => { const { board_id, title, position } = args; // Validate board access const accessCheck = validateBoardAccess(board_id); if (!accessCheck.allowed) { return formatResponse(createBoardFocusError(accessCheck)); } const stageData: any = { title, }; if (position !== undefined) { stageData.position = position; } const response = await api.post( `/projects/${board_id}/stage-create`, stageData ); return formatResponse(response.data); }
- src/tools/boards.ts:90-94 (schema)Inline Zod schema defining the input parameters for the create_stage tool.{ board_id: z.number().int().positive().describe("Board ID"), title: z.string().min(1).describe("Stage title"), position: z.number().optional().describe("Stage position (optional)"), },
- src/tools/boards.ts:87-118 (registration)Direct registration of the create_stage tool using server.tool(), including name, description, schema, and handler.server.tool( "create_stage", "Create a new stage in a board", { board_id: z.number().int().positive().describe("Board ID"), title: z.string().min(1).describe("Stage title"), position: z.number().optional().describe("Stage position (optional)"), }, async (args) => { const { board_id, title, position } = args; // Validate board access const accessCheck = validateBoardAccess(board_id); if (!accessCheck.allowed) { return formatResponse(createBoardFocusError(accessCheck)); } const stageData: any = { title, }; if (position !== undefined) { stageData.position = position; } const response = await api.post( `/projects/${board_id}/stage-create`, stageData ); return formatResponse(response.data); } );
- src/index.ts:22-22 (registration)Calls registerBoardTools which registers the create_stage tool (and other board tools).registerBoardTools(server);
- src/types/index.ts:14-18 (schema)Zod schema for CreateStage inputs, matching the tool's inline schema (though not directly used in the tool registration).export const CreateStageSchema = z.object({ board_id: z.number().int().positive(), title: z.string().min(1), position: z.number().optional(), });