Skip to main content
Glama
makeplane

Plane MCP Server

Official
by makeplane

update_module

Modify module details within a project by updating fields such as name, description, status, and issue tracking metrics to ensure accurate project management.

Instructions

Update an existing module

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
module_dataYesThe fields to update on the module
module_idYesThe uuid identifier of the module to update
project_idYesThe uuid identifier of the project containing the module

Implementation Reference

  • The handler function for the 'update_module' tool. It makes a PATCH request to the Plane API endpoint for updating a module and returns the response as formatted JSON text.
    async ({ project_id, module_id, module_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/modules/${module_id}/`, module_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
  • Zod schema for 'Module' type, imported as ModuleSchema and used in the tool's input schema for module_data: ModuleSchema.partial().
    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>;
  • Registration of the 'update_module' tool within the registerModuleTools function using server.tool().
    server.tool( "update_module", "Update an existing module", { project_id: z.string().describe("The uuid identifier of the project containing the module"), module_id: z.string().describe("The uuid identifier of the module to update"), module_data: ModuleSchema.partial().describe("The fields to update on the module"), }, async ({ project_id, module_id, module_data }) => { const response = await makePlaneRequest( "PATCH", `workspaces/${process.env.PLANE_WORKSPACE_SLUG}/projects/${project_id}/modules/${module_id}/`, module_data ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } );
  • Utility function makePlaneRequest used by the handler to perform the API PATCH request to update the module.
    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; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/makeplane/plane-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server