Skip to main content
Glama
ratheesh-aot

Clockify MCP Server

by ratheesh-aot

get_summary_report

Generate summary time tracking reports from Clockify data by filtering users, projects, clients, and date ranges, then export in multiple formats.

Instructions

Generate a summary time tracking report

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdYesWorkspace ID
dateRangeStartYesStart date (ISO 8601 format)
dateRangeEndYesEnd date (ISO 8601 format)
usersNoArray of user IDs to filter
clientsNoArray of client IDs to filter
projectsNoArray of project IDs to filter
tasksNoArray of task IDs to filter
tagsNoArray of tag IDs to filter
billableNoFilter by billable status
groupsNoGroup by fields (USER, PROJECT, CLIENT, etc.)
sortColumnNoSort column
sortOrderNoSort order
exportTypeNoExport format

Implementation Reference

  • The handler function that implements the get_summary_report tool. It constructs a payload for the Clockify summary reports API, sends a POST request to /reports/summary, and returns a formatted summary of the report.
      private async getSummaryReport(args: any) {
        const { workspaceId, ...reportData } = args;
    
        const payload = {
          dateRangeStart: reportData.dateRangeStart,
          dateRangeEnd: reportData.dateRangeEnd,
          summaryFilter: {
            groups: reportData.groups || ["PROJECT"],
            sortColumn: reportData.sortColumn || "DURATION",
            sortOrder: reportData.sortOrder || "DESCENDING",
          },
          users: reportData.users ? { ids: reportData.users } : undefined,
          clients: reportData.clients ? { ids: reportData.clients } : undefined,
          projects: reportData.projects ? { ids: reportData.projects } : undefined,
          tasks: reportData.tasks ? { ids: reportData.tasks } : undefined,
          tags: reportData.tags ? { ids: reportData.tags } : undefined,
          billable: reportData.billable,
          exportType: reportData.exportType || "JSON",
        };
    
        // Remove undefined properties
        Object.keys(payload).forEach(key => {
          if (payload[key as keyof typeof payload] === undefined) {
            delete payload[key as keyof typeof payload];
          }
        });
    
        const report = await this.makeRequest(
          `/workspaces/${workspaceId}/reports/summary`,
          "POST",
          payload,
          "https://reports.api.clockify.me/v1"
        );
    
        const summary = `Summary Report:
    Groups: ${reportData.groups?.join(", ") || "PROJECT"}
    Total Duration: ${report.totals?.[0]?.totalTime || "0:00:00"}
    Date Range: ${reportData.dateRangeStart} to ${reportData.dateRangeEnd}
    Group Count: ${report.groupOne?.length || 0}`;
    
        return {
          content: [
            {
              type: "text",
              text: summary,
            },
          ],
          isError: false,
        };
      }
  • The input schema defining parameters for the get_summary_report tool, including required workspaceId, date range, and optional filters.
    inputSchema: {
      type: "object",
      properties: {
        workspaceId: { type: "string", description: "Workspace ID" },
        dateRangeStart: { type: "string", description: "Start date (ISO 8601 format)" },
        dateRangeEnd: { type: "string", description: "End date (ISO 8601 format)" },
        users: { type: "array", items: { type: "string" }, description: "Array of user IDs to filter" },
        clients: { type: "array", items: { type: "string" }, description: "Array of client IDs to filter" },
        projects: { type: "array", items: { type: "string" }, description: "Array of project IDs to filter" },
        tasks: { type: "array", items: { type: "string" }, description: "Array of task IDs to filter" },
        tags: { type: "array", items: { type: "string" }, description: "Array of tag IDs to filter" },
        billable: { type: "boolean", description: "Filter by billable status" },
        groups: { type: "array", items: { type: "string" }, description: "Group by fields (USER, PROJECT, CLIENT, etc.)" },
        sortColumn: { type: "string", description: "Sort column" },
        sortOrder: { type: "string", enum: ["ASCENDING", "DESCENDING"], description: "Sort order" },
        exportType: { type: "string", enum: ["JSON", "PDF", "CSV", "XLSX"], description: "Export format" },
      },
      required: ["workspaceId", "dateRangeStart", "dateRangeEnd"],
    },
  • src/index.ts:690-712 (registration)
    Tool registration in the list of available tools, including name, description, and input schema.
    {
      name: "get_summary_report",
      description: "Generate a summary time tracking report",
      inputSchema: {
        type: "object",
        properties: {
          workspaceId: { type: "string", description: "Workspace ID" },
          dateRangeStart: { type: "string", description: "Start date (ISO 8601 format)" },
          dateRangeEnd: { type: "string", description: "End date (ISO 8601 format)" },
          users: { type: "array", items: { type: "string" }, description: "Array of user IDs to filter" },
          clients: { type: "array", items: { type: "string" }, description: "Array of client IDs to filter" },
          projects: { type: "array", items: { type: "string" }, description: "Array of project IDs to filter" },
          tasks: { type: "array", items: { type: "string" }, description: "Array of task IDs to filter" },
          tags: { type: "array", items: { type: "string" }, description: "Array of tag IDs to filter" },
          billable: { type: "boolean", description: "Filter by billable status" },
          groups: { type: "array", items: { type: "string" }, description: "Group by fields (USER, PROJECT, CLIENT, etc.)" },
          sortColumn: { type: "string", description: "Sort column" },
          sortOrder: { type: "string", enum: ["ASCENDING", "DESCENDING"], description: "Sort order" },
          exportType: { type: "string", enum: ["JSON", "PDF", "CSV", "XLSX"], description: "Export format" },
        },
        required: ["workspaceId", "dateRangeStart", "dateRangeEnd"],
      },
    },
  • src/index.ts:813-816 (registration)
    Dispatch/registration in the CallToolRequestSchema handler switch statement that routes calls to the getSummaryReport method.
    case "get_detailed_report":
      return await this.getDetailedReport(args);
    case "get_summary_report":
      return await this.getSummaryReport(args);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. 'Generate' implies a read operation that creates output, but there's no mention of permissions required, rate limits, whether the operation is idempotent, what happens with large date ranges, or the nature of the generated output. For a 13-parameter tool with no annotation coverage, this represents a significant behavioral transparency gap.

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 what it communicates and front-loads the essential information. Every word earns its place, making this an excellent example of conciseness despite the overall descriptive shortcomings.

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 complexity (13 parameters, no output schema, no annotations), the description is inadequate. It doesn't explain what a 'summary' report contains versus a 'detailed' report, doesn't mention output format implications (despite the exportType parameter), and provides no behavioral context. For a reporting tool with extensive filtering capabilities, the description should do more to help an agent understand when and how to use it effectively.

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 input schema has 100% description coverage, providing clear documentation for all 13 parameters. The description adds no parameter-specific information beyond what's already in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description. The description doesn't compensate but doesn't need to given the comprehensive schema.

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

Purpose3/5

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

The description 'Generate a summary time tracking report' clearly states the verb ('generate') and resource ('summary time tracking report'), making the purpose understandable. However, it doesn't distinguish this tool from sibling 'get_detailed_report' - both appear to generate reports, so the distinction between 'summary' and 'detailed' isn't explained. This makes it adequate but with clear gaps in 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 about when to use this tool versus alternatives. With sibling tools like 'get_detailed_report' and 'get_time_entries' available, there's no indication of when a summary report is preferable to a detailed report or raw time entries. The description lacks any context about appropriate use cases, prerequisites, or exclusions.

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