harvest_update_time_entry
Modify an existing time entry in Harvest by updating project, task, date, hours, or notes to correct or adjust recorded work time.
Instructions
Update an existing time entry. Use about {"tool": "harvest_update_time_entry"} for detailed parameters and examples.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | Hours worked | |
| id | Yes | Time entry ID | |
| notes | No | Notes for the time entry | |
| project_id | No | Project ID | |
| spent_date | No | Date of the entry (YYYY-MM-DD) | |
| task_id | No | Task ID |
Implementation Reference
- src/harvest-client.ts:90-95 (handler)Core implementation of updating a Harvest time entry via PATCH API request.async updateTimeEntry(id: string, data: any) { return this.makeRequest(`/time_entries/${id}`, { method: 'PATCH', body: JSON.stringify(data), }); }
- src/index.ts:105-115 (handler)MCP server handler that processes tool calls for harvest_update_time_entry and delegates to HarvestClient.case 'harvest_update_time_entry': const { id, ...updateData } = typedArgs; const updatedTimeEntry = await harvestClient.updateTimeEntry(id as string, updateData); return { content: [ { type: 'text', text: JSON.stringify(updatedTimeEntry, null, 2), }, ], };
- src/tools.ts:35-50 (schema)Tool metadata, description, and input schema definition used for MCP tool listing and validation.{ name: 'harvest_update_time_entry', description: 'Update an existing time entry. Use about {"tool": "harvest_update_time_entry"} for detailed parameters and examples.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Time entry ID' }, project_id: { type: 'string', description: 'Project ID' }, task_id: { type: 'string', description: 'Task ID' }, spent_date: { type: 'string', description: 'Date of the entry (YYYY-MM-DD)' }, hours: { type: 'number', description: 'Hours worked' }, notes: { type: 'string', description: 'Notes for the time entry' } }, required: ['id'] } },
- src/index.ts:69-73 (registration)Registers the tools list handler that exposes harvest_update_time_entry via the MCP ListToolsRequest.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: tools, }; });
- src/harvest-client.ts:339-393 (helper)Detailed documentation and usage examples for the harvest_update_time_entry tool provided by getAboutInfo.'harvest_update_time_entry': `# harvest_update_time_entry Updates an existing time entry with new information. ## Purpose Modify any aspect of an existing time entry including hours, notes, project, task, or date. ## Parameters - \`id\` (string, required): The time entry ID to update - \`project_id\` (string, optional): Change to different project - \`task_id\` (string, optional): Change to different task - \`spent_date\` (string, optional): Change date (YYYY-MM-DD) - \`hours\` (number, optional): Update hours worked - \`notes\` (string, optional): Update notes/description ## Example Usage **Update hours and notes:** \`\`\`json { "tool": "harvest_update_time_entry", "id": "98765", "hours": 3.25, "notes": "Completed API integration and testing" } \`\`\` **Move entry to different project/task:** \`\`\`json { "tool": "harvest_update_time_entry", "id": "98765", "project_id": "54321", "task_id": "09876", "notes": "Moved to correct project" } \`\`\` **Change date:** \`\`\`json { "tool": "harvest_update_time_entry", "id": "98765", "spent_date": "2024-01-19" } \`\`\` ## Response Format Returns the updated time entry object with all current values. ## Notes - Cannot update a running timer's hours (stop timer first) - Only provide parameters you want to change - Use harvest_list_time_entries to find entry IDs`,