start_timer
Start tracking time for a specific timeslip in FreeAgent to record billable hours or project work duration.
Instructions
Start a timer for a timeslip
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Timeslip ID |
Implementation Reference
- src/index.ts:239-245 (handler)MCP CallToolRequest handler for the 'start_timer' tool. Extracts the timeslip ID from arguments and calls FreeAgentClient.startTimer(id), then returns the resulting timeslip as formatted JSON text content.case 'start_timer': { const { id } = request.params.arguments as { id: string }; const timeslip = await this.client.startTimer(id); return { content: [{ type: 'text', text: JSON.stringify(timeslip, null, 2) }] }; }
- src/index.ts:161-171 (registration)Registration of the 'start_timer' tool in the ListToolsRequestSchema response, defining its name, description, and input schema (requiring a string 'id').{ name: 'start_timer', description: 'Start a timer for a timeslip', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Timeslip ID' } }, required: ['id'] } },
- src/freeagent-client.ts:133-142 (helper)Helper method in FreeAgentClient that implements the core logic: POST request to FreeAgent API `/timeslips/${id}/timer` to start the timer, returning the updated Timeslip object.async startTimer(id: string): Promise<Timeslip> { try { console.error('[API] Starting timer for timeslip:', id); const response = await this.axiosInstance.post<TimeslipResponse>(`/timeslips/${id}/timer`); return response.data.timeslip; } catch (error) { console.error('[API] Failed to start timer:', error); throw error; } }