Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

get_workspace_users

Retrieve all users within a specific Clockify workspace to manage team access and permissions.

Instructions

Get all users in a workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID

Implementation Reference

  • src/index.ts:270-279 (registration)
    Registers the 'get_workspace_users' tool in the list of available tools, including its name, description, and input schema requiring 'workspaceId'.
      name: "get_workspace_users",
      description: "Get all users in a workspace",
      inputSchema: {
        type: "object",
        properties: {
          workspaceId: { type: "string", description: "Workspace ID" },
        },
        required: ["workspaceId"],
      },
    },
  • src/index.ts:726-728 (registration)
    Dispatches calls to the 'get_workspace_users' tool handler by invoking getWorkspaceUsers method after input validation.
    case "get_workspace_users":
      if (!args?.workspaceId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId is required');
      return await this.getWorkspaceUsers(args.workspaceId as string);
  • The main handler function that fetches users from the Clockify API endpoint `/workspaces/${workspaceId}/users`, processes them using the User type, and returns a formatted text response listing the users.
    private async getWorkspaceUsers(workspaceId: string | undefined) {
      const users = await this.makeRequest(`/workspaces/${workspaceId}/users`);
      return {
        content: [
          {
            type: "text",
            text: `Found ${users.length} user(s) in workspace:\n${users
              .map((u: User) => `- ${u.name} (${u.email}) - ${u.id}`)
              .join("\n")}`,
          },
        ],
        isError: false,
      };
    }
  • TypeScript interface defining the User object structure used in processing the API response for workspace users.
    interface User {
      id: string;
      email: string;
      name: string;
      memberships: Array<{
        userId: string;
        hourlyRate?: {
          amount: number;
          currency: string;
        };
        costRate?: {
          amount: number;
          currency: string;
        };
        targetId: string;
        membershipType: "WORKSPACE" | "PROJECT";
        membershipStatus: "PENDING" | "ACTIVE" | "DECLINED" | "INACTIVE";
      }>;
      profilePicture?: string;
      activeWorkspace: string;
      defaultWorkspace: string;
      settings: {
        weekStart: string;
        timeZone: string;
        timeFormat: string;
        dateFormat: string;
        sendNewsletter: boolean;
        weeklyUpdates: boolean;
        longRunning: boolean;
        timeTrackingManual: boolean;
        summaryReportSettings: {
          group: string;
          subgroup: string;
        };
        isCompactViewOn: boolean;
        dashboardSelection: string;
        dashboardViewType: string;
        dashboardPinToTop: boolean;
        projectListCollapse: number;
        collapseAllProjectLists: boolean;
        groupSimilarEntriesDisabled: boolean;
        myStartOfDay: string;
        projectPickerTaskFilter: boolean;
        lang: string;
        multiFactorEnabled: boolean;
        theme: string;
        scheduling: boolean;
        onboarding: boolean;
        pto: boolean;
      };
      status: string;
      customFields: Array<{
        customFieldId: string;
        sourceType: string;
        value: string;
      }>;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but lacks details on permissions, rate limits, pagination, or response format. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves and what to expect from its execution.

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?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part earns its place by directly conveying the tool's function, making it easy to parse and understand quickly. It avoids redundancy and stays focused on the essential information.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns a list of users. It doesn't explain what data is returned, how results are structured, or any limitations (e.g., max users per call). For a read operation with no structured support, more contextual details are needed to guide effective use.

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?

The description implies a 'workspaceId' parameter by mentioning 'in a workspace', but doesn't add meaning beyond the schema's 100% coverage. The schema already documents the single required parameter with a clear description. Since schema coverage is high, the baseline is 3, and the description doesn't compensate with extra details like format examples or constraints.

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 verb ('Get') and resource ('all users in a workspace'), making the purpose immediately understandable. It distinguishes from siblings like 'get_current_user' (individual) and 'get_workspaces' (different resource), though it doesn't explicitly contrast with them. The specificity is good but could be slightly enhanced for full sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a workspace ID), exclusions, or comparisons to similar tools like 'get_clients' or 'get_current_user'. Without such context, the agent must infer usage from the name alone, which is insufficient for optimal tool selection.

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/ratheesh-aot/clockify-mcp'

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