list_users
Retrieve shop users and technicians from Shopmonkey with filtering by location and pagination controls.
Instructions
List shop users and technicians from Shopmonkey.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locationId | No | Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set. | |
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/labor.ts:88-97 (handler)The handler function for the 'list_users' tool. It processes the input arguments, applies the default location, and makes a request to the Shopmonkey API.
async list_users(args) { const params: Record<string, string> = {}; if (args.locationId !== undefined) params.locationId = String(args.locationId); if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); applyDefaultLocation(params); const data = await shopmonkeyRequest<User[]>('GET', '/user', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/labor.ts:36-46 (schema)The schema definition for the 'list_users' tool, describing its name, description, and expected input parameters.
name: 'list_users', description: 'List shop users and technicians from Shopmonkey.', inputSchema: { type: 'object' as const, properties: { locationId: { type: 'string', description: 'Filter by location ID. Defaults to SHOPMONKEY_LOCATION_ID env var if set.' }, limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, }, },