clickup_edit_page
Modify ClickUp document pages by updating name, subtitle, or markdown content using replace, append, or prepend modes.
Instructions
Edit a page in a ClickUp doc
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ClickUp doc ID | |
| page_id | Yes | ClickUp page ID | |
| name | No | Page name | |
| sub_title | No | Page subtitle | |
| content | No | Page content in markdown format | |
| content_edit_mode | No | Content edit mode (replace, append, prepend), default is replace |
Implementation Reference
- Full tool definition for 'clickup_edit_page', including Zod input schema, description, and handler function that prepares parameters and calls the docsService.editPage method.const editPageTool = defineTool((z) => ({ name: "clickup_edit_page", description: "Edit a page in a ClickUp doc", inputSchema: { doc_id: z.string().describe("ClickUp doc ID"), page_id: z.string().describe("ClickUp page ID"), name: z.string().optional().describe("Page name"), sub_title: z.string().optional().describe("Page subtitle"), content: z.string().optional().describe("Page content in markdown format"), content_edit_mode: z .string() .optional() .describe( "Content edit mode (replace, append, prepend), default is replace" ), }, handler: async (input) => { const pageParams: EditPageParams = { docId: input.doc_id, pageId: input.page_id, name: input.name, sub_title: input.sub_title, content: input.content, content_edit_mode: input.content_edit_mode, }; const response = await docsService.editPage(pageParams); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
- src/services/docs.service.ts:88-106 (helper)Helper method in DocsService that performs the actual API call to edit a ClickUp doc page using PUT request with prepared payload.async editPage(params: EditPageParams): Promise<ClickUpDocPage> { const { docId, pageId, name, sub_title, content, content_edit_mode } = params; const pageData = { name, sub_title, content, content_edit_mode: content_edit_mode || "replace", content_format: "text/md", }; return this.request<ClickUpDocPage>( `/${this.workspaceId}/docs/${docId}/pages/${pageId}`, { method: "PUT", body: JSON.stringify(pageData), } ); }
- src/index.ts:89-91 (registration)Registers all imported tools, including clickup_edit_page, into the MCP server by iterating over the tools array and calling server.tool().tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- src/index.ts:17-17 (registration)Imports the clickup_edit_page tool from docs.controller.tseditPageTool,
- src/models/types.ts:78-85 (schema)TypeScript interface defining the parameters for editing a page, used in the service and controller.export interface EditPageParams { docId: string; pageId: string; name?: string; sub_title?: string; content?: string; content_edit_mode?: string; }