Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

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
NameRequiredDescriptionDefault
doc_idYesClickUp doc ID

Implementation Reference

  • 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) }], }; }, }));
  • 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, ];

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/Leanware-io/clickup-mcp-server'

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