Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

getAllAvailabilityBlocks

Retrieve all blocked reservations for rates, spaces, or categories in Mews hospitality platform using time-based filters to manage availability constraints.

Instructions

Returns all availability blocks (reservations blocked by rate, space category, or space) based on filter parameters. Note: At least one filter must be provided (CreatedUtc, UpdatedUtc, CollidingUtc, AvailabilityBlockIds, or ExternalIdentifiers). The time interval must not exceed 100 hours.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
AvailabilityBlockIdsNoFilter by specific availability block IDs
ServiceIdsNoFilter by service IDs
StartUtcYesStart date for search (ISO 8601)
EndUtcYesEnd date for search (ISO 8601)
CollidingUtcNoFind blocks that collide with this time range

Implementation Reference

  • The execute function implementing the core logic of the getAllAvailabilityBlocks tool by calling the Mews API endpoint '/api/connector/v1/availabilityBlocks/getAll'.
    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/availabilityBlocks/getAll', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • The inputSchema defining the parameters and validation for the tool inputs.
    inputSchema: {
      type: 'object',
      properties: {
        AvailabilityBlockIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by specific availability block IDs',
          maxItems: 1000
        },
        ServiceIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by service IDs',
          maxItems: 1000
        },
        StartUtc: {
          type: 'string',
          description: 'Start date for search (ISO 8601)'
        },
        EndUtc: {
          type: 'string',
          description: 'End date for search (ISO 8601)'
        },
        CollidingUtc: {
          type: 'object',
          properties: {
            StartUtc: { type: 'string', description: 'Start of collision range (ISO 8601)' },
            EndUtc: { type: 'string', description: 'End of collision range (ISO 8601)' }
          },
          description: 'Find blocks that collide with this time range'
        }
      },
      required: ['StartUtc', 'EndUtc'],
      additionalProperties: false
    },
  • Registration of the tool in the allTools array for global tool registry.
    // Availability tools
    getAllAvailabilityBlocksTool,
Behavior3/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 adds valuable context about mandatory filtering requirements and time interval limits, which aren't evident from the schema alone. However, it doesn't describe important behavioral aspects like pagination, rate limits, authentication requirements, or what happens when no blocks match filters.

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

Conciseness5/5

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

The description is perfectly sized with two sentences: the first states the purpose, the second provides critical constraints. Every word earns its place with zero waste or redundancy. The structure is front-loaded with the core functionality followed by important usage notes.

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

Completeness3/5

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

For a read operation with 5 parameters (2 required) and no output schema, the description covers the basic purpose and critical constraints well. However, it lacks information about return format, error conditions, pagination, or what constitutes a valid response. Given the complexity of the nested CollidingUtc parameter and the absence of annotations, more behavioral context would be helpful.

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?

With 100% schema description coverage, the schema already documents all 5 parameters thoroughly. The description adds marginal value by mentioning filter parameters generally and listing some examples (CreatedUtc, UpdatedUtc, etc.), but doesn't provide additional syntax, format, or semantic details beyond what's in the schema descriptions.

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

Purpose5/5

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

The description clearly states the verb ('Returns') and resource ('all availability blocks') with specific scope ('reservations blocked by rate, space category, or space'). It distinguishes from sibling tools like getAllReservations or getAllServices by focusing on availability blocks, which are a distinct resource type in this system.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool ('based on filter parameters') and includes important constraints ('At least one filter must be provided' and 'time interval must not exceed 100 hours'). However, it doesn't explicitly mention when NOT to use it or name specific alternatives among the sibling tools.

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