Skip to main content
Glama
windalfin

ClickUp MCP Server

by windalfin

get_folder

Retrieve folder details including name, status, and metadata to understand folder structure before creating or updating lists in ClickUp workspaces.

Instructions

Retrieve details about a specific folder including name, status, and metadata. Valid parameter combinations:

  1. Use folderId alone (preferred)

  2. Use folderName + (spaceId or spaceName)

Helps you understand folder structure before creating or updating lists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderIdNoID of folder to retrieve (preferred). Use this instead of folderName if you have it.
folderNameNoName of folder to retrieve. When using this, you MUST also provide spaceId or spaceName.
spaceIdNoID of space containing the folder (required with folderName). Use this instead of spaceName if you have it.
spaceNameNoName of space containing the folder (required with folderName). Only use if you don't have spaceId.

Implementation Reference

  • Handler function that executes the get_folder tool: resolves folderId from name if needed, fetches folder details via folderService.getFolder, and returns formatted JSON response.
    export async function handleGetFolder(parameters: any) {
      const { folderId, folderName, spaceId, spaceName } = parameters;
      
      let targetFolderId = folderId;
      
      // If no folderId provided but folderName is, look up the folder ID
      if (!targetFolderId && folderName) {
        let targetSpaceId = spaceId;
        
        // If no spaceId provided but spaceName is, look up the space ID first
        if (!targetSpaceId && spaceName) {
          const spaceIdResult = await workspaceService.findSpaceByName(spaceName);
          if (!spaceIdResult) {
            throw new Error(`Space "${spaceName}" not found`);
          }
          targetSpaceId = spaceIdResult.id;
        }
        
        if (!targetSpaceId) {
          throw new Error("Either spaceId or spaceName must be provided when using folderName");
        }
        
        const folderResult = await folderService.findFolderByName(targetSpaceId, folderName);
        if (!folderResult) {
          throw new Error(`Folder "${folderName}" not found in space`);
        }
        targetFolderId = folderResult.id;
      }
      
      if (!targetFolderId) {
        throw new Error("Either folderId or folderName must be provided");
      }
    
      try {
        // Get the folder
        const folder = await folderService.getFolder(targetFolderId);
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(
              {
                id: folder.id,
                name: folder.name,
                lists: folder.lists.map((list: any) => ({
                  id: list.id,
                  name: list.name
                })),
                space: {
                  id: folder.space.id,
                  name: folder.space.name
                }
              },
              null,
              2
            )
          }]
        };
      } catch (error: any) {
        throw new Error(`Failed to retrieve folder: ${error.message}`);
      }
    }
  • Tool definition including name, description, and inputSchema for validating get_folder parameters.
    export const getFolderTool = {
      name: "get_folder",
      description: "Retrieve details about a specific folder including name, status, and metadata. Valid parameter combinations:\n1. Use folderId alone (preferred)\n2. Use folderName + (spaceId or spaceName)\n\nHelps you understand folder structure before creating or updating lists.",
      inputSchema: {
        type: "object",
        properties: {
          folderId: {
            type: "string",
            description: "ID of folder to retrieve (preferred). Use this instead of folderName if you have it."
          },
          folderName: {
            type: "string",
            description: "Name of folder to retrieve. When using this, you MUST also provide spaceId or spaceName."
          },
          spaceId: {
            type: "string",
            description: "ID of space containing the folder (required with folderName). Use this instead of spaceName if you have it."
          },
          spaceName: {
            type: "string",
            description: "Name of space containing the folder (required with folderName). Only use if you don't have spaceId."
          }
        },
        required: []
      }
    };
  • src/server.ts:67-93 (registration)
    Registration of getFolderTool in the list of available tools returned by ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          workspaceHierarchyTool,
          createTaskTool,
          getTaskTool,
          getTasksTool,
          updateTaskTool,
          moveTaskTool,
          duplicateTaskTool,
          deleteTaskTool,
          createBulkTasksTool,
          updateBulkTasksTool,
          moveBulkTasksTool,
          deleteBulkTasksTool,
          createListTool,
          createListInFolderTool,
          getListTool,
          updateListTool,
          deleteListTool,
          createFolderTool,
          getFolderTool,
          updateFolderTool,
          deleteFolderTool
        ]
      };
    });
  • src/server.ts:136-137 (registration)
    Registration in CallToolRequest switch statement that routes 'get_folder' calls to handleGetFolder.
    case "get_folder":
      return handleGetFolder(params);
  • FolderService.getFolder helper method called by the handler to fetch folder data from ClickUp API.
    async getFolder(folderId: string): Promise<ClickUpFolder> {
      try {
        this.logOperation('getFolder', { folderId });
        
        const response = await this.client.get<ClickUpFolder>(
          `/folder/${folderId}`
        );
        
        return response.data;
      } catch (error) {
        throw this.handleError(error, `Failed to get folder ${folderId}`);
      }
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It describes the tool as a retrieval operation ('retrieve details'), which implies read-only behavior. It adds useful context about parameter combinations and the tool's purpose in understanding folder structure. However, it doesn't disclose important behavioral traits like whether this requires authentication, rate limits, error conditions, or what happens with invalid parameters. The description doesn't contradict any annotations since none exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences. The first sentence states the core purpose, and the second provides usage guidance. The parameter combination details are presented in a clear bullet-like format. There's minimal waste, though the second sentence could be slightly more concise. Overall, it's well-structured and front-loaded with the main purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters with 100% schema coverage but no annotations and no output schema, the description provides adequate but incomplete context. It explains the tool's purpose and usage context, but doesn't describe what the return values look like (no output schema exists) or important behavioral aspects like error handling. For a read operation with good schema coverage, this is minimally viable but has clear gaps in behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all 4 parameters. The description adds some value by explaining valid parameter combinations and stating folderId is 'preferred,' but doesn't provide additional semantic meaning beyond what's in the schema descriptions. It doesn't explain why certain combinations are required or the implications of choosing one parameter over another. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Retrieve details about a specific folder including name, status, and metadata.' This specifies the verb ('retrieve'), resource ('folder'), and scope of information returned. It distinguishes from siblings like get_list or get_task by focusing on folders, but doesn't explicitly contrast with get_workspace_hierarchy which might also provide folder information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Helps you understand folder structure before creating or updating lists.' This gives clear context about its preparatory role. It also outlines valid parameter combinations, indicating when to use folderId vs folderName+space combinations. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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