get_estimate
Retrieve a specific estimate by ID with complete details including line items, terms, and client information from Harvest time tracking.
Instructions
Retrieve a specific estimate by ID with complete details including line items, terms, and client information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| estimate_id | Yes | The ID of the estimate to retrieve |
Implementation Reference
- src/tools/estimates.ts:38-56 (handler)The handler class that executes the 'get_estimate' tool logic by calling the Harvest API.
class GetEstimateHandler 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, 'get estimate'); logger.info('Fetching estimate from Harvest API', { estimateId: estimate_id }); const estimate = await this.config.harvestClient.getEstimate(estimate_id); return { content: [{ type: 'text', text: JSON.stringify(estimate, null, 2) }], }; } catch (error) { return handleMCPToolError(error, 'get_estimate'); } } } - src/tools/estimates.ts:136-150 (registration)The registration block for the 'get_estimate' tool within the tool registration function.
{ tool: { name: 'get_estimate', description: 'Retrieve a specific estimate by ID with complete details including line items, terms, and client information.', inputSchema: { type: 'object', properties: { estimate_id: { type: 'number', description: 'The ID of the estimate to retrieve' }, }, required: ['estimate_id'], additionalProperties: false, }, }, handler: new GetEstimateHandler(config), },