Skip to main content
Glama

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
NameRequiredDescriptionDefault
fromYesStart date for report (YYYY-MM-DD) (required)
toYesEnd date for report (YYYY-MM-DD) (required)
client_idNoFilter by specific client ID
project_idNoFilter by specific project ID

Implementation Reference

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

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/ianaleck/harvest-mcp-server'

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