Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

get_tasks

Retrieve all tasks within a Clockify project to manage work items, filter by active status or name, and organize project activities.

Instructions

Get all tasks in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
projectIdYesProject ID
isActiveNoFilter by active status
nameNoFilter by task name
pageNoPage number (default: 1)
pageSizeNoPage size (default: 50, max: 5000)

Implementation Reference

  • The handler function for the 'get_tasks' tool. It extracts workspaceId and projectId from arguments, builds query parameters for optional filters, calls the Clockify API endpoint `/workspaces/{workspaceId}/projects/{projectId}/tasks`, retrieves the tasks, and returns a formatted text response listing the tasks with their names, IDs, status, and estimates.
    private async getTasks(args: any) {
      const { workspaceId, projectId, ...params } = args;
    
      const queryParams = new URLSearchParams();
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined && value !== null) {
          queryParams.append(key, String(value));
        }
      });
    
      const endpoint = queryParams.toString()
        ? `/workspaces/${workspaceId}/projects/${projectId}/tasks?${queryParams.toString()}`
        : `/workspaces/${workspaceId}/projects/${projectId}/tasks`;
    
      const tasks = await this.makeRequest(endpoint);
    
      return {
        content: [
          {
            type: "text",
            text: `Found ${tasks.length} task(s):\n${tasks
              .map((t: any) => `- ${t.name} (${t.id}) | Status: ${t.status} | Estimate: ${t.estimate || "None"}`)
              .join("\n")}`,
          },
        ],
        isError: false,
      };
    }
  • src/index.ts:490-505 (registration)
    The tool registration in the list of tools returned by ListToolsRequestSchema, including the name 'get_tasks', description, and input schema defining required workspaceId and projectId, with optional filters.
    {
      name: "get_tasks",
      description: "Get all tasks in a project",
      inputSchema: {
        type: "object",
        properties: {
          workspaceId: { type: "string", description: "Workspace ID" },
          projectId: { type: "string", description: "Project ID" },
          isActive: { type: "boolean", description: "Filter by active status" },
          name: { type: "string", description: "Filter by task name" },
          page: { type: "number", description: "Page number (default: 1)" },
          pageSize: { type: "number", description: "Page size (default: 50, max: 5000)" },
        },
        required: ["workspaceId", "projectId"],
      },
    },
  • src/index.ts:771-773 (registration)
    The dispatch case in the CallToolRequestSchema handler that validates required parameters and calls the getTasks method for the 'get_tasks' tool.
    case "get_tasks":
      if (!args?.workspaceId || !args?.projectId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and projectId are required');
      return await this.getTasks(args as any);
  • TypeScript interface defining the structure of a Task object used in the codebase, matching the expected API response.
    interface Task {
      id?: string;
      name: string;
      projectId: string;
      assigneeIds?: string[];
      estimate?: string;
      status?: "ACTIVE" | "DONE";
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Get all tasks' implies a read operation, but doesn't disclose pagination behavior (implied by page/pageSize parameters but not described), rate limits, authentication needs, whether it returns archived/inactive tasks by default, or what the response format looks like. The description is minimal and lacks behavioral context beyond the basic action.

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 with zero wasted words. It's appropriately sized for a straightforward list operation and front-loads the core purpose immediately.

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?

For a tool with 6 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain the filtering logic (how isActive and name interact), pagination behavior, response format, or error conditions. The agent would need to infer much from the parameter schema alone, which is insufficient for confident tool invocation.

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 fully documents all 6 parameters. The description adds no additional parameter information beyond what's in the schema. It mentions 'all tasks in a project' which aligns with required parameters workspaceId and projectId, but provides no extra semantic context about filtering logic or parameter interactions.

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 'Get all tasks in a project' clearly states the action (get) and resource (tasks), with scope (in a project). It distinguishes from sibling tools like 'get_task' (singular) and 'get_time_entries', but doesn't explicitly differentiate from other list operations like 'get_clients' or 'get_tags' beyond the resource name.

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 when to use 'get_tasks' versus 'get_task' (singular), 'get_time_entries' (which might include task information), or other filtering/list tools. No prerequisites, exclusions, or comparative context is provided.

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