list_timeslips
Retrieve timeslip records from FreeAgent with filters for date ranges, status, users, tasks, or projects to track billable hours and time entries.
Instructions
List timeslips with optional filtering
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_date | No | Start date (YYYY-MM-DD) | |
| to_date | No | End date (YYYY-MM-DD) | |
| updated_since | No | ISO datetime | |
| view | No | Filter view type | |
| user | No | Filter by user URL | |
| task | No | Filter by task URL | |
| project | No | Filter by project URL | |
| nested | No | Include nested resources |
Implementation Reference
- src/index.ts:191-196 (handler)MCP tool handler for 'list_timeslips': delegates to FreeAgentClient.listTimeslips and formats response as JSON.case 'list_timeslips': { const timeslips = await this.client.listTimeslips(request.params.arguments); return { content: [{ type: 'text', text: JSON.stringify(timeslips, null, 2) }] }; }
- src/index.ts:88-103 (schema)Input schema defining optional parameters for filtering timeslips.inputSchema: { type: 'object', properties: { from_date: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, to_date: { type: 'string', description: 'End date (YYYY-MM-DD)' }, updated_since: { type: 'string', description: 'ISO datetime' }, view: { type: 'string', enum: ['all', 'unbilled', 'running'], description: 'Filter view type' }, user: { type: 'string', description: 'Filter by user URL' }, task: { type: 'string', description: 'Filter by task URL' }, project: { type: 'string', description: 'Filter by project URL' }, nested: { type: 'boolean', description: 'Include nested resources' } }
- src/index.ts:85-104 (registration)Tool registration in the MCP ListTools response, including name, description, and input schema.{ name: 'list_timeslips', description: 'List timeslips with optional filtering', inputSchema: { type: 'object', properties: { from_date: { type: 'string', description: 'Start date (YYYY-MM-DD)' }, to_date: { type: 'string', description: 'End date (YYYY-MM-DD)' }, updated_since: { type: 'string', description: 'ISO datetime' }, view: { type: 'string', enum: ['all', 'unbilled', 'running'], description: 'Filter view type' }, user: { type: 'string', description: 'Filter by user URL' }, task: { type: 'string', description: 'Filter by task URL' }, project: { type: 'string', description: 'Filter by project URL' }, nested: { type: 'boolean', description: 'Include nested resources' } } }
- src/freeagent-client.ts:53-71 (helper)Core implementation: FreeAgentClient method that performs the API GET request to retrieve timeslips with optional filters.async listTimeslips(params?: { from_date?: string; to_date?: string; updated_since?: string; view?: 'all' | 'unbilled' | 'running'; user?: string; task?: string; project?: string; nested?: boolean; }): Promise<Timeslip[]> { try { console.error('[API] Fetching timeslips with params:', params); const response = await this.axiosInstance.get<TimeslipsResponse>('/timeslips', { params }); return response.data.timeslips; } catch (error) { console.error('[API] Failed to fetch timeslips:', error); throw error; } }