Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

getAllRates

Retrieve all enterprise pricing rates from the Mews hospitality platform. Filter results by rate IDs, service IDs, rate groups, or update dates to access current pricing data.

Instructions

Returns all rates (pricing) of the enterprise

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
RateIdsNoFilter by specific rate IDs
ServiceIdsNoFilter by service IDs
RateGroupIdsNoFilter by rate group IDs
UpdatedUtcNoDate range filter for rate updates

Implementation Reference

  • The main handler function for the getAllRates tool. It processes input arguments and makes an HTTP request to the Mews API endpoint '/api/connector/v1/rates/getAll' to retrieve all rates.
    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/getAll', requestData);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining the parameters for filtering rates: RateIds, ServiceIds, RateGroupIds, and UpdatedUtc range.
    inputSchema: {
      type: 'object',
      properties: {
        RateIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by specific rate IDs',
          maxItems: 1000
        },
        ServiceIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by service IDs',
          maxItems: 1000
        },
        RateGroupIds: {
          type: 'array',
          items: { type: 'string' },
          description: 'Filter by rate group 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 rate updates'
        }
      },
      additionalProperties: false
    },
  • Import statement for the getAllRatesTool.
    import { getAllRatesTool } from './rates/getAllRates.js';
  • Registration of getAllRatesTool (and related) in the allTools array used for tool registry and lookup.
    // Rates tools
    getAllRatesTool,
    getRatePricingTool,
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether this is a read-only operation, potential performance impacts of returning 'all' rates, pagination behavior, authentication requirements, or rate limits. The description is minimal and lacks crucial operational context.

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. However, it's arguably too concise given the tool's complexity and lack of annotations, potentially under-specifying rather than being optimally concise.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'all rates' means in practice, doesn't mention the filtering capability shown in the schema, and provides no information about return format, data volume, or error conditions. The description fails to compensate for the lack of structured metadata.

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 all 4 parameters. The description adds no parameter semantics beyond what's in the schema - it doesn't explain how filtering works, the relationship between parameters, or provide usage examples. Baseline 3 is appropriate when schema does all the work.

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 rates (pricing) of the enterprise' clearly states the verb ('returns') and resource ('rates/pricing'), but it's vague about scope. It doesn't specify whether this returns ALL rates unconditionally or if filtering is required, and doesn't differentiate from sibling tools like 'getRatePricing'.

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 like 'getRatePricing'. The description implies it returns 'all rates' but doesn't clarify if this should be used for bulk retrieval versus filtered queries, or mention any prerequisites or exclusions.

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