delete_estimate
Permanently delete an estimate from Harvest time tracking. This action cannot be undone. Provide the estimate ID to remove it from the system.
Instructions
Delete an estimate permanently. This action cannot be undone.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| estimate_id | Yes | The ID of the estimate to delete |
Implementation Reference
- src/tools/estimates.ts:94-112 (handler)The DeleteEstimateHandler class implements the logic for deleting an estimate. It validates the estimate_id input and calls the harvestClient to perform the deletion.
class DeleteEstimateHandler implements ToolHandler { constructor(private readonly config: BaseToolConfig) {} async execute(args: Record<string, any>): Promise<CallToolResult> { try { const inputSchema = z.object({ estimate_id: z.number().int().positive() }); const { estimate_id } = validateInput(inputSchema, args, 'delete estimate'); logger.info('Deleting estimate via Harvest API', { estimateId: estimate_id }); await this.config.harvestClient.deleteEstimate(estimate_id); return { content: [{ type: 'text', text: JSON.stringify({ message: `Estimate ${estimate_id} deleted successfully` }, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'delete_estimate'); } } } - src/tools/estimates.ts:198-212 (registration)The delete_estimate tool is registered in registerEstimateTools within src/tools/estimates.ts, associating the name 'delete_estimate' with the DeleteEstimateHandler instance.
{ tool: { name: 'delete_estimate', description: 'Delete an estimate permanently. This action cannot be undone.', inputSchema: { type: 'object', properties: { estimate_id: { type: 'number', description: 'The ID of the estimate to delete' }, }, required: ['estimate_id'], additionalProperties: false, }, }, handler: new DeleteEstimateHandler(config), },