Skip to main content
Glama
standardbeagle

Harvest MCP Server

harvest_update_time_entry

Modify existing time entries in Harvest by updating project, task, date, hours, or notes to maintain accurate time tracking records.

Instructions

Update an existing time entry. Use about {"tool": "harvest_update_time_entry"} for detailed parameters and examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTime entry ID
project_idNoProject ID
task_idNoTask ID
spent_dateNoDate of the entry (YYYY-MM-DD)
hoursNoHours worked
notesNoNotes for the time entry

Implementation Reference

  • Core implementation of the tool: sends PATCH request to Harvest API /time_entries/{id} with update data.
    async updateTimeEntry(id: string, data: any) {
      return this.makeRequest(`/time_entries/${id}`, {
        method: 'PATCH',
        body: JSON.stringify(data),
      });
    }
  • MCP CallToolRequestHandler switch case that extracts parameters and calls the HarvestClient.updateTimeEntry method.
    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),
          },
        ],
      };
  • Tool definition including name, description, and inputSchema 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']
      }
    },
  • Detailed documentation and usage examples for the tool, provided via the 'about' tool.
          '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`,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/standardbeagle/harvest-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server