Skip to main content
Glama

getAllSpaceCategories

Retrieve all space categories for a service using filters like specific category IDs or update date ranges, ensuring precise data access in Mews MCP server operations.

Instructions

Returns all space categories of a service

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ServiceIdsYesFilter by service IDs
SpaceCategoryIdsNoFilter by specific category IDs
UpdatedUtcNoDate range filter for category updates

Implementation Reference

  • The execute function implementing the core logic of the getAllSpaceCategories tool. It constructs request data from input args and calls the Mews API endpoint '/api/connector/v1/spaceCategories/getAll' using mewsRequest utility.
    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) }] }; }
  • The inputSchema defining the expected input parameters for the tool, requiring ServiceIds array and optionally filtering by SpaceCategoryIds or UpdatedUtc range.
    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 },
  • Registration of the getAllSpaceCategoriesTool in the allTools array exported from index.ts, making it available for MCP server registration and execution.
    // Services tools getAllServicesTool, getAllSpacesTool, getAllSpaceCategoriesTool,
  • Import statement bringing the getAllSpaceCategoriesTool into the index.ts registry file.
    import { getAllSpaceCategoriesTool } from './services/getAllSpaceCategories.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/code-rabi/mews-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server