list_locations
Retrieve all shop locations to identify location IDs for filtering resources in multi-location shop management systems.
Instructions
List all shop locations in Shopmonkey. Useful for multi-location shops to identify location IDs for filtering other resources.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 25) | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/workflow.ts:47-54 (handler)The handler implementation for the list_locations tool, which makes a GET request to the /location endpoint.
async list_locations(args) { const params: Record<string, string> = {}; if (args.limit !== undefined) params.limit = String(args.limit); if (args.page !== undefined) params.page = String(args.page); const data = await shopmonkeyRequest<Location[]>('GET', '/location', undefined, params); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }, - src/tools/workflow.ts:17-27 (schema)The schema definition for the list_locations tool.
{ name: 'list_locations', description: 'List all shop locations in Shopmonkey. Useful for multi-location shops to identify location IDs for filtering other resources.', inputSchema: { type: 'object' as const, properties: { limit: { type: 'number', description: 'Maximum number of results to return (default: 25)' }, page: { type: 'number', description: 'Page number for pagination (default: 1)' }, }, }, },