[
    {
        "name": "check_health",
        "description": "Check API health and key identity\nReturns the authenticated key's identity, role, scopes, rate limit, and owner information. Use this as a connectivity and configuration check before calling business endpoints.\n\nHTTP: GET /api/agent/v1/health",
        "input_schema": {
            "type": "object",
            "properties": {},
            "required": []
        }
    },
    {
        "name": "get_achievement_program",
        "description": "Get the achievements programme, rules, and insights\nReturns the partner's achievements programme status (active, paused, or inactive, plus whether a history import is running), the configured catalogue rules, and aggregate programme insights. Read-only: programme settings change in the partner dashboard.\n\nHTTP: GET /api/agent/v1/partner/achievements",
        "input_schema": {
            "type": "object",
            "properties": {},
            "required": []
        }
    },
    {
        "name": "get_member_achievements",
        "description": "Get a member's achievement progress at this partner\nReturns the member's loyalty-day progress, weekly-run state, and earned achievements at this partner. The member must have achievement data at this partner (progress or an earned achievement); anyone else answers not-found.\n\nHTTP: GET /api/agent/v1/partner/members/{id}/achievements",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Member UUID (path parameter)"
                },
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_loyalty_cards",
        "description": "List all loyalty cards for this partner\nReturns paginated loyalty cards owned by the authenticated partner. Supports pagination via page and per_page query parameters.\n\nHTTP: GET /api/agent/v1/partner/cards",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_loyalty_card",
        "description": "Create a new loyalty card\nCreates a loyalty card with the specified points economy configuration. Requires the club_id of an existing club owned by this partner.\n\nHTTP: POST /api/agent/v1/partner/cards",
        "input_schema": {
            "type": "object",
            "properties": {
                "club_id": {
                    "description": "Club this card belongs to",
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "description": "Internal name (not shown to members)",
                    "type": "string",
                    "maxLength": 250
                },
                "head": {
                    "description": "Translatable header text",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "currency": {
                    "description": "ISO 4217 currency code",
                    "type": "string",
                    "example": "EUR",
                    "maxLength": 3,
                    "minLength": 3
                },
                "points_per_currency": {
                    "type": "number",
                    "maximum": 100000,
                    "minimum": 0
                },
                "currency_unit_amount": {
                    "type": "number",
                    "maximum": 1000000,
                    "minimum": 1
                },
                "min_points_per_purchase": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "max_points_per_purchase": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "initial_bonus_points": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "points_expiration_months": {
                    "type": "number",
                    "maximum": 1200,
                    "minimum": 1
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                },
                "bg_color": {
                    "type": "string",
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$",
                    "example": "#4F46E5"
                }
            },
            "required": [
                "club_id",
                "name",
                "currency",
                "points_per_currency",
                "currency_unit_amount",
                "min_points_per_purchase",
                "max_points_per_purchase",
                "points_expiration_months"
            ]
        }
    },
    {
        "name": "get_loyalty_card",
        "description": "Get a specific loyalty card\nReturns a single loyalty card by ID. The card must belong to the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_loyalty_card",
        "description": "Update an existing loyalty card\nUpdates a loyalty card owned by the authenticated partner. Only provided fields are updated.\n\nHTTP: PUT /api/agent/v1/partner/cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "type": "string",
                    "maxLength": 250
                },
                "head": {
                    "description": "Translatable header text",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "currency": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 3
                },
                "points_per_currency": {
                    "type": "number",
                    "maximum": 100000,
                    "minimum": 0
                },
                "currency_unit_amount": {
                    "type": "number",
                    "maximum": 1000000,
                    "minimum": 1
                },
                "min_points_per_purchase": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "max_points_per_purchase": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "initial_bonus_points": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "points_expiration_months": {
                    "type": "number",
                    "maximum": 1200,
                    "minimum": 1
                },
                "is_active": {
                    "type": "boolean"
                },
                "bg_color": {
                    "type": "string",
                    "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_loyalty_card",
        "description": "Delete a loyalty card\nPermanently deletes a loyalty card owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_clubs",
        "description": "List all clubs for this partner\nReturns paginated clubs owned by the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/clubs",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_club",
        "description": "Create a new club\nCreates a club owned by the authenticated partner.\n\nHTTP: POST /api/agent/v1/partner/clubs",
        "input_schema": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "Club name",
                    "type": "string",
                    "maxLength": 120
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                }
            },
            "required": [
                "name"
            ]
        }
    },
    {
        "name": "get_club",
        "description": "Get a specific club\nReturns a single club by ID. The club must belong to the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/clubs/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_club",
        "description": "Update an existing club\nUpdates a club owned by the authenticated partner. Only provided fields are updated.\n\nHTTP: PUT /api/agent/v1/partner/clubs/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "type": "string",
                    "maxLength": 120
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_club",
        "description": "Delete a club\nDeletes a club owned by the authenticated partner. Protected clubs cannot be deleted.\n\nHTTP: DELETE /api/agent/v1/partner/clubs/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_members",
        "description": "List members who interacted with this business\nReturns paginated members who have interacted with this business through any loyalty program \u2014 a points purchase, a stamp, a voucher redemption, or a prepaid-pass visit. Searchable by name, email, member number, or unique identifier.\n\nHTTP: GET /api/agent/v1/partner/members",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                },
                "search": {
                    "type": "string",
                    "description": "Search by name, email, member number, or unique identifier"
                }
            },
            "required": []
        }
    },
    {
        "name": "get_member",
        "description": "Get a specific member\nReturns member details. Accepts UUID as path parameter. The member must have interacted with this business through any loyalty program (points, stamps, vouchers, or passes); anyone else answers not-found.\n\nHTTP: GET /api/agent/v1/partner/members/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Member UUID (path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "get_member_balance",
        "description": "Get a member's balance on a specific card\nReturns the member's point balance for a specific loyalty card. This is a points-card figure: the card must be one this business owns, and the member must hold that card. A member who only interacted through stamps, vouchers, or a pass \u2014 and so never held a points card \u2014 answers not-found, never a fabricated zero.\n\nHTTP: GET /api/agent/v1/partner/members/{id}/balance/{cardId}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Member UUID (path parameter)"
                },
                "cardId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Loyalty card UUID (path parameter)"
                }
            },
            "required": [
                "id",
                "cardId"
            ]
        }
    },
    {
        "name": "list_prepaid_passes",
        "description": "List all prepaid pass templates for this partner\nReturns paginated, non-deleted pass templates owned by the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/prepaid-passes",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_prepaid_pass",
        "description": "Create a new prepaid pass template\nCreates a counted pass (uses_total) or an unlimited pass (no uses_total, validity_days required). Price is in minor units (cents).\n\nHTTP: POST /api/agent/v1/partner/prepaid-passes",
        "input_schema": {
            "type": "object",
            "properties": {
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "description": "A translatable value. String when Accept-Language is set, object of locale\u2192value when not.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "example": {
                                "en": "English text",
                                "nl": "Nederlandse tekst"
                            },
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "A translatable value. String when Accept-Language is set, object of locale\u2192value when not.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "example": {
                                "en": "English text",
                                "nl": "Nederlandse tekst"
                            },
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "uses_total": {
                    "description": "Omit for an unlimited pass",
                    "type": "integer",
                    "minimum": 1
                },
                "validity_days": {
                    "description": "Required when uses_total is omitted",
                    "type": "integer",
                    "maximum": 366,
                    "minimum": 1
                },
                "price": {
                    "description": "Display price in minor units (cents)",
                    "type": "integer",
                    "minimum": 0
                },
                "currency": {
                    "type": "string",
                    "example": "EUR",
                    "maxLength": 3,
                    "minLength": 3
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                },
                "is_visible_by_default": {
                    "type": "boolean"
                },
                "bg_color": {
                    "type": "string",
                    "example": "#0F766E"
                }
            },
            "required": [
                "club_id",
                "name"
            ]
        }
    },
    {
        "name": "get_prepaid_pass",
        "description": "Get a specific prepaid pass template\n\nHTTP: GET /api/agent/v1/partner/prepaid-passes/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_prepaid_pass",
        "description": "Update a prepaid pass template\nUpdates a template owned by the partner. Only provided fields change; sold passes keep their snapshot.\n\nHTTP: PUT /api/agent/v1/partner/prepaid-passes/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "description": "A translatable value. String when Accept-Language is set, object of locale\u2192value when not.",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "example": {
                                "en": "English text",
                                "nl": "Nederlandse tekst"
                            },
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "price": {
                    "type": "integer",
                    "minimum": 0
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_prepaid_pass",
        "description": "Delete a prepaid pass template\nSoft-deletes the template (stops future sales). Sold passes keep working.\n\nHTTP: DELETE /api/agent/v1/partner/prepaid-passes/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "sell_prepaid_pass",
        "description": "Sell (issue) a pass to a member\nIssues a sold instance of template {id} to a member. Records the sale; the platform never charges the member. price_paid is in minor units (cents) and falls back to the template price when omitted.\n\nHTTP: POST /api/agent/v1/partner/prepaid-passes/{id}/sell",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Template UUID (path parameter)"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "price_paid": {
                    "description": "Amount charged in minor units (cents); defaults to the template price",
                    "type": "integer",
                    "minimum": 0
                },
                "staff_id": {
                    "description": "Optional staff member (in the pass's club) to attribute the sale to",
                    "type": "string",
                    "format": "uuid"
                }
            },
            "required": [
                "id",
                "member_identifier"
            ]
        }
    },
    {
        "name": "get_member_pass",
        "description": "Get a sold pass with its ledger history\n\nHTTP: GET /api/agent/v1/partner/member-passes/{memberPassId}",
        "input_schema": {
            "type": "object",
            "properties": {
                "memberPassId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "memberPassId"
            ]
        }
    },
    {
        "name": "scan_member_pass",
        "description": "Deduct one or more visits from a sold pass\nRecords a visit on the pass. Counted passes lose quantity visits; unlimited passes record the visit only.\n\nHTTP: POST /api/agent/v1/partner/member-passes/{memberPassId}/scan",
        "input_schema": {
            "type": "object",
            "properties": {
                "memberPassId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "quantity": {
                    "type": "integer",
                    "default": 1,
                    "minimum": 1
                },
                "staff_id": {
                    "description": "Optional staff member (in the pass's club) to attribute the visit to",
                    "type": "string",
                    "format": "uuid"
                }
            },
            "required": [
                "memberPassId"
            ]
        }
    },
    {
        "name": "undo_member_pass_use",
        "description": "Undo the most recent visit on a sold pass\nWrites an offsetting ledger entry and restores the balance. Fails if there is no use left to undo.\n\nHTTP: POST /api/agent/v1/partner/member-passes/{memberPassId}/undo",
        "input_schema": {
            "type": "object",
            "properties": {
                "memberPassId": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "staff_id": {
                    "description": "Optional staff member (in the pass's club) to attribute the correction to",
                    "type": "string",
                    "format": "uuid"
                }
            },
            "required": [
                "memberPassId"
            ]
        }
    },
    {
        "name": "list_member_passes",
        "description": "List a member's sold passes in this partner's clubs\nReturns the member's prepaid passes belonging to clubs owned by the authenticated partner. Use this to find a member-pass id before scanning or undoing.\n\nHTTP: GET /api/agent/v1/partner/members/{id}/passes",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Member UUID (path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_rewards",
        "description": "List all rewards for this partner\nReturns paginated rewards owned by the authenticated partner. Requires loyalty cards feature to be enabled.\n\nHTTP: GET /api/agent/v1/partner/rewards",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_reward",
        "description": "Create a new reward\nCreates a reward that members can claim by spending loyalty points.\n\nHTTP: POST /api/agent/v1/partner/rewards",
        "input_schema": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "Internal reward name",
                    "type": "string",
                    "maxLength": 120
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "points": {
                    "description": "Points required to claim this reward",
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "active_from": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                },
                "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                }
            },
            "required": [
                "name",
                "points"
            ]
        }
    },
    {
        "name": "get_reward",
        "description": "Get a specific reward\nReturns a single reward by ID. The reward must belong to the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/rewards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_reward",
        "description": "Update an existing reward\nUpdates a reward owned by the authenticated partner. Only provided fields are updated.\n\nHTTP: PUT /api/agent/v1/partner/rewards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "type": "string",
                    "maxLength": 120
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "points": {
                    "type": "number",
                    "maximum": 10000000,
                    "minimum": 0
                },
                "active_from": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                },
                "expiration_date": {
                    "type": "string",
                    "format": "date",
                    "nullable": true
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_reward",
        "description": "Delete a reward\nPermanently deletes a reward owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/rewards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_staff",
        "description": "List all staff members for this partner\nReturns paginated staff members owned by the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/staff",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_staff_member",
        "description": "Create a new staff member\nCreates a staff member who can perform loyalty operations.\n\nHTTP: POST /api/agent/v1/partner/staff",
        "input_schema": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "maxLength": 120
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 120
                },
                "password": {
                    "type": "string",
                    "maxLength": 48,
                    "minLength": 6
                },
                "club_id": {
                    "description": "Assign to a specific club",
                    "type": "string",
                    "format": "uuid"
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                }
            },
            "required": [
                "name",
                "email",
                "password"
            ]
        }
    },
    {
        "name": "get_staff_member",
        "description": "Get a specific staff member\nReturns a single staff member by ID.\n\nHTTP: GET /api/agent/v1/partner/staff/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_staff_member",
        "description": "Update an existing staff member\nUpdates a staff member owned by the authenticated partner.\n\nHTTP: PUT /api/agent/v1/partner/staff/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "type": "string",
                    "maxLength": 120
                },
                "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 120
                },
                "password": {
                    "type": "string",
                    "maxLength": 48,
                    "minLength": 6
                },
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_staff_member",
        "description": "Delete a staff member\nPermanently deletes a staff member owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/staff/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_stamp_cards",
        "description": "List all stamp cards for this partner\nReturns paginated stamp cards owned by the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/stamp-cards",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_stamp_card",
        "description": "Create a new stamp card\nCreates a stamp card with the specified configuration. Requires stamp cards feature to be enabled.\n\nHTTP: POST /api/agent/v1/partner/stamp-cards",
        "input_schema": {
            "type": "object",
            "properties": {
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "type": "string",
                    "maxLength": 250
                },
                "head": {
                    "description": "Translatable header",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "reward_title": {
                    "description": "Reward title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "stamps_required": {
                    "type": "integer",
                    "maximum": 100,
                    "minimum": 1
                },
                "stamps_per_purchase": {
                    "type": "integer",
                    "maximum": 100,
                    "minimum": 1
                },
                "max_stamps_per_transaction": {
                    "type": "integer",
                    "minimum": 1
                },
                "max_stamps_per_day": {
                    "type": "integer",
                    "minimum": 1
                },
                "stamps_expire_days": {
                    "type": "integer",
                    "maximum": 365,
                    "minimum": 1
                },
                "min_purchase_amount": {
                    "type": "number",
                    "minimum": 0
                },
                "currency": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 3
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                }
            },
            "required": [
                "club_id",
                "name",
                "stamps_required"
            ]
        }
    },
    {
        "name": "get_stamp_card",
        "description": "Get a specific stamp card\nReturns a single stamp card by ID.\n\nHTTP: GET /api/agent/v1/partner/stamp-cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_stamp_card",
        "description": "Update an existing stamp card\nUpdates a stamp card owned by the authenticated partner. Only provided fields are updated.\n\nHTTP: PUT /api/agent/v1/partner/stamp-cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "type": "string",
                    "maxLength": 250
                },
                "stamps_required": {
                    "type": "integer",
                    "maximum": 100,
                    "minimum": 1
                },
                "stamps_expire_days": {
                    "description": "Days of inactivity before stamps expire. Explicit null removes the rule and clears every member's pending expiry deadline; a changed value applies from each member's next stamp.",
                    "type": "integer",
                    "nullable": true,
                    "maximum": 365,
                    "minimum": 1
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_stamp_card",
        "description": "Delete a stamp card\nPermanently deletes a stamp card owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/stamp-cards/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "add_stamps",
        "description": "Add stamps to a member's stamp card\nAwards stamp(s) to a member on the specified stamp card. If the card is completed, a pending reward is created.\n\nHTTP: POST /api/agent/v1/partner/stamp-cards/{id}/stamps",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Stamp card UUID (path parameter)"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "stamps": {
                    "description": "Number of stamps to add (default 1). 100 is the absolute ceiling; the effective per-call limit is card-dependent: on a card with no per-transaction cap it is stamps_required (one full card), and on a capped card it is that cap.",
                    "type": "integer",
                    "default": 1,
                    "maximum": 100,
                    "minimum": 1
                },
                "purchase_amount": {
                    "description": "Purchase amount (for minimum purchase validation)",
                    "type": "number",
                    "minimum": 0
                },
                "note": {
                    "type": "string",
                    "maxLength": 500
                }
            },
            "required": [
                "id",
                "member_identifier"
            ]
        }
    },
    {
        "name": "redeem_stamp_reward",
        "description": "Redeem a pending stamp reward\nRedeems one pending reward for a member on the specified stamp card. The member must have a completed card with an unclaimed reward.\n\nHTTP: POST /api/agent/v1/partner/stamp-cards/{id}/redeem",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Stamp card UUID (path parameter)"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "note": {
                    "type": "string",
                    "maxLength": 500
                }
            },
            "required": [
                "id",
                "member_identifier"
            ]
        }
    },
    {
        "name": "list_tiers",
        "description": "List all tiers for this partner\nReturns paginated tiers owned by the authenticated partner, ordered by level.\n\nHTTP: GET /api/agent/v1/partner/tiers",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_tier",
        "description": "Create a new tier\nCreates a loyalty tier within a club.\n\nHTTP: POST /api/agent/v1/partner/tiers",
        "input_schema": {
            "type": "object",
            "properties": {
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "type": "string"
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "level": {
                    "description": "Sort order / tier level",
                    "type": "integer",
                    "minimum": 0
                },
                "points_threshold": {
                    "type": "integer",
                    "minimum": 0
                },
                "points_multiplier": {
                    "type": "number",
                    "maximum": 100,
                    "minimum": 1
                },
                "color": {
                    "type": "string",
                    "example": "#FFD700",
                    "maxLength": 7
                },
                "icon": {
                    "type": "string",
                    "maxLength": 50
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                }
            },
            "required": [
                "club_id",
                "name",
                "level"
            ]
        }
    },
    {
        "name": "get_tier",
        "description": "Get a specific tier\nReturns a single tier by ID.\n\nHTTP: GET /api/agent/v1/partner/tiers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_tier",
        "description": "Update an existing tier\nUpdates a tier owned by the authenticated partner.\n\nHTTP: PUT /api/agent/v1/partner/tiers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "type": "string"
                },
                "level": {
                    "type": "integer",
                    "minimum": 0
                },
                "points_threshold": {
                    "type": "integer",
                    "minimum": 0
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_tier",
        "description": "Delete a tier\nPermanently deletes a tier owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/tiers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "list_transactions",
        "description": "List transactions for this partner\nReturns paginated transactions with optional filters by member, card, event type, and date range.\n\nHTTP: GET /api/agent/v1/partner/transactions",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                },
                "member_identifier": {
                    "type": "string",
                    "description": "Filter by member (UUID, email, member number, or unique identifier)"
                },
                "card_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Filter by loyalty card"
                },
                "event": {
                    "type": "string",
                    "description": "Filter by event type"
                },
                "from": {
                    "type": "string",
                    "format": "date",
                    "description": "Start date (Y-m-d)"
                },
                "to": {
                    "type": "string",
                    "format": "date",
                    "description": "End date (Y-m-d)"
                }
            },
            "required": []
        }
    },
    {
        "name": "record_purchase",
        "description": "Record a purchase and award loyalty points\nRecords a purchase transaction. Points awarded are calculated from the card's points_per_currency ratio, or can be set explicitly via the points parameter. The member_identifier accepts UUID, email, member number, or unique identifier.\n\nHTTP: POST /api/agent/v1/partner/transactions/purchase",
        "input_schema": {
            "type": "object",
            "properties": {
                "card_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "purchase_amount": {
                    "description": "Required unless points is set",
                    "type": "number",
                    "minimum": 0.01
                },
                "points": {
                    "description": "Override calculated points",
                    "type": "integer",
                    "maximum": 2147483647,
                    "minimum": 0
                },
                "staff_id": {
                    "description": "Attribute to a staff member",
                    "type": "string",
                    "format": "uuid"
                },
                "note": {
                    "type": "string",
                    "maxLength": 500
                },
                "source_reference": {
                    "description": "Stable sale identity (platform:store:till:sale-id). Makes the request retry-safe: the same Business and reference award once, and identical retries return the original result.",
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
                    "maxLength": 128
                },
                "currency": {
                    "description": "Uppercase ISO 4217 code of the source sale. Required with source_reference; must match the card currency.",
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 3
                },
                "source_completed_at": {
                    "description": "Original sale completion time as an ISO 8601 instant with whole seconds, either with a numeric offset (2026-08-26T09:41:07+02:00) or with the UTC Z designator (2026-08-26T07:41:07Z); the two are equivalent, including on a retry. Fractional seconds are rejected, and so is any offset beyond \u00b114:00 (the outer edge is exactly \u00b114:00). Required with source_reference; governs the transaction time, points expiry, and scheduled bonus windows. New sales may be at most 7 days old and 5 minutes in the future.",
                    "type": "string"
                }
            },
            "required": [
                "card_id",
                "member_identifier"
            ]
        }
    },
    {
        "name": "redeem_reward",
        "description": "Redeem a reward and deduct loyalty points\nClaims a reward for a member, deducting the required points from their balance. The reward must be linked to the specified card.\n\nHTTP: POST /api/agent/v1/partner/transactions/redeem",
        "input_schema": {
            "type": "object",
            "properties": {
                "card_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "reward_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "staff_id": {
                    "description": "Attribute to a staff member",
                    "type": "string",
                    "format": "uuid"
                },
                "note": {
                    "type": "string",
                    "maxLength": 500
                }
            },
            "required": [
                "card_id",
                "reward_id",
                "member_identifier"
            ]
        }
    },
    {
        "name": "deduct_points",
        "description": "Deduct points from a member balance\nDeducts a custom number of points from a member's loyalty card balance. Points are consumed FIFO (oldest first). A required note records the reason. Use this for off-platform rewards like gift cards or external fulfillment.\n\nHTTP: POST /api/agent/v1/partner/transactions/deduct",
        "input_schema": {
            "type": "object",
            "properties": {
                "card_id": {
                    "description": "Loyalty card to deduct from",
                    "type": "string",
                    "format": "uuid"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "points": {
                    "description": "Number of points to deduct",
                    "type": "integer",
                    "minimum": 1
                },
                "note": {
                    "description": "Required reason for the deduction",
                    "type": "string",
                    "maxLength": 1024
                },
                "reference": {
                    "description": "External reference for linking to an external system",
                    "type": "string",
                    "nullable": true,
                    "maxLength": 255
                },
                "staff_id": {
                    "description": "Attribute to a staff member",
                    "type": "string",
                    "format": "uuid",
                    "nullable": true
                }
            },
            "required": [
                "card_id",
                "member_identifier",
                "points",
                "note"
            ]
        }
    },
    {
        "name": "list_vouchers",
        "description": "List all vouchers for this partner\nReturns paginated vouchers owned by the authenticated partner.\n\nHTTP: GET /api/agent/v1/partner/vouchers",
        "input_schema": {
            "type": "object",
            "properties": {
                "page": {
                    "type": "integer",
                    "default": 1
                },
                "per_page": {
                    "type": "integer",
                    "default": 25,
                    "maximum": 100,
                    "minimum": 1
                }
            },
            "required": []
        }
    },
    {
        "name": "create_voucher",
        "description": "Create a new voucher\nCreates a voucher with the specified type and value. If no code is provided, one is generated automatically.\n\nHTTP: POST /api/agent/v1/partner/vouchers",
        "input_schema": {
            "type": "object",
            "properties": {
                "club_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "name": {
                    "type": "string",
                    "maxLength": 128
                },
                "title": {
                    "description": "Display title (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "description": {
                    "description": "Description (translatable)",
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "object",
                            "additionalProperties": {
                                "type": "string"
                            }
                        }
                    ]
                },
                "code": {
                    "description": "Voucher code (auto-generated if omitted)",
                    "type": "string",
                    "maxLength": 32
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "percentage",
                        "fixed_amount",
                        "free_product",
                        "bonus_points"
                    ]
                },
                "value": {
                    "description": "Discount value (required for percentage/fixed_amount)",
                    "type": "integer",
                    "minimum": 0
                },
                "currency": {
                    "type": "string",
                    "maxLength": 3,
                    "minLength": 3
                },
                "points_value": {
                    "description": "Points to award (for bonus_points type)",
                    "type": "integer",
                    "minimum": 1
                },
                "max_uses_total": {
                    "type": "integer",
                    "minimum": 1
                },
                "max_uses_per_member": {
                    "type": "integer",
                    "minimum": 1
                },
                "valid_from": {
                    "type": "string",
                    "format": "date"
                },
                "valid_until": {
                    "type": "string",
                    "format": "date"
                },
                "is_active": {
                    "type": "boolean",
                    "default": true
                },
                "is_public": {
                    "type": "boolean",
                    "default": false
                }
            },
            "required": [
                "club_id",
                "name",
                "type"
            ]
        }
    },
    {
        "name": "get_voucher",
        "description": "Get a specific voucher\nReturns a single voucher by ID.\n\nHTTP: GET /api/agent/v1/partner/vouchers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "update_voucher",
        "description": "Update an existing voucher\nUpdates a voucher owned by the authenticated partner. Only provided fields are updated.\n\nHTTP: PUT /api/agent/v1/partner/vouchers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                },
                "name": {
                    "type": "string",
                    "maxLength": 128
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "percentage",
                        "fixed_amount",
                        "free_product",
                        "bonus_points"
                    ]
                },
                "value": {
                    "type": "integer",
                    "minimum": 0
                },
                "valid_until": {
                    "type": "string",
                    "format": "date"
                },
                "is_active": {
                    "type": "boolean"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "delete_voucher",
        "description": "Delete a voucher\nSoft-deletes a voucher owned by the authenticated partner.\n\nHTTP: DELETE /api/agent/v1/partner/vouchers/{id}",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "(path parameter)"
                }
            },
            "required": [
                "id"
            ]
        }
    },
    {
        "name": "validate_voucher",
        "description": "Validate a voucher code without redeeming\nChecks if a voucher code is valid for a member and optionally calculates the discount for a given order amount.\n\nHTTP: POST /api/agent/v1/partner/vouchers/validate",
        "input_schema": {
            "type": "object",
            "properties": {
                "code": {
                    "description": "Voucher code to validate",
                    "type": "string"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "club_id": {
                    "description": "Club the voucher belongs to",
                    "type": "string",
                    "format": "uuid"
                },
                "order_amount": {
                    "description": "Order amount in cents for discount calculation",
                    "type": "integer",
                    "minimum": 0
                }
            },
            "required": [
                "code",
                "member_identifier",
                "club_id"
            ]
        }
    },
    {
        "name": "redeem_voucher",
        "description": "Redeem a voucher for a member\nRedeems a voucher for a member, applying the discount/bonus and recording the usage. Uses transactional locking to prevent race conditions.\n\nHTTP: POST /api/agent/v1/partner/vouchers/{id}/redeem",
        "input_schema": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Voucher UUID (path parameter)"
                },
                "member_identifier": {
                    "description": "UUID, email, member number, or unique identifier",
                    "type": "string"
                },
                "order_amount": {
                    "description": "Order amount in cents",
                    "type": "integer",
                    "minimum": 0
                },
                "order_reference": {
                    "description": "External order reference",
                    "type": "string",
                    "maxLength": 64
                }
            },
            "required": [
                "id",
                "member_identifier"
            ]
        }
    }
]