getAllSpaceCategories
Retrieve all space categories for services in Mews hospitality platform with optional filtering by service IDs, category IDs, or update date ranges.
Instructions
Returns all space categories of a service
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ServiceIds | Yes | Filter by service IDs | |
| SpaceCategoryIds | No | Filter by specific category IDs | |
| UpdatedUtc | No | Date range filter for category updates |
Implementation Reference
- The main handler function that executes the tool logic: spreads input args into request data and calls the Mews API endpoint '/api/connector/v1/spaceCategories/getAll' via mewsRequest utility, returning JSON stringified 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/spaceCategories/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema validation: requires ServiceIds array (max 1000), optional SpaceCategoryIds array and UpdatedUtc object with StartUtc/EndUtc strings.inputSchema: { type: 'object', properties: { ServiceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by service IDs', maxItems: 1000 }, SpaceCategoryIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific category IDs', maxItems: 1000 }, 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 category updates' } }, required: ['ServiceIds'], additionalProperties: false },
- src/tools/index.ts:130-133 (registration)The tool is registered by including it in the allTools array export, making it available via toolMap and getToolDefinitions(). Imported at line 48.// Services tools getAllServicesTool, getAllSpacesTool, getAllSpaceCategoriesTool,