Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

getRatePricing

Retrieve pricing information for specified rates within a given date range to support rate analysis and financial planning in hospitality operations.

Instructions

Returns prices of rates during the specified period

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
RateIdsYesArray of rate IDs to get pricing for
StartUtcYesStart date for pricing period (ISO 8601)
EndUtcYesEnd date for pricing period (ISO 8601)

Implementation Reference

  • Full implementation of the 'getRatePricing' tool, including the execute handler that performs an HTTP request to the Mews API endpoint '/api/connector/v1/rates/getPricing' with the provided arguments.
    export const getRatePricingTool: Tool = {
      name: 'getRatePricing',
      description: 'Returns prices of rates during the specified period',
      inputSchema: {
        type: 'object',
        properties: {
          RateIds: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of rate IDs to get pricing for',
            maxItems: 1000
          },
          StartUtc: {
            type: 'string',
            description: 'Start date for pricing period (ISO 8601)'
          },
          EndUtc: {
            type: 'string',
            description: 'End date for pricing period (ISO 8601)'
          }
        },
        required: ['RateIds', 'StartUtc', 'EndUtc'],
        additionalProperties: false
      },
      
      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/rates/getPricing', requestData);
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }]
        };
      }
  • Input schema validation for the getRatePricing tool, requiring RateIds array, StartUtc, and EndUtc.
    inputSchema: {
      type: 'object',
      properties: {
        RateIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Array of rate IDs to get pricing for',
          maxItems: 1000
        },
        StartUtc: {
          type: 'string',
          description: 'Start date for pricing period (ISO 8601)'
        },
        EndUtc: {
          type: 'string',
          description: 'End date for pricing period (ISO 8601)'
        }
      },
      required: ['RateIds', 'StartUtc', 'EndUtc'],
      additionalProperties: false
    },
  • Import of the getRatePricingTool for registration in the tools index.
    import { getAllRatesTool } from './rates/getAllRates.js';
    import { getRatePricingTool } from './rates/getRatePricing.js';
  • Registration of getRatePricingTool in the central allTools array used for toolMap and definitions.
    // Rates tools
    getAllRatesTool,
    getRatePricingTool,
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns prices but doesn't describe the return format, pagination, rate limits, authentication needs, or error handling. For a read operation with no annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond its basic purpose.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core purpose and appropriately sized for a straightforward tool. Every part of the sentence contributes to understanding the tool's function.

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 tool's complexity (a read operation with 3 required parameters) and lack of annotations and output schema, the description is incomplete. It doesn't address return values, error cases, or behavioral traits like rate limits. For a tool that fetches pricing data, more context on output structure and usage constraints would be beneficial.

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 input schema has 100% description coverage, with clear documentation for RateIds, StartUtc, and EndUtc. The description adds minimal value beyond the schema by implying the parameters define a period and rate selection, but it doesn't provide additional context like date format examples or constraints beyond maxItems. Baseline 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 tool's purpose: 'Returns prices of rates during the specified period.' It specifies the verb ('Returns'), resource ('prices of rates'), and scope ('during the specified period'). However, it doesn't explicitly differentiate from sibling tools like 'getAllRates' or 'getAllReservations', which might also return pricing-related data.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare it to sibling tools such as 'getAllRates' or 'getAllReservations', which might overlap in functionality. Without this context, users must infer usage from the tool name and parameters alone.

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