{"serverId":"mcp-registry/io.github.aspekt19/loyal-spark","tools":[{"name":"bazaar_pay_and_call","fixed":{"name":"bazaar_pay_and_call","description":"Pay a Loyal Spark x402 URL on api.loyalspark.online with the merchant agent's CDP MPC wallet (EIP-3009 exact scheme, Base USDC). Other hosts are refused before any signature. Requires scope 'mint' and an active CDP wallet. max_usdc default 0.25, hard limit 10.","inputSchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Full https:// URL of the x402 resource"},"body":{"description":"Optional JSON request body for non-GET methods","type":"string"},"method":{"enum":["GET","POST","PUT","PATCH","DELETE"],"type":"string","description":"HTTP method (default GET)"},"headers":{"type":"object","description":"Extra request headers (Accept/Content-Type auto-set)"},"max_usdc":{"type":"number","description":"Spend cap for THIS call in USDC (default 0.25, must be ≤ 10)"},"allowed_schemes":{"type":"array","items":{"type":"string"},"description":"x402 schemes to accept (default ['exact'])"},"allowed_networks":{"type":"array","items":{"type":"string"},"description":"Networks to accept (default ['base'])"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"schema","detail":"Added \"type\":\"string\" to untyped parameters: body. Change to number/boolean/array where that's what you accept.","verify":true},{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":300,"tokensAfter":304},{"name":"cancel_stale_offers","fixed":{"name":"cancel_stale_offers","description":"Cancel marketplace offers that have been active for more than N days with no completions. Admin-only action tool.","inputSchema":{"type":"object","properties":{"max_age_days":{"type":"number","description":"Cancel offers older than this many days (default: 14)"}}},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":87,"tokensAfter":87},{"name":"check_voucher_status","fixed":{"name":"check_voucher_status","description":"Check voucher status by code or ID. Requires a merchant agent key; only vouchers issued by the key owner's store are returned.","inputSchema":{"type":"object","properties":{"code":{"type":"string","description":"Voucher code (e.g. LOYAL-XXXX-XXXX-XXXX-XXXX)"},"voucher_id":{"type":"string","description":"Voucher UUID (alternative to code)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":109,"tokensAfter":109},{"name":"create_gift_certificate","fixed":{"name":"create_gift_certificate","description":"Create a gift / welcome certificate (UDS-style) with a unique random redemption code (LOYAL-XXXX-XXXX-XXXX). Customer redeems via QR or by entering the code; merchant then mints tokens on-chain. Use for welcome bonuses, promo campaigns, partnership gifts.","inputSchema":{"type":"object","required":["token_address","usd_amount"],"properties":{"title":{"type":"string","description":"Display title (default: 'Gift Certificate')"},"quantity":{"type":"number","description":"Number of certificates to create as a batch (1–100, default 1)"},"image_url":{"type":"string","description":"Optional public image URL for the cert design"},"usd_amount":{"type":"number","description":"Certificate face value in USD (positive)"},"description":{"type":"string","description":"Optional descriptive text shown to the customer"},"token_address":{"type":"string","description":"ERC-20 loyalty token address (must belong to the agent's merchant)"},"expires_in_days":{"type":"number","description":"Validity period in days (omit for no expiry)"},"points_per_dollar":{"type":"number","description":"Optional override of program rate (e.g. 10 = 10 tokens per $1). Defaults to program's points_per_dollar."},"max_redemption_percent":{"type":"number","description":"Max % of any future purchase the customer can pay with these tokens (5–100). Default 50."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":385,"tokensAfter":385},{"name":"create_loyalty_program","fixed":{"name":"create_loyalty_program","description":"Get factory calldata to deploy a new loyalty token on Base. Defaults to B20 (Base native ERC-20 superset, single tx, active immediately). Pass token_standard='erc20' for the legacy factory. For B20, MINT_ROLE is granted atomically to the merchant admin AND to the agent's CDP wallet (or explicit extra_minters) so autonomous agents can mint with no follow-up transaction.","inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Program name (required for external agents)"},"locale":{"type":"string"},"symbol":{"type":"string","description":"Token symbol, 2-5 chars (required for external agents)"},"auto_generate":{"type":"boolean","description":"Internal automation only — fills missing name/symbol from examples. External agents should pass explicit name and symbol."},"extra_minters":{"type":"array","items":{"type":"string"},"description":"(B20 only) Extra addresses to grant MINT_ROLE atomically in the same deploy tx."},"token_standard":{"type":"string","description":"'b20' (default, single-tx deploy on Base precompile factory) or 'erc20' (legacy factory, requires activate_loyalty_program follow-up)"},"expiration_days":{"type":"number","description":"Program duration in days (default: 365)"},"preferred_style":{"type":"string"},"target_audience":{"type":"string"},"business_context":{"type":"object","description":"Optional context for examples only"},"agent_wallet_address":{"type":"string","description":"(B20 only) Additional wallet to grant MINT_ROLE atomically. Defaults to the agent's active CDP MPC wallet if not provided."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":451,"tokensAfter":451},{"name":"create_personalized_offer","fixed":{"name":"create_personalized_offer","description":"Create a personalized offer for a specific customer. Use when analytics reveal engagement patterns (e.g., inactive customers, high-value segments).","inputSchema":{"type":"object","required":["token_address","customer_address","title"],"properties":{"title":{"type":"string","description":"Offer title (e.g., 'Welcome back! 20% bonus tokens')"},"valid_days":{"type":"number","description":"How many days the offer is valid (default: 7)"},"description":{"type":"string","description":"Offer description"},"bonus_tokens":{"type":"number","description":"Bonus tokens to award"},"token_address":{"type":"string","description":"Token contract address"},"customer_address":{"type":"string","description":"Customer wallet address"},"discount_percentage":{"type":"number","description":"Discount percentage (0-100)"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":240,"tokensAfter":240},{"name":"create_reward","fixed":{"name":"create_reward","description":"Create a new reward redeemable with loyalty tokens","inputSchema":{"type":"object","required":["token_address","name","cost"],"properties":{"cost":{"type":"number","description":"Token cost to redeem"},"name":{"type":"string","description":"Reward name"},"description":{"type":"string","description":"Reward description"},"token_address":{"type":"string","description":"Token contract address"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":122,"tokensAfter":122},{"name":"delete_report","fixed":{"name":"delete_report","description":"Delete a report that is no longer relevant. Use to clean up outdated or irrelevant reports.","inputSchema":{"type":"object","required":["report_id"],"properties":{"report_id":{"type":"string","description":"UUID of the report to delete"}}},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":78,"tokensAfter":78},{"name":"export_customers","fixed":{"name":"export_customers","description":"Export customer data for a specific loyalty program. Returns wallet addresses, voucher stats, balances, and tier info. Use for analytics, segmentation, and personalized offers.","inputSchema":{"type":"object","required":["token_address"],"properties":{"token_address":{"type":"string","description":"Token address of the loyalty program"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":107,"tokensAfter":107},{"name":"get_my_profile","fixed":{"name":"get_my_profile","description":"Get authenticated agent's profile","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":35,"tokensAfter":35},{"name":"get_platform_info","fixed":{"name":"get_platform_info","description":"Get info about Loyal Spark protocol on Base L2","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":39,"tokensAfter":39},{"name":"get_platform_stats","fixed":{"name":"get_platform_stats","description":"Get global platform statistics across all merchants. Admin-only: requires agent owned by an admin wallet.","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":56,"tokensAfter":56},{"name":"get_program_analytics","fixed":{"name":"get_program_analytics","description":"Get analytics for your loyalty programs","inputSchema":{"type":"object","properties":{}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":38,"tokensAfter":38},{"name":"get_program_workflow_status","fixed":{"name":"get_program_workflow_status","description":"Explain the next merchant action: current_step, required fields, and ordered next_actions (you provide all parameter values)","inputSchema":{"type":"object","properties":{"token_address":{"type":"string","description":"Optional token to inspect"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":84,"tokensAfter":84},{"name":"get_token_balance","fixed":{"name":"get_token_balance","description":"Get loyalty token balance and tier info for a customer","inputSchema":{"type":"object","required":["token_address","customer_address"],"properties":{"token_address":{"type":"string","description":"Token contract address"},"customer_address":{"type":"string","description":"Customer wallet"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":94,"tokensAfter":94},{"name":"list_gift_certificates","fixed":{"name":"list_gift_certificates","description":"List gift certificates issued by the agent's merchant (with status and redemption info).","inputSchema":{"type":"object","properties":{"limit":{"type":"number","description":"Max rows (default 50, max 200)"},"status":{"type":"string","description":"Filter by status: active, pending_mint, redeemed, expired, revoked"},"token_address":{"type":"string","description":"Filter by program token address (optional)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":129,"tokensAfter":129},{"name":"list_loyalty_programs","fixed":{"name":"list_loyalty_programs","description":"List loyalty programs owned by the agent's merchant","inputSchema":{"type":"object","properties":{"include_expired":{"type":"boolean","description":"Include expired programs"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":63,"tokensAfter":63},{"name":"list_marketplace_offers","fixed":{"name":"list_marketplace_offers","description":"List active token trading offers on the marketplace","inputSchema":{"type":"object","properties":{"limit":{"type":"number","description":"Max results (1-100)"},"status":{"type":"string","description":"Filter: active/completed/cancelled"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":81,"tokensAfter":81},{"name":"list_my_reports","fixed":{"name":"list_my_reports","description":"List your previously submitted reports. Allows reviewing past reports, checking status (new/reviewed/done), and identifying what still needs attention.","inputSchema":{"type":"object","properties":{"limit":{"type":"number","description":"Max results 1-50 (default: 20)"},"status":{"type":"string","description":"Filter by status: new, reviewed, done (optional)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":113,"tokensAfter":113},{"name":"list_rewards","fixed":{"name":"list_rewards","description":"List rewards for a loyalty program by token_address. Includes redemption metrics (total vouchers issued, redeemed, and last-30-day counts) for each reward.","inputSchema":{"type":"object","required":["token_address"],"properties":{"token_address":{"type":"string","description":"Token contract address (0x...)"}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":98,"tokensAfter":98},{"name":"list_store_discount_codes","fixed":{"name":"list_store_discount_codes","description":"List discount codes for this merchant's Shopify store, plus how customers spend points (online code, register voucher, or both).","inputSchema":{"type":"object","properties":{"token_address":{"type":"string","description":"Program address. Omit to list every linked store."}}},"annotations":{"readOnlyHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: true (inferred from the name).","verify":true}],"tokensBefore":92,"tokensAfter":92},{"name":"revoke_gift_certificate","fixed":{"name":"revoke_gift_certificate","description":"Revoke an active gift certificate (status active → revoked). Only the issuing merchant can revoke. Already-redeemed/minted certificates cannot be revoked.","inputSchema":{"type":"object","required":["certificate_id"],"properties":{"certificate_id":{"type":"string","description":"UUID of the certificate from create_gift_certificate / list_gift_certificates"}}},"annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: true, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":115,"tokensAfter":115},{"name":"send_report","fixed":{"name":"send_report","description":"Send a report to the developer/owner. Use this to submit SEO audits, growth ideas, data reports, anomalies, recommendations, or weekly summaries. The report will appear in the merchant's Agent Reports dashboard.","inputSchema":{"type":"object","required":["agent_role","report_type","title","content"],"properties":{"title":{"type":"string","description":"Report title (max 500 chars)"},"content":{"type":"string","description":"Report body text (max 10000 chars)"},"priority":{"type":"string","description":"Priority: low, medium, high, or critical"},"agent_role":{"type":"string","description":"Your role: ceo, seo, growth, or analyst"},"report_type":{"type":"string","description":"Type: seo_audit, growth_idea, data_report, anomaly, task, recommendation, or weekly_report"},"action_items":{"type":"array","items":{"type":"string"},"description":"List of suggested action items"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":257,"tokensAfter":257},{"name":"set_store_sales_channel","fixed":{"name":"set_store_sales_channel","description":"Set how this store's customers spend loyalty points: online (checkout code), offline (voucher at the register), or both (the shopper chooses).","inputSchema":{"type":"object","required":["channel"],"properties":{"channel":{"type":"string","description":"online, offline, or both"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":93,"tokensAfter":93},{"name":"transfer_loyalty_tokens","fixed":{"name":"transfer_loyalty_tokens","description":"Get calldata to transfer loyalty tokens between wallets","inputSchema":{"type":"object","required":["token_address","to","amount"],"properties":{"to":{"type":"string","description":"Recipient wallet (0x...)"},"amount":{"type":"number","description":"Tokens to transfer"},"token_address":{"type":"string","description":"Token contract address (0x...)"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: false (inferred from the name).","verify":true}],"tokensBefore":112,"tokensAfter":112},{"name":"update_program_config","fixed":{"name":"update_program_config","description":"Update default cashback_rate and/or points_per_dollar for a program (same as merchant dashboard sliders)","inputSchema":{"type":"object","required":["token_address"],"properties":{"cashback_rate":{"type":"number","description":"New default cashback % for earn (1–100). Omit to leave unchanged."},"token_address":{"type":"string","description":"Token contract address (0x...)"},"points_per_dollar":{"type":"number","description":"New points per $1 (0–1000, exclusive 0). Omit to leave unchanged."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":152,"tokensAfter":152},{"name":"update_program_status","fixed":{"name":"update_program_status","description":"Update program status in database after onchain activation/pause","inputSchema":{"type":"object","required":["token_address","status"],"properties":{"status":{"type":"string","description":"New status: active, paused, or inactive"},"token_address":{"type":"string","description":"Token contract address"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":99,"tokensAfter":99},{"name":"update_report_status","fixed":{"name":"update_report_status","description":"Update report status to 'reviewed' or 'done'. Use 'done' when the action items have been completed. Use 'reviewed' to acknowledge a report.","inputSchema":{"type":"object","required":["report_id","status"],"properties":{"status":{"type":"string","description":"New status: reviewed or done"},"report_id":{"type":"string","description":"UUID of the report"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":113,"tokensAfter":113},{"name":"update_reward_status","fixed":{"name":"update_reward_status","description":"Activate or deactivate a reward in the catalog. Use to manage reward availability based on analytics.","inputSchema":{"type":"object","required":["reward_id","is_active"],"properties":{"is_active":{"type":"boolean","description":"true to activate, false to deactivate"},"reward_id":{"type":"string","description":"UUID of the reward"}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":107,"tokensAfter":107},{"name":"update_store_discount_code","fixed":{"name":"update_store_discount_code","description":"Mark a Shopify discount code used, or cancel it and return the loyalty points. Same actions as the merchant discount-code journal.","inputSchema":{"type":"object","required":["redemption_id","action"],"properties":{"action":{"type":"string","description":"use or cancel"},"redemption_id":{"type":"string","description":"Id from list_store_discount_codes."}}},"annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":true}},"changes":[{"kind":"annotations","detail":"Added readOnlyHint: false, destructiveHint: false, idempotentHint: true (inferred from the name).","verify":true}],"tokensBefore":115,"tokensAfter":115}],"toolsChanged":30,"tokensSaved":0,"todo":[{"tool":"create_loyalty_program","params":["locale","preferred_style","target_audience"]},{"tool":"generate_program_defaults","params":["locale","category","description","business_name","preferred_style","target_audience"]}],"note":"Deterministic fixes. Changes marked verify need a human look before shipping (renames, inferred annotations, inferred types, removed text). Parameter descriptions in `todo` need to be written by someone who knows the API."}