clickup_create_page
Create a new page in a ClickUp document by specifying the document ID, page name, and content in markdown format, with options for subtitle and parent page.
Instructions
Create a new page in a ClickUp doc
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Page content in markdown format | |
| doc_id | Yes | ClickUp doc ID | |
| name | Yes | Page name | |
| parent_page_id | No | Parent page ID (null for root page) | |
| sub_title | No | Page subtitle |
Implementation Reference
- Primary handler implementation for the 'clickup_create_page' tool, including inline Zod input schema, parameter mapping, and delegation to DocsService.createPageconst createPageTool = defineTool((z) => ({ name: "clickup_create_page", description: "Create a new page in a ClickUp doc", inputSchema: { doc_id: z.string().describe("ClickUp doc ID"), name: z.string().describe("Page name"), parent_page_id: z .string() .optional() .describe("Parent page ID (null for root page)"), sub_title: z.string().optional().describe("Page subtitle"), content: z.string().describe("Page content in markdown format"), }, handler: async (input) => { const pageParams: CreatePageParams = { docId: input.doc_id, name: input.name, parent_page_id: input.parent_page_id, sub_title: input.sub_title, content: input.content, }; const response = await docsService.createPage(pageParams); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
- src/services/docs.service.ts:69-86 (helper)Helper method in DocsService that handles the actual HTTP POST request to the ClickUp API endpoint for creating a doc pageasync createPage(params: CreatePageParams): Promise<ClickUpDocPage> { const { docId, name, parent_page_id, sub_title, content } = params; const pageData = { name, parent_page_id: parent_page_id || null, sub_title: sub_title || null, content, content_format: "text/md", }; return this.request<ClickUpDocPage>( `/${this.workspaceId}/docs/${docId}/pages`, { method: "POST", body: JSON.stringify(pageData), } ); }
- src/index.ts:55-62 (registration)The 'createPageTool' is included in the central tools array, which is subsequently registered to the MCP server using server.tool() in a forEach loop// Docs tools searchDocsTool, createDocTool, getDocPagesTool, getPageTool, createPageTool, editPageTool, ];
- src/models/types.ts:70-76 (schema)TypeScript interface defining the parameters for creating a ClickUp page, used in the service layerexport interface CreatePageParams { docId: string; name: string; parent_page_id?: string; sub_title?: string; content: string; }