Skip to main content
Glama
voucherifyio

voucherify-core-mcp

Official
by voucherifyio

get_voucher

Fetch complete voucher details by code or ID, including discount, usage, validation rules, and QR/barcode assets for management.

Instructions

Retrieve detailed information about a specific voucher by its code or ID.

Returns complete voucher configuration including discount details, usage limits, validation rules, and current status for voucher analysis and management.

Enhanced Features:

  • Automatically fetches and processes validation rules for detailed rule analysis

  • Provides both raw validation_rules_assignments and processed validation_rules

  • Includes QR/barcode assets for voucher display and distribution

Parameters:

  • identifier: Voucher code or ID for lookup

Identifier Types:

  • Voucher Code: Human-readable code with alphanumeric and special characters (e.g., "WELCOME10", "SAVE20", "TEST-ABC")

  • Voucher ID: System identifier with 'v_' prefix (e.g., "v_abc123def456")

Validation Rules:

  • Identifier must correspond to existing voucher

  • Both codes and IDs are case-sensitive

Examples:

  • get_voucher(identifier="WELCOME10")

  • get_voucher(identifier="v_abc123def456")

Returns: JSON object containing complete voucher details including:

Core Voucher Information:

  • id: Voucher system identifier (e.g., "v_4dyaDRCMD0bUDNv47pDqnGlCJhSVWtnT")

  • code: Human-readable voucher code (e.g., "DELUXE-SG63RY")

  • type: Voucher type ("DISCOUNT_VOUCHER", "GIFT_VOUCHER", "LOYALTY_CARD")

  • active: Boolean voucher status

  • object: Always "voucher"

Discount Configuration:

  • discount: Discount details with type and value (e.g., {"type": "PERCENT", "percent_off": 25})

  • gift: Gift voucher amount (null for discount vouchers)

  • loyalty_card: Loyalty card details (null for regular vouchers)

Validity and Constraints:

  • start_date, expiration_date: Validity period (ISO 8601 or null)

  • validity_timeframe, validity_hours: Time-based restrictions

  • validity_day_of_week: Array of valid weekdays (1=Monday, 7=Sunday)

Usage Tracking:

  • redemption: Usage statistics with quantity limits and current usage

  • publish: Publication information and count

  • holder_id: Customer ID if voucher is assigned

Campaign and Categorization:

  • campaign, campaign_id: Parent campaign information (null for standalone vouchers)

  • category, category_id, categories: Voucher categorization

Validation Rules (Enhanced):

  • assigned_validation_rules: Processed validation rules with detailed conditions (added by this tool) See "Validation Rules Structure" section in server instructions for complete field documentation

Additional Data:

  • metadata: Custom voucher attributes

  • additional_info: Extra voucher information

  • assets: QR code and barcode URLs for voucher display

  • is_referral_code: Boolean indicating referral voucher

  • created_at, updated_at: ISO 8601 timestamps

Use Cases:

  • Verify voucher validity and details

  • Check voucher usage and limits

  • Analyze voucher configuration and discount mechanics

  • Understand validation rules and product requirements

  • Check voucher ownership and assignment

  • Get QR/barcode assets for voucher display

Raises:

  • ToolError: If voucher not found or invalid identifier format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identifierYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully covers behavior: it discloses automatic processing of validation rules, return structure, and error conditions (raises ToolError). It also describes the 'Enhanced Features' that add value beyond a simple lookup.

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 fairly long but well-structured with clear sections (Enhanced Features, Parameters, Examples, Returns, Use Cases). It is front-loaded with purpose. Some redundancy exists (e.g., repeating identifier types), but overall it is organized and informative.

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?

For a single-parameter tool with a complex return (many fields), the description provides a detailed breakdown of all return fields, error handling, and use cases. It also references external documentation for validation rules. Given the output schema exists, the description adds significant contextual completeness.

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?

The single parameter 'identifier' has 0% schema description coverage, but the description compensates richly: it explains both identifier types (code vs ID), case-sensitivity, validation rules, and provides examples. This fully documents the parameter's semantics.

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 explicitly states 'Retrieve detailed information about a specific voucher by its code or ID.' It clearly identifies the verb (retrieve), resource (voucher), and scope (specific voucher via code or ID). This distinguishes it from sibling tools like 'list_campaigns' or 'find_customer'.

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

Usage Guidelines4/5

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

The description includes explicit use cases, examples, and identifier type guidance. It does not explicitly state when not to use or contrast with siblings, but the 'Use Cases' section provides context for appropriate usage.

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