get_uninvoiced_report
Identify billable work that hasn't been invoiced yet by generating reports of uninvoiced time and expenses within a specified date range.
Instructions
Generate reports of uninvoiced time and expenses within a date range. Essential for identifying billable work that hasn't been invoiced yet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Start date for report (YYYY-MM-DD) (required) | |
| to | Yes | End date for report (YYYY-MM-DD) (required) | |
| client_id | No | Filter by specific client ID | |
| project_id | No | Filter by specific project ID |
Implementation Reference
- src/tools/reports.ts:74-90 (handler)The GetUninvoicedReportHandler class handles the execution logic for the 'get_uninvoiced_report' tool, including input validation and calling the Harvest API client.
class GetUninvoicedReportHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const validatedArgs = validateInput(UninvoicedReportQuerySchema, args, 'uninvoiced report query'); logger.info('Generating uninvoiced report from Harvest API'); const report = await this.config.harvestClient.getUninvoicedReport(validatedArgs); return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'get_uninvoiced_report'); } } } - src/tools/reports.ts:160-176 (registration)Registration of the 'get_uninvoiced_report' tool, defining its schema and assigning the GetUninvoicedReportHandler.
tool: { name: 'get_uninvoiced_report', description: 'Generate reports of uninvoiced time and expenses within a date range. Essential for identifying billable work that hasn\'t been invoiced yet.', inputSchema: { type: 'object', properties: { from: { type: 'string', format: 'date', description: 'Start date for report (YYYY-MM-DD) (required)' }, to: { type: 'string', format: 'date', description: 'End date for report (YYYY-MM-DD) (required)' }, client_id: { type: 'number', description: 'Filter by specific client ID' }, project_id: { type: 'number', description: 'Filter by specific project ID' }, }, required: ['from', 'to'], additionalProperties: false, }, }, handler: new GetUninvoicedReportHandler(config), },