Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

clickup_create_doc

Create new documents in ClickUp workspaces with specified parent locations and visibility settings to organize project documentation.

Instructions

Create a new doc in ClickUp

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
create_pageNoWhether to create a initial page (false by default)
nameYesThe name of the new Doc
parentYesParent object
visibilityNoDoc visibility (PUBLIC or PRIVATE), PRIVATE by default

Implementation Reference

  • Registration of the 'clickup_create_doc' tool including name, Zod input schema, description, and handler function that delegates to DocsService.createDoc
    const createDocTool = defineTool((z) => ({ name: "clickup_create_doc", description: "Create a new doc in ClickUp", inputSchema: { name: z.string().describe("The name of the new Doc"), parent: z .object({ id: z.string().describe("Parent ID"), type: z .number() .describe( "Parent type: 4 for Space, 5 for Folder, 6 for List, 7 for Everything, 12 for Workspace" ), }) .describe("Parent object"), visibility: z .string() .optional() .describe("Doc visibility (PUBLIC or PRIVATE), PRIVATE by default"), create_page: z .boolean() .optional() .describe("Whether to create a initial page (false by default)"), }, handler: async (input) => { const docParams: CreateDocParams = { name: input.name, parent: input.parent, visibility: input.visibility, create_page: input.create_page, }; const response = await docsService.createDoc(docParams); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
  • Core implementation of doc creation: prepares request data and makes POST API call to ClickUp /docs endpoint
    async createDoc(params: CreateDocParams): Promise<ClickUpDoc> { const docData = { name: params.name, parent: params.parent, visibility: params.visibility || "PRIVATE", create_page: params.create_page !== undefined ? params.create_page : false, }; return this.request<ClickUpDoc>(`/${this.workspaceId}/docs`, { method: "POST", body: JSON.stringify(docData), }); }
  • src/index.ts:56-61 (registration)
    Includes createDocTool in the array of tools to be registered to the MCP server
    searchDocsTool, createDocTool, getDocPagesTool, getPageTool, createPageTool, editPageTool,
  • TypeScript interface defining the CreateDocParams used by the createDoc service method
    export interface CreateDocParams { name: string; parent: { id: string; type: number; // 4 for Space, 5 for Folder, 6 for List, 7 for Everything, 12 for Workspace }; visibility?: string; // "PRIVATE" by default create_page?: boolean; // false by default }
  • Helper request method used by createDoc to perform authenticated API calls to ClickUp
    private async request<T>( endpoint: string, options: RequestInit = {} ): Promise<T> { const response = await fetch(`${BASE_URL}${endpoint}`, { ...options, headers: this.headers, }); return response.json(); }

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