Skip to main content
Glama

addLoyaltyPrograms

Add new loyalty programs to the Mews MCP server, enabling creation of up to 1000 programs with customizable names, descriptions, external identifiers, and activation statuses for enhanced customer engagement.

Instructions

Adds new loyalty programs to the system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ChainIdNoUnique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.
LoyaltyProgramsYesArray of loyalty program objects to create

Implementation Reference

  • The execute handler function that calls the Mews API endpoint to add loyalty programs and returns the result as JSON.
    async execute(config: MewsAuthConfig, args: unknown): Promise<ToolResult> { const result = await mewsRequest(config, '/api/connector/v1/loyaltyPrograms/add', args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema validating the ChainId (optional) and required array of LoyaltyPrograms, each with Name and optional fields.
    inputSchema: { type: 'object', properties: { ChainId: { type: 'string', description: 'Unique identifier of the chain. Required when using Portfolio Access Tokens, ignored otherwise.' }, LoyaltyPrograms: { type: 'array', items: { type: 'object', properties: { Name: { type: 'string', description: 'Name of the loyalty program' }, Description: { type: 'string', description: 'Description of the loyalty program' }, ExternalIdentifier: { type: 'string', description: 'External identifier of the loyalty program' }, IsActive: { type: 'boolean', description: 'Whether the loyalty program is active' } }, required: ['Name'], additionalProperties: false }, description: 'Array of loyalty program objects to create', maxItems: 1000 } }, required: ['LoyaltyPrograms'], additionalProperties: false },
  • Import statement for the addLoyaltyProgramsTool.
    import { addLoyaltyProgramsTool } from './loyalty/addLoyaltyPrograms.js';
  • Inclusion of addLoyaltyProgramsTool in the allTools array for global tool registry.
    addLoyaltyProgramsTool,

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