clickup_edit_page
Update ClickUp document pages by modifying names, subtitles, 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 |
|---|---|---|---|
| content | No | Page content in markdown format | |
| content_edit_mode | No | Content edit mode (replace, append, prepend), default is replace | |
| doc_id | Yes | ClickUp doc ID | |
| name | No | Page name | |
| page_id | Yes | ClickUp page ID | |
| sub_title | No | Page subtitle |
Implementation Reference
- src/services/docs.service.ts:88-106 (handler)Core handler logic for editing a ClickUp doc page via API PUT request, constructing payload from EditPageParams.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/controllers/docs.controller.ts:140-170 (registration)Tool registration for 'clickup_edit_page' including Zod input schema validation and wrapper handler delegating to DocsService.editPage.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/models/types.ts:78-85 (schema)TypeScript interface defining the parameters structure for the editPage method, used in service and controller.export interface EditPageParams { docId: string; pageId: string; name?: string; sub_title?: string; content?: string; content_edit_mode?: string; }