Skip to main content
Glama

getSummaryReport

Generate a summary report of hours worked by users or projects within a specified date range. Optionally filter by specific user IDs or project IDs for detailed insights.

Instructions

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

Input Schema

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

Implementation Reference

  • Main execution logic for the getSummaryReport tool within the callToolHandler switch statement. Constructs a POST request to Clockify's summary reports endpoint using provided date range and optional user/project filters, then returns the formatted JSON response.
    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), }, ], }; }
  • Input schema definition for the getSummaryReport tool, specifying required start/end dates and optional arrays of 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"], },
  • Registration of the getSummaryReport tool in the listToolsHandler function, including name, description, and input schema.
    { 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"], }, }, {
  • src/index.ts:43-43 (registration)
    Registers the listToolsHandler on the MCP server, which exposes the getSummaryReport tool among others.
    server.setRequestHandler(ListToolsRequestSchema, listToolsHandler);
  • src/index.ts:49-49 (registration)
    Registers the callToolHandler on the MCP server, which handles execution of getSummaryReport and other tools.
    server.setRequestHandler(CallToolRequestSchema, callToolHandler);

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