Skip to main content
Glama
code-rabi

Mews MCP

by code-rabi

updateLoyaltyTiers

Modify loyalty program tiers in Mews hospitality platform by updating names, descriptions, levels, point requirements, benefits, and activation status.

Instructions

Updates information about the specified loyalty tiers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ChainIdNoUnique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.
LoyaltyTierUpdatesYesLoyalty tiers to be updated

Implementation Reference

  • The main handler function that sends the update request to the Mews loyalty tiers API endpoint using the mewsRequest utility.
    async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> {
      const result = await mewsRequest(config, '/api/connector/v1/loyaltyTiers/update', args);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema defining the parameters for updating loyalty tiers, including optional ChainId and array of tier updates.
    inputSchema: {
      type: 'object',
      properties: {
        ChainId: {
          type: 'string',
          description: 'Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.'
        },
        LoyaltyTierUpdates: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              LoyaltyTierId: { type: 'string', description: 'Unique identifier of the loyalty tier' },
              Name: {
                type: 'object',
                properties: {
                  Value: { type: 'string', description: 'Name of the loyalty tier' }
                },
                description: 'Name of the loyalty tier (or null if the name should not be updated)'
              },
              Description: {
                type: 'object',
                properties: {
                  Value: { type: 'string', description: 'Description of the loyalty tier' }
                },
                description: 'Description of the loyalty tier (or null if the description should not be updated)'
              },
              Level: {
                type: 'object',
                properties: {
                  Value: { type: 'number', description: 'Level of the loyalty tier' }
                },
                description: 'Level of the loyalty tier (or null if the level should not be updated)'
              },
              MinimumPointsRequired: {
                type: 'object',
                properties: {
                  Value: { type: 'number', description: 'Minimum points required to reach this tier' }
                },
                description: 'Minimum points required to reach this tier (or null if the points should not be updated)'
              },
              BenefitDescription: {
                type: 'object',
                properties: {
                  Value: { type: 'string', description: 'Description of the benefits for this tier' }
                },
                description: 'Description of the benefits for this tier (or null if the description should not be updated)'
              },
              IsActive: {
                type: 'object',
                properties: {
                  Value: { type: 'boolean', description: 'Whether the loyalty tier is active' }
                },
                description: 'Whether the loyalty tier is active (or null if the status should not be updated)'
              }
            },
            required: ['LoyaltyTierId'],
            additionalProperties: false
          },
          description: 'Loyalty tiers to be updated',
          maxItems: 1000
        }
      },
      required: ['LoyaltyTierUpdates'],
      additionalProperties: false
    },
  • Import statement bringing in the tool definition.
    import { updateLoyaltyTiersTool } from './loyalty/updateLoyaltyTiers.js';
  • Adds the tool to the central allTools array used for tool registry and lookup.
    updateLoyaltyTiersTool,
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 updates loyalty tiers but fails to mention critical details like whether this is a destructive operation, if it requires specific permissions, rate limits, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning a top score for brevity and clarity.

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 mutation operation with 2 parameters, no output schema, and no annotations), the description is insufficient. It lacks details on behavioral traits, usage context, and expected outcomes, making it incomplete for safe and effective agent invocation.

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, detailing both parameters ('ChainId' and 'LoyaltyTierUpdates') and their nested properties comprehensively. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 without compensating value.

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 ('Updates') and resource ('information about the specified loyalty tiers'), making the purpose evident. However, it does not differentiate from sibling tools like 'updateLoyaltyMemberships' or 'updateLoyaltyPrograms', which also update loyalty-related entities, leaving room for confusion about when to use this specific tool.

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 'addLoyaltyTiers' or 'deleteLoyaltyTiers', nor does it mention prerequisites such as authentication or permissions. The description lacks context for usage, leaving the agent to infer based on tool names 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