Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

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
NameRequiredDescriptionDefault
ServiceIdsYesFilter by service IDs
SpaceCategoryIdsNoFilter by specific category IDs
UpdatedUtcNoDate 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
    },
  • 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,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states a read operation ('returns'), which implies non-destructive behavior, but doesn't disclose rate limits, authentication needs, or return format details. The description is minimal and misses key behavioral traits like pagination or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core purpose. However, it could be more structured by including key details like filtering options, but it's appropriately sized for its limited content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'space categories' are, how results are formatted, or any constraints like the 1000-item max. For a tool with 3 parameters and complex filtering, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents parameters. The description adds no meaning beyond the schema—it doesn't explain parameter interactions or provide examples. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Returns all space categories of a service' states the action (returns) and resource (space categories), but it's vague about scope—'all' could imply unfiltered, yet the schema shows filtering parameters. It doesn't differentiate from sibling tools like getAllSpaces or getAllServices, which handle related resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives is provided. The description lacks context on prerequisites, such as needing service IDs, or exclusions, like not using it for individual category lookups. It implies a general retrieval without specifying use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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