getAllServices
Retrieve all available services from the Mews hospitality platform, with options to filter by ID, type, or update date range for inventory management.
Instructions
Returns all services offered by the enterprise
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ServiceIds | No | Filter by specific service IDs | |
| ServiceTypes | No | Filter by service types | |
| UpdatedUtc | No | Date range filter for service updates |
Implementation Reference
- The execute handler function that processes input arguments, calls the Mews API endpoint '/api/connector/v1/services/getAll', and returns the JSON-formatted result.async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const inputArgs = args as Record<string, unknown>; const requestData = { ...inputArgs }; const result = await mewsRequest(config, '/api/connector/v1/services/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Defines the input schema for the tool, including optional filters for ServiceIds (array of strings, max 1000), ServiceTypes (array of strings), and UpdatedUtc date range.inputSchema: { type: 'object', properties: { ServiceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific service IDs', maxItems: 1000 }, ServiceTypes: { type: 'array', items: { type: 'string' }, description: 'Filter by service types' }, UpdatedUtc: { type: 'object', properties: { StartUtc: { type: 'string', description: 'Start of update date range (ISO 8601)' }, EndUtc: { type: 'string', description: 'End of update date range (ISO 8601)' } }, description: 'Date range filter for service updates' } }, additionalProperties: false },
- src/tools/index.ts:130-133 (registration)Registers getAllServicesTool in the central allTools array alongside other services tools, enabling its inclusion in toolMap and getToolDefinitions().// Services tools getAllServicesTool, getAllSpacesTool, getAllSpaceCategoriesTool,
- src/tools/index.ts:46-46 (registration)Imports the getAllServicesTool from its implementation file for use in the tools registry.import { getAllServicesTool } from './services/getAllServices.js';