{"get_platform_info":{"name":"Loyal Spark","chain":"Base L2","chain_id":8453,"builder_code":"bc_wdmnog7m","token_standards":["B20","ERC-20"],"default_token_standard":"b20","features":["loyalty_programs","rewards","marketplace","tiers","referrals","vouchers","analytics"],"api_docs":"https://loyalspark.online/api-docs"},"protocol":"mcp-streamable-http","how_to_call":"MCP JSON-RPC uses POST https://api.loyalspark.online/recipient-loyalty-mcp with Content-Type: application/json (Accept: application/json is enough). Methods include initialize, tools/list, and tools/call. GET/HEAD return this discovery JSON only — there is no SSE stream on GET (stateless server). Send x-api-key: rwk_... for holder calls, or pay per call at https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/<tool_name>.","response_contract":{"rule":"Read error_code, charged, and next_steps.action on every error. Follow next_steps.request. Do not pay when the same inputs would stay charged:false.","unpaid_402":"payment_required with accepts, example_input, key_required, charged:false. If key_required, get_api_key_then_pay before signing.","mcp_tool_error":"JSON-RPC result.isError:true (HTTP 200). Paid gateway prechecks also set top-level error_code, charged:false, next_steps, X-LoyalSpark-Error-Code.","docs":"https://loyalspark.online/llms.txt"},"tools":[{"name":"get_recipient_profile","description":"Recipient agent profile bound to rwk_ API key: wallet address, key scopes, and registration metadata.","input_schema":{"type":"object","properties":{}}},{"name":"list_my_loyalty_balances","description":"All loyalty token balances and tier levels for the holder wallet linked to this rwk_ key.","input_schema":{"type":"object","properties":{}}},{"name":"get_my_loyalty_balance","description":"Balance and tier for one loyalty program token held by the authenticated recipient wallet.","input_schema":{"type":"object","properties":{"token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Loyalty program B20/ERC-20 contract on Base."}},"required":["token_address"]}},{"name":"prepare_loyalty_token_transfer","description":"Build B20/ERC-20 transfer calldata for the holder wallet to send loyalty tokens to any address (submit tx locally).","input_schema":{"type":"object","anyOf":[{"required":["to"]},{"required":["to_address"]}],"properties":{"token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Loyalty program token contract."},"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Recipient wallet address."},"to_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Alias for to (same as REST to_address)."},"amount":{"type":"number","description":"Whole-token amount to transfer."}},"required":["token_address","amount"]}},{"name":"list_rewards_for_program","description":"List active rewards you can redeem for a program where your wallet has loyalty activity or balance.","input_schema":{"type":"object","properties":{"token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Loyalty program token contract."}},"required":["token_address"]}},{"name":"list_my_vouchers","description":"List vouchers issued to your wallet (active, used, expired) across enrolled loyalty programs.","input_schema":{"type":"object","properties":{}}},{"name":"redeem_my_reward","description":"Redeem a reward into an active voucher after paying the token cost on-chain (requires transfer tx hash).","input_schema":{"type":"object","properties":{"reward_id":{"type":"string","format":"uuid","description":"Reward UUID from list_rewards_for_program."},"transaction_hash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"On-chain transfer tx paying the reward token cost."}},"required":["reward_id","transaction_hash"]}},{"name":"list_p2p_offers","description":"List open peer-to-peer token swap offers; optional filter by loyalty token (same price band as merchant GET /offers).","input_schema":{"type":"object","properties":{"token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional filter: offers involving this token."}}}},{"name":"create_p2p_offer","description":"Create a P2P swap intent: offer loyalty tokens in exchange for another B20/ERC-20 token amount.","input_schema":{"type":"object","properties":{"offer_token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Token you are offering."},"offer_amount":{"type":"number","description":"Amount of offer token (whole units)."},"request_token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Token you want in return."},"request_amount":{"type":"number","description":"Amount of request token (whole units)."}},"required":["offer_token_address","offer_amount","request_token_address","request_amount"]}},{"name":"accept_p2p_offer","description":"Accept another holder's P2P offer and record the match in Loyal Spark.","input_schema":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"P2P offer UUID from list_p2p_offers."}},"required":["offer_id"]}},{"name":"cancel_p2p_offer","description":"Cancel a P2P offer you created before it is accepted.","input_schema":{"type":"object","properties":{"offer_id":{"type":"string","format":"uuid","description":"P2P offer UUID to cancel."}},"required":["offer_id"]}},{"name":"lookup_gift_certificate","description":"Preview a gift certificate by LOYAL-XXXXXX code without claiming (face value, expiry, program).","input_schema":{"type":"object","properties":{"code":{"type":"string","description":"Gift certificate code (LOYAL-XXXX-XXXX)."}},"required":["code"]}},{"name":"claim_gift_certificate","description":"Claim an active gift certificate; binds it to your wallet (status active -> pending_mint).","input_schema":{"type":"object","properties":{"code":{"type":"string","description":"Gift certificate code to claim."}},"required":["code"]}},{"name":"list_my_gift_certificates","description":"List gift certificates claimed by your wallet with optional status filter.","input_schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","pending_mint","redeemed","revoked","expired"],"description":"Filter by certificate lifecycle status."},"limit":{"type":"number","description":"Max rows to return (default 50)."}}}},{"name":"get_reward_workflow_status","description":"Autonomous status planner for recipients: returns current reward redemption step and machine-readable next_actions[] (check balance -> prepare transfer -> redeem -> voucher).","input_schema":{"type":"object","properties":{"token_address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Loyalty program token contract."},"reward_id":{"type":"string","format":"uuid","description":"Optional specific reward UUID to focus the plan on."}},"required":["token_address"]}},{"name":"prepare_reward_redemption","description":"One-shot planner: returns B20/ERC-20 transfer calldata for the reward token cost plus the recipient_reward workflow so the agent can broadcast the tx and then call redeem_my_reward.","input_schema":{"type":"object","properties":{"reward_id":{"type":"string","format":"uuid","description":"Reward UUID from list_rewards_for_program."}},"required":["reward_id"]}},{"name":"bazaar_discover_resources","description":"Discover third-party x402 resources. Schema: POST tools/list."},{"name":"bazaar_discover_mcp_servers","description":"Search CDP Bazaar MCP (search_resources) for x402 tools. Schema: POST tools/list."},{"name":"bazaar_probe_x402","description":"Read x402 payment requirements for an https URL without paying. Schema: POST tools/list."},{"name":"bazaar_pay_and_call","description":"Pay an x402 URL and call it. Schema: POST tools/list."}],"tool_count":20,"tools_list":{"method":"POST","url":"https://api.loyalspark.online/recipient-loyalty-mcp","headers":{"Content-Type":"application/json","Accept":"application/json, text/event-stream"},"body":{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}},"openapi":"https://loyalspark.online/openapi.json","auth":{"merchant_api_key":{"header":"x-api-key","prefix":"lsk_","instruction":"Send x-api-key: lsk_... (or Authorization: Bearer lsk_...) on merchant REST and MCP calls that change data or read your own account."},"recipient_api_key":{"header":"x-api-key","prefix":"rwk_","instruction":"Send x-api-key: rwk_... on recipient REST and recipient MCP calls for the holder wallet."},"siwe_registration":{"instruction":"An agent can register without a browser login. POST siwe-nonce, sign the EIP-4361 message (domain loyalspark.online, chain id 8453), then POST agent-register-siwe.","steps":[{"method":"POST","url":"https://api.loyalspark.online/siwe-nonce"},{"method":"POST","url":"https://api.loyalspark.online/agent-register-siwe"}]},"x402":{"asset":"USDC","chain":"Base","chain_id":8453,"price_range_usd":"$0.001–$0.01","instruction":"Permissionless pay-per-call. USDC on Base, $0.001–$0.01 per call. Pay $0.01 USDC at POST /x402-gateway/register-agent to get a full Free-plan lsk_ key (1 agent, 200 calls/mo, 1,000 mint tokens/mo, 1.25% fee, all 5 scopes) or a plan-scoped lsk_ key if on a Store/Agent plan.","register_agent_key":{"method":"POST","url":"https://api.loyalspark.online/x402-gateway/register-agent","price_usd":"0.01","plan":"free","scopes":["read","create_program","mint","trade","manage_rewards"],"api_calls_monthly":200,"max_mint_amount_monthly":1000,"transaction_fee_percent":1.25,"note":"Full Free-plan lsk_ key (not read-only) when the wallet has no Store Plan or Paid Agent Plan; plan-scoped otherwise. api_key is shown once: save it. Recover free via SIWE rotation (POST /siwe-nonce, then POST /agent-register-siwe with the same wallet and name)."},"mcp_tool_url":"https://api.loyalspark.online/x402-gateway/mcp-tools/<tool_name>","recipient_mcp_tool_url":"https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/<tool_name>"}},"scopes":["read","redeem","trade","transfer"],"x402_tool_url":"https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/<tool_name>"}