Skip to main content
Glama

getSummaryReport

Generate summary reports of hours worked by users and projects within specified date ranges, with optional filtering by user IDs or project IDs.

Instructions

Get a summary report of hours by user/project for a date range. Optional: userIds, projectIds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startYesStart date (ISO8601)
endYesEnd date (ISO8601)
userIdsNoArray of user IDs (optional)
projectIdsNoArray of project IDs (optional)

Implementation Reference

  • Registration of the 'getSummaryReport' tool in listToolsHandler, including name, description, and input schema definition.
    {
      name: "getSummaryReport",
      description:
        "Get a summary report of hours by user/project for a date range. Optional: userIds, projectIds.",
      inputSchema: {
        type: "object",
        properties: {
          start: { type: "string", description: "Start date (ISO8601)" },
          end: { type: "string", description: "End date (ISO8601)" },
          userIds: {
            type: "array",
            items: { type: "string" },
            description: "Array of user IDs (optional)",
          },
          projectIds: {
            type: "array",
            items: { type: "string" },
            description: "Array of project IDs (optional)",
          },
        },
        required: ["start", "end"],
      },
    },
  • Handler implementation in callToolHandler switch statement. Extracts parameters, validates start/end dates, constructs POST body for Clockify summary reports API, fetches the report, and returns it as JSON text content.
    case "getSummaryReport": {
      const { start, end, userIds, projectIds } =
        request.params.arguments || {};
      if (!start || !end) {
        throw new Error("start and end are required");
      }
      const body = {
        dateRangeStart: start,
        dateRangeEnd: end,
        users: Array.isArray(userIds) ? userIds : undefined,
        projects: Array.isArray(projectIds) ? projectIds : undefined,
        summaryFilter: {},
        sortOrder: "ASCENDING",
        groups: ["USER", "PROJECT"],
      };
      const report = await clockifyFetch(
        `/workspaces/${workspaceId}/reports/summary`,
        {
          method: "POST",
          body: JSON.stringify(body),
        },
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(report, null, 2),
          },
        ],
      };
    }
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. It states the tool retrieves a summary report but does not disclose behavioral traits like whether it's read-only, requires authentication, has rate limits, or what the output format is. This is a significant gap for a tool with no annotation coverage.

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 and includes key optional parameters. There is no wasted text, making it appropriately sized and easy to parse.

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 complexity of a reporting tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects, output format, and usage context, which are crucial for an AI agent to effectively invoke the tool without additional assumptions.

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 already documents all parameters (start, end, userIds, projectIds) with descriptions. The description adds marginal value by mentioning the optional nature of userIds and projectIds, but does not provide additional semantics beyond what the schema specifies, aligning with the baseline for high coverage.

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 ('summary report of hours by user/project'), specifying what the tool does. However, it does not explicitly differentiate from sibling tools like 'getTimeEntries' or 'getUserTimeEntries', which might also retrieve time-related data, so it misses full sibling 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 such as 'getTimeEntries' or 'getUserTimeEntries'. It mentions optional parameters but does not specify contexts, prerequisites, or exclusions for usage, leaving the agent without clear direction.

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

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