harvest_delete_time_entry
Remove a specific time entry from Harvest time tracking by providing its unique ID. This tool helps maintain accurate records by deleting incorrect or duplicate entries.
Instructions
Delete a time entry. Use about {"tool": "harvest_delete_time_entry"} for detailed usage and warnings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Time entry ID to delete |
Implementation Reference
- src/index.ts:117-126 (handler)The MCP server handler for the tool. It calls the HarvestClient's deleteTimeEntry method with the provided ID and returns a success message.case 'harvest_delete_time_entry': await harvestClient.deleteTimeEntry(typedArgs.id as string); return { content: [ { type: 'text', text: `Time entry ${typedArgs.id} deleted successfully`, }, ], };
- src/harvest-client.ts:97-101 (helper)The core implementation that makes the DELETE request to Harvest API /time_entries/{id} using the private makeRequest method.async deleteTimeEntry(id: string) { return this.makeRequest(`/time_entries/${id}`, { method: 'DELETE', }); }
- src/tools.ts:51-61 (schema)Tool schema definition including name, description, and input schema validation (requires 'id' string). This is part of the tools array used for registration.{ name: 'harvest_delete_time_entry', description: 'Delete a time entry. Use about {"tool": "harvest_delete_time_entry"} for detailed usage and warnings.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Time entry ID to delete' } }, required: ['id'] } },
- src/index.ts:70-72 (registration)Registration of all tools via the ListToolsRequestHandler, returning the tools array imported from tools.ts.return { tools: tools, };