create_stage
Add a new stage to a FluentBoards 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 main handler function for the 'create_stage' tool. It destructures the input arguments, validates board access using validateBoardAccess, constructs the stage data (title required, position optional), performs an API POST to `/projects/${board_id}/stage-create`, and returns the formatted 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:87-118 (registration)Direct registration of the 'create_stage' MCP tool within registerBoardTools, including tool name, description, Zod input schema, and the handler function.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/types/index.ts:14-18 (schema)Zod schema for 'CreateStage' inputs (board_id, title, position), matching the inline schema used in the tool registration. Also used to derive TypeScript type CreateStage.export const CreateStageSchema = z.object({ board_id: z.number().int().positive(), title: z.string().min(1), position: z.number().optional(), });