harvest_time_report
Generate detailed time reports for specific date ranges with optional filtering by user, project, or client to track work hours and analyze productivity.
Instructions
Generate detailed time reports for date ranges. Use about {"tool": "harvest_time_report"} for filtering options and examples.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Start date (YYYY-MM-DD) | |
| to | Yes | End date (YYYY-MM-DD) | |
| user_id | No | Filter by user ID | |
| project_id | No | Filter by project ID | |
| client_id | No | Filter by client ID |
Implementation Reference
- src/harvest-client.ts:161-164 (handler)Core handler function that executes the Harvest API request for the time report using the /reports/time/team endpoint with dynamic query parameters from input.async getTimeReport(options?: any) { const queryString = this.buildQueryString(options); return this.makeRequest(`/reports/time/team${queryString}`); }
- src/index.ts:246-255 (handler)MCP server handler case that processes the tool call, invokes the client method, and formats the JSON response.case 'harvest_time_report': const timeReport = await harvestClient.getTimeReport(typedArgs); return { content: [ { type: 'text', text: JSON.stringify(timeReport, null, 2), }, ], };
- src/tools.ts:181-194 (schema)Tool definition including name, description, and input schema for validation in the MCP server.name: 'harvest_time_report', description: 'Generate detailed time reports for date ranges. Use about {"tool": "harvest_time_report"} for filtering options and examples.', inputSchema: { type: 'object', properties: { from: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, to: { type: 'string', description: 'End date (YYYY-MM-DD)' }, user_id: { type: 'string', description: 'Filter by user ID' }, project_id: { type: 'string', description: 'Filter by project ID' }, client_id: { type: 'string', description: 'Filter by client ID' } }, required: ['from', 'to'] } },
- src/tools.ts:222-222 (registration)The tools array registers all MCP tools including harvest_time_report for server provision.];