clickup_search_docs
Search for documents within a specific ClickUp workspace, folder, list, or space using parent type and ID parameters.
Instructions
Search for docs in a specific parent
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_type | Yes | Type of parent (SPACE, FOLDER, LIST, EVERYTHING, WORKSPACE) | |
| parent_id | Yes | ID of the parent |
Implementation Reference
- src/controllers/docs.controller.ts:33-42 (handler)The handler function for the 'clickup_search_docs' tool. It constructs SearchDocsParams from input and delegates to docsService.searchDocs, returning the JSON-stringified response.handler: async (input) => { const params: SearchDocsParams = { parent_type: input.parent_type, parent_id: input.parent_id, }; const response = await docsService.searchDocs(params); return { content: [{ type: "text", text: JSON.stringify(response) }], }; },
- src/services/docs.service.ts:35-40 (helper)The core helper method in DocsService that performs the HTTP GET request to the ClickUp API to search for docs in the specified parent.async searchDocs(params: SearchDocsParams): Promise<{ docs: ClickUpDoc[] }> { const { parent_type, parent_id } = params; return this.request<{ docs: ClickUpDoc[] }>( `/${this.workspaceId}/docs?parent_type=${parent_type}&parent_id=${parent_id}` ); }
- Zod input schema defining the parameters for the tool: parent_type and parent_id.inputSchema: { parent_type: z .string() .describe("Type of parent (SPACE, FOLDER, LIST, EVERYTHING, WORKSPACE)"), parent_id: z.string().describe("ID of the parent"), },
- src/index.ts:89-91 (registration)Registration of all tools, including clickup_search_docs, to the MCP server by iterating over the tools array and calling server.tool.tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- src/index.ts:55-56 (registration)Inclusion of the searchDocsTool in the central tools array used for MCP server registration.// Docs tools searchDocsTool,