create_module
Add a new module to a project in Plane MCP Server by specifying project ID and module details, managing issues and workflows effectively.
Instructions
Create a new module in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_data | Yes | ||
| project_id | Yes | The uuid identifier of the project to create the module in |
Implementation Reference
- src/tools/modules.ts:53-77 (registration)MCP server.tool call registering the 'create_module' tool, including its description, input schema using ModuleSchema, and inline handler function.server.tool( "create_module", "Create a new module in a project", { project_id: z.string().describe("The uuid identifier of the project to create the module in"), module_data: ModuleSchema.partial().required({ name: true, }), }, async ({ project_id, module_data }) => { const response = await makePlaneRequest( "POST", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/modules/`, module_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
- src/tools/modules.ts:62-76 (handler)The handler function that executes the tool logic: POST request to create module in Plane API and returns JSON response.async ({ project_id, module_data }) => { const response = await makePlaneRequest( "POST", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/modules/`, module_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- src/schemas.ts:162-193 (schema)Zod schema for Module (imported as ModuleSchema), used to validate the module_data input parameter with partial() and name required.export const Module = z.object({ archived_at: z.string().datetime({ offset: true }).optional(), backlog_issues: z.number().int().readonly(), cancelled_issues: z.number().int().readonly(), completed_issues: z.number().int().readonly(), created_at: z.string().datetime({ offset: true }).readonly(), created_by: z.string().uuid().readonly(), deleted_at: z.string().datetime({ offset: true }).readonly(), description: z.string().optional(), description_html: z.any().optional(), description_text: z.any().optional(), external_id: z.string().max(255).optional(), external_source: z.string().max(255).optional(), id: z.string().uuid().readonly(), lead: z.string().uuid().optional(), logo_props: z.any().optional(), members: z.array(z.string().uuid()).optional(), name: z.string().max(255), project: z.string().uuid().readonly(), sort_order: z.number().optional(), start_date: z.string().date().optional(), started_issues: z.number().int().readonly(), status: z.any().optional(), target_date: z.string().date().optional(), total_issues: z.number().int().readonly(), unstarted_issues: z.number().int().readonly(), updated_at: z.string().datetime({ offset: true }).readonly(), updated_by: z.string().uuid().readonly(), view_props: z.any().optional(), workspace: z.string().uuid().readonly(), }); export type Module = z.infer<typeof Module>;
- src/tools/index.ts:18-18 (registration)Invocation of registerModuleTools which includes the create_module tool registration.registerModuleTools(server);