Skip to main content
Glama

updateLoyaltyPrograms

Modifies details of specified loyalty programs, including name, description, external identifier, and active status, within the Mews MCP environment. Ensures accurate and up-to-date loyalty program information.

Instructions

Updates information about the specified loyalty programs

Input Schema

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

Implementation Reference

  • The execute handler function that sends an HTTP request to the Mews API endpoint '/api/connector/v1/loyaltyPrograms/update' with the provided arguments and returns the formatted result.
    async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/loyaltyPrograms/update', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema defining the parameters for updating loyalty programs, including optional ChainId and required array of LoyaltyProgramUpdates with fields like LoyaltyProgramId, Name, Description, etc.
    inputSchema: { type: 'object', properties: { ChainId: { type: 'string', description: 'Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.' }, LoyaltyProgramUpdates: { type: 'array', items: { type: 'object', properties: { LoyaltyProgramId: { type: 'string', description: 'Unique identifier of the loyalty program' }, Name: { type: 'object', properties: { Value: { type: 'string', description: 'Name of the loyalty program' } }, description: 'Name of the loyalty program (or null if the name should not be updated)' }, Description: { type: 'object', properties: { Value: { type: 'string', description: 'Description of the loyalty program' } }, description: 'Description of the loyalty program (or null if the description should not be updated)' }, ExternalIdentifier: { type: 'object', properties: { Value: { type: 'string', description: 'External identifier of the loyalty program' } }, description: 'External identifier of the loyalty program (or null if the identifier should not be updated)' }, IsActive: { type: 'object', properties: { Value: { type: 'boolean', description: 'Whether the loyalty program is active' } }, description: 'Whether the loyalty program is active (or null if the status should not be updated)' } }, required: ['LoyaltyProgramId'], additionalProperties: false }, description: 'Loyalty programs to be updated', maxItems: 1000 } }, required: ['LoyaltyProgramUpdates'], additionalProperties: false },
  • Registers the updateLoyaltyProgramsTool in the allTools array exported for use in the MCP server.
    updateLoyaltyProgramsTool,
  • Imports the updateLoyaltyProgramsTool from its implementation file.
    import { updateLoyaltyProgramsTool } from './loyalty/updateLoyaltyPrograms.js';

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