clickup_get_doc_pages
Retrieve pages from a ClickUp document by providing its ID to access content within the workspace.
Instructions
Get pages from a ClickUp doc
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ClickUp doc ID |
Implementation Reference
- src/controllers/docs.controller.ts:83-95 (handler)Defines the 'clickup_get_doc_pages' MCP tool, including input schema, description, and handler function that calls the DocsService to fetch pages and returns JSON response.const getDocPagesTool = defineTool((z) => ({ name: "clickup_get_doc_pages", description: "Get pages from a ClickUp doc", inputSchema: { doc_id: z.string().describe("ClickUp doc ID"), }, handler: async (input) => { const response = await docsService.getDocPages(input.doc_id); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
- src/services/docs.service.ts:57-61 (helper)Core helper method in DocsService that makes the API request to retrieve pages from a specific ClickUp doc.async getDocPages(docId: string): Promise<{ pages: ClickUpDocPage[] }> { return this.request<{ pages: ClickUpDocPage[] }>( `/${this.workspaceId}/docs/${docId}/pageListing` ); }
- src/index.ts:89-91 (registration)Registers all MCP tools, including 'clickup_get_doc_pages', by iterating over the tools array and calling server.tool() with the tool's properties.tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- src/index.ts:12-18 (registration)Imports the getDocPagesTool from docs.controller for registration in the MCP server.searchDocsTool, createDocTool, getDocPagesTool, getPageTool, createPageTool, editPageTool, } from "./controllers/docs.controller";
- src/index.ts:55-62 (registration)Adds getDocPagesTool to the central tools array used for MCP server registration.// Docs tools searchDocsTool, createDocTool, getDocPagesTool, getPageTool, createPageTool, editPageTool, ];