Skip to main content
Glama
voucherifyio

voucherify-core-mcp

Official
by voucherifyio

get_best_deals

Analyze order items to identify top 5 highest-value promotions, with validation rules showing what is needed to qualify. Helps optimize cart value through targeted recommendations.

Instructions

Find top 5 best deal promotions for customer's order with validation analysis.

Analyzes order items against available promotions to identify highest-value deals. Returns promotions with validation rules - some may be partially valid, requiring additional items or changes to qualify for the discount.

Use Case: Upselling and cross-selling optimization

  • Identify best promotions for current cart

  • Determine what customer needs to add/change for qualification

  • Optimize cart value through targeted recommendations

Important: This tool is specialized for order-based promotion analysis. Do not combine with 'qualifications' tool as they serve different purposes.

Parameters: Parameters:

  • customer: 🔴 MANDATORY - Customer identification and profile data. This parameter is REQUIRED for every call.

  • order: 🔴 MANDATORY - Order with items list for promotion matching and analysis. This parameter is REQUIRED for every call.

Order Item Configuration: Each item can be specified in multiple ways:

  1. By Product ID (most precise): {"product_id": "prod_abc123", "price": 2000, "quantity": 1}

  2. By Source ID (requires related_object): {"source_id": "special-meal", "related_object": "product", "price": 3000, "quantity": 1}

  3. Generic with metadata (for product collection matching): {"quantity": 2, "product": {"metadata": {"category": "Electronics"}}}

  4. Price-less items (uses catalog price): {"source_id": "drink", "related_object": "product", "quantity": 1}

Pricing Rules:

  • All prices in cents (2000 = $20.00, 150 = $1.50)

  • Items without price use product catalog pricing

  • Quantity must be positive integer

Examples:

  • get_best_deals( customer={"id": "cust_abc123"}, order={ "items": [ {"product_id": "prod_112e92ce9a7cf5b1d8", "price": 2000, "quantity": 1}, {"source_id": "special-meal", "related_object": "product", "price": 3000, "quantity": 1} ] } )

Example of invalid usage:

  • get_best_deals()

Returns: JSON array of up to 5 promotion objects, each containing:

  • id: Promotion identifier

  • result: Qualification status (APPLICABLE, PARTIALLY_APPLICABLE, etc.)

  • is_applicable: Boolean indicating if given incentive meets all validation rules

  • redeemable_details: Promotion information (banner, description, campaign)

  • validation_rules: Array of validation requirements with status

  • resolved_order: Order with calculated totals and promotion effects if incentive is applicable

Each validation rule includes:

  • validation_rules_definition: Rule logic and requirements

  • validation_status: Current compliance status

  • validation_omitted_sub_rules: Missing requirements for qualification

See "Validation Rules Structure" section in server instructions for detailed rule format documentation

Raises:

  • ToolError: If customer missing required fields or order structure invalid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYes
customerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Despite no annotations, the description thoroughly explains behavior: it analyzes order items against promotions, returns validation results with partial applicability, details return structure, pricing rules, item configuration options, and error handling. No contradictions; fully transparent.

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 well-structured with sections (purpose, use case, important note, parameters, examples, returns, errors). Front-loaded with goal. Minor redundancy: 'Parameters:' appears twice. Otherwise efficient for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the minimal schema and absence of annotations, the description covers all necessary aspects: parameter details, examples, return format, error handling, and differentiation from siblings. The output schema is not provided but its structure is described. Complete for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no description coverage (0%), but the description compensates with detailed explanations for both parameters. It describes customer and order structure, provides four item configuration formats, pricing rules, examples, and required fields. Adds significant meaning beyond the minimal schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Find top 5 best deal promotions for customer's order with validation analysis.' It specifies the action (find best deals), resource (promotions), and scope (top 5). It explicitly distinguishes from the sibling 'qualifications' tool by warning not to combine them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases (upselling/cross-selling optimization) and includes a clear 'Important' note: 'Do not combine with 'qualifications' tool as they serve different purposes.' It guides when to use and when not to use.

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/voucherifyio/core-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server