get_project_budget_report
Generate project budget reports to track spending versus budgets, monitor project profitability, and identify budget utilization across projects.
Instructions
Generate project budget reports showing spending vs budgets across projects. Helps track project profitability and budget utilization.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| is_active | No | Filter by active projects only | |
| client_id | No | Filter by specific client ID | |
| over_budget | No | Filter by projects that are over budget |
Implementation Reference
- src/tools/reports.ts:56-72 (handler)Handler class for the 'get_project_budget_report' tool, which validates the input using the schema and fetches the report via the Harvest client.
class GetProjectBudgetReportHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const validatedArgs = validateInput(ProjectBudgetReportQuerySchema, args, 'project budget report query'); logger.info('Generating project budget report from Harvest API'); const report = await this.config.harvestClient.getProjectBudgetReport(validatedArgs); return { content: [{ type: 'text', text: JSON.stringify(report, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'get_project_budget_report'); } } } - src/tools/reports.ts:143-158 (registration)Registration definition for the 'get_project_budget_report' tool, including its description, input schema, and the handler instantiation.
{ tool: { name: 'get_project_budget_report', description: 'Generate project budget reports showing spending vs budgets across projects. Helps track project profitability and budget utilization.', inputSchema: { type: 'object', properties: { is_active: { type: 'boolean', description: 'Filter by active projects only' }, client_id: { type: 'number', description: 'Filter by specific client ID' }, over_budget: { type: 'boolean', description: 'Filter by projects that are over budget' }, }, additionalProperties: false, }, }, handler: new GetProjectBudgetReportHandler(config), },