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), }, ], }; }

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