list_timeclock
Track and manage technician clock-in/clock-out events for shop staff. Filter by user, location, date range, and paginate results to monitor work hours.
Instructions
List technician time clock events. Track clock-in/clock-out for shop staff.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Filter by user/technician ID | |
| locationId | No | Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set. | |
| startDate | No | Filter by start date (ISO 8601 format) | |
| endDate | No | Filter by end date (ISO 8601 format) | |
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/labor.ts:74-86 (handler)The handler implementation for the list_timeclock tool.
async list_timeclock(args) { const params: Record<string, string> = {}; if (args.userId !== undefined) params.userId = String(args.userId); if (args.locationId !== undefined) params.locationId = String(args.locationId); if (args.startDate !== undefined) params.startDate = String(args.startDate); if (args.endDate !== undefined) params.endDate = String(args.endDate); if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); applyDefaultLocation(params); const data = await shopmonkeyRequest<TimeclockEntry[]>('GET', '/timeclock', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/labor.ts:20-34 (schema)The tool definition and schema for list_timeclock.
{ name: 'list_timeclock', description: 'List technician time clock events. Track clock-in/clock-out for shop staff.', inputSchema: { type: 'object' as const, properties: { userId: { type: 'string', description: 'Filter by user/technician ID' }, locationId: { type: 'string', description: 'Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set.' }, startDate: { type: 'string', description: 'Filter by start date (ISO 8601 format)' }, endDate: { type: 'string', description: 'Filter by end date (ISO 8601 format)' }, limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, }, },