Skip to main content
Glama

get_workspaces

List all accessible ClickUp workspaces, returning IDs, names, and metadata for the authenticated user.

Instructions

Get a list of all ClickUp workspaces accessible to the authenticated user. Returns workspace IDs, names, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'get_workspaces'. Registered with server.tool(), calls authClient.getWorkspaces() and returns the result as JSON text content.
    server.tool(
      'get_workspaces',
      'Get a list of all ClickUp workspaces accessible to the authenticated user. Returns workspace IDs, names, and metadata.',
      {},
      async () => {
        try {
          const result = await authClient.getWorkspaces();
          return {
            content: [{ type: 'text', text: JSON.stringify(result.teams, null, 2) }]
          };
        } catch (error: any) {
          console.error('Error getting workspaces:', error);
          return {
            content: [{ type: 'text', text: `Error getting workspaces: ${error.message}` }],
            isError: true
          };
        }
      }
    );
  • Tool registration via server.tool('get_workspaces', description, empty schema {}, async handler). The setupTaskTools function registers this tool on the McpServer.
    server.tool(
      'get_workspaces',
      'Get a list of all ClickUp workspaces accessible to the authenticated user. Returns workspace IDs, names, and metadata.',
      {},
      async () => {
        try {
          const result = await authClient.getWorkspaces();
          return {
            content: [{ type: 'text', text: JSON.stringify(result.teams, null, 2) }]
          };
        } catch (error: any) {
          console.error('Error getting workspaces:', error);
          return {
            content: [{ type: 'text', text: `Error getting workspaces: ${error.message}` }],
            isError: true
          };
        }
      }
    );
  • Input schema for 'get_workspaces' — an empty object {} (no parameters required).
    {},
  • The underlying getWorkspaces() method on AuthClient. Calls the ClickUp API GET /team endpoint to fetch all workspaces (teams) accessible to the authenticated user. Returns { teams: Workspace[] }.
    async getWorkspaces(): Promise<{ teams: Workspace[] }> {
      try {
        return await this.client.get('/team');
      } catch (error) {
        console.error('Error getting workspaces:', error);
        throw error;
      }
    }
  • Workspace interface definition: id, name, color, avatar, and members array with user info and role.
    export interface Workspace {
      id: string;
      name: string;
      color: string;
      avatar: string;
      members: Array<{
        user: {
          id: number;
          username: string;
          email: string;
          color: string;
          profilePicture: string;
        };
        role: number;
        custom_role?: string;
      }>;
    }
Behavior4/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 clearly indicates this is a read operation for the authenticated user's accessible workspaces and specifies return data. However, it does not disclose potential throttling or authorization details beyond implication.

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

Conciseness5/5

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

A single, front-loaded sentence that efficiently conveys purpose and output without wasted words. Every element serves a purpose.

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

Completeness4/5

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

For a simple list tool with no parameters or output schema, the description adequately covers purpose and return data. It implies all accessible workspaces are returned, but it could optionally mention data limits or pagination.

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

Parameters4/5

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

There are no parameters, so the schema coverage is 100%. The description adds value by explaining the return data, consistent with the baseline score for parameterless tools.

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

Purpose5/5

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

The description clearly states the tool retrieves a list of all ClickUp workspaces for the authenticated user, specifying the returned data (IDs, names, metadata). It distinguishes from sibling tools which manage tasks, lists, folders, etc.

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

Usage Guidelines3/5

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

The description implies usage when workspace information is needed but lacks explicit guidance on when to use versus alternatives, such as when to use get_workspace_seats or workspace-specific queries. No exclusions or prerequisites are mentioned.

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

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