list_canned_services
Retrieve reusable service templates from Shopmonkey to add pre-built services to work orders, with options to filter by location and paginate results.
Instructions
List pre-built canned service templates from Shopmonkey. These are reusable service templates that can be added to work orders.
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/services.ts:59-68 (handler)The handler function that executes the list_canned_services tool.
async list_canned_services(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<CannedService[]>('GET', '/canned_service', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/services.ts:20-31 (schema)The schema definition for list_canned_services.
{ name: 'list_canned_services', description: 'List pre-built canned service templates from Shopmonkey. These are reusable service templates that can be added to work orders.', 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)' }, }, }, },