getAllSpaces
Retrieve all enterprise spaces from the Mews hospitality platform, with optional filtering by space IDs, service IDs, categories, or update dates.
Instructions
Returns all spaces of the enterprise, or only those specified
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| SpaceIds | No | Filter by specific space IDs | |
| ServiceIds | No | Filter by service IDs | |
| SpaceCategoryIds | No | Filter by space category IDs | |
| UpdatedUtc | No | Date range filter for space updates |
Implementation Reference
- src/tools/services/getAllSpaces.ts:41-54 (handler)The async execute method implementing the getAllSpaces tool's core logic: parses input args, makes HTTP request to Mews API endpoint '/api/connector/v1/spaces/getAll', and returns 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/spaces/getAll', requestData); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- Input schema for the getAllSpaces tool, defining optional filters: SpaceIds, ServiceIds, SpaceCategoryIds (arrays of strings, max 1000), and UpdatedUtc date range object.inputSchema: { type: 'object', properties: { SpaceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by specific space IDs', maxItems: 1000 }, ServiceIds: { type: 'array', items: { type: 'string' }, description: 'Filter by service IDs', maxItems: 1000 }, SpaceCategoryIds: { type: 'array', items: { type: 'string' }, description: 'Filter by space 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 space updates' } }, additionalProperties: false },
- src/tools/index.ts:46-48 (registration)Import statement registering the getAllSpacesTool from its implementation file.import { getAllServicesTool } from './services/getAllServices.js'; import { getAllSpacesTool } from './services/getAllSpaces.js'; import { getAllSpaceCategoriesTool } from './services/getAllSpaceCategories.js';
- src/tools/index.ts:131-133 (registration)Inclusion of getAllSpacesTool in the central allTools array, which serves as the registry of all MCP tools.getAllServicesTool, getAllSpacesTool, getAllSpaceCategoriesTool,