Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

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
NameRequiredDescriptionDefault
SpaceIdsNoFilter by specific space IDs
ServiceIdsNoFilter by service IDs
SpaceCategoryIdsNoFilter by space category IDs
UpdatedUtcNoDate range filter for space updates

Implementation Reference

  • 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
    },
  • 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';
  • Inclusion of getAllSpacesTool in the central allTools array, which serves as the registry of all MCP tools.
    getAllServicesTool,
    getAllSpacesTool,
    getAllSpaceCategoriesTool,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns data, implying a read-only operation, but doesn't cover critical aspects like pagination, rate limits, authentication requirements, or error handling. For a tool that likely handles large datasets (e.g., 'all spaces'), this lack of transparency is a significant gap.

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 that front-loads the core functionality ('Returns all spaces of the enterprise') and adds a brief qualifier. There's no wasted verbiage, but it could be slightly more structured (e.g., by explicitly listing filter types). Overall, it's concise and to the point.

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 the complexity (4 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain the return format, pagination, or error conditions, which are crucial for a tool that retrieves multiple items. Without annotations or an output schema, the agent lacks sufficient context to use this tool effectively beyond basic calls.

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?

The schema description coverage is 100%, with clear descriptions for all parameters (e.g., 'Filter by specific space IDs'). The description adds minimal value by hinting at filtering ('or only those specified') but doesn't elaborate on parameter interactions or usage examples. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('Returns') and resource ('all spaces of the enterprise'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'getAllSpaceCategories' or 'getAllServices', which reduces specificity. The mention of optional filtering ('or only those specified') adds some detail but doesn't fully distinguish it from other 'getAll' tools.

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 is provided on when to use this tool versus alternatives. The description mentions filtering options but doesn't explain scenarios where filtering by space IDs, service IDs, category IDs, or update dates is appropriate, nor does it reference sibling tools like 'getAllSpaceCategories' for related data. This leaves the agent without context for tool selection.

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