Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

get_workspaces

Retrieve all workspaces available to the current user from the Clockify time tracking system for project organization and access management.

Instructions

Get all workspaces for the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler method for the 'get_workspaces' tool. It calls the Clockify API to retrieve all workspaces for the current user and returns a formatted text response listing the workspaces with their names and IDs.
    private async getWorkspaces() {
      const workspaces = await this.makeRequest("/workspaces");
      return {
        content: [
          {
            type: "text",
            text: `Found ${workspaces.length} workspace(s):\n${workspaces
              .map((w: Workspace) => `- ${w.name} (${w.id})`)
              .join("\n")}`,
          },
        ],
        isError: false,
      };
    }
  • src/index.ts:262-268 (registration)
    Registration of the 'get_workspaces' tool in the tools list returned by ListToolsRequestSchema. Includes the tool name, description, and empty input schema (no parameters required).
      name: "get_workspaces",
      description: "Get all workspaces for the current user",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:724-725 (registration)
    Dispatch logic in the CallToolRequestSchema handler's switch statement that calls the getWorkspaces handler method when the tool is invoked.
    case "get_workspaces":
      return await this.getWorkspaces();
  • TypeScript interface defining the structure of Workspace objects returned by the Clockify API, used for typing in the handler function.
    interface Workspace {
      id: string;
      name: string;
      hourlyRate?: {
        amount: number;
        currency: 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";
      }>;
      workspaceSettings: {
        timeRoundingInReports: boolean;
        onlyAdminsSeeBillableRates: boolean;
        onlyAdminsCreateProject: boolean;
        onlyAdminsSeeDashboard: boolean;
        defaultBillableProjects: boolean;
        lockTimeEntries?: string;
        round: {
          round: string;
          minutes: string;
        };
        projectFavorites: boolean;
        canSeeTimeSheet: boolean;
        canSeeTracker: boolean;
        projectPickerSpecialFilter: boolean;
        forceProjects: boolean;
        forceTasks: boolean;
        forceTags: boolean;
        forceDescription: boolean;
        onlyAdminsSeeAllTimeEntries: boolean;
        onlyAdminsSeePublicProjectsEntries: boolean;
        trackTimeDownToSecond: boolean;
        projectGroupingLabel: string;
        adminOnlyPages: string[];
        automaticLock?: {
          changeDay: string;
          dayOfMonth: number;
          firstDay: string;
          olderThanPeriod: string;
          olderThanValue: number;
          type: string;
        };
        onlyAdminsCreateTag: boolean;
        onlyAdminsCreateTask: boolean;
        timeTrackingMode: string;
        isProjectPublicByDefault: boolean;
      };
      imageUrl?: string;
      featureSubscriptionType?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieval ('Get all workspaces') but doesn't specify whether this requires authentication, how results are returned (e.g., pagination, format), or any rate limits. The description is minimal and lacks critical operational details.

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, clear sentence with no wasted words. It front-loads the essential information ('Get all workspaces for the current user'), making it highly efficient and easy to parse at a glance.

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 tool's simplicity (0 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what a 'workspace' entails in this context, how the data is structured in response, or any error conditions. For a retrieval tool, more context on output behavior is needed despite the lack of an output schema.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, and the baseline for this scenario is 4, as it avoids unnecessary detail while matching the schema's simplicity.

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 action ('Get') and resource ('all workspaces for the current user'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_projects' or 'get_clients', but the specificity of 'workspaces' and 'current user' provides adequate distinction.

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 like 'get_projects' or 'get_workspace_users'. It states what the tool does but offers no context about prerequisites, timing, or comparison to other retrieval tools in the sibling list.

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