{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "letsbot.net",
    "site": "letsbot.net",
    "addresses": [
      {
        "address": "172.67.176.240",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.176.0/20",
          "country": "US"
        }
      },
      {
        "address": "104.21.56.41",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.32.0/19",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3033::ac43:b0f0",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3033::/48",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3034::6815:3829",
        "endpoints": 2,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3034::/48",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "172.67.176.240",
          "104.21.56.41",
          "2606:4700:3033::ac43:b0f0",
          "2606:4700:3034::6815:3829"
        ],
        "first_seen": "2026-11-21T18:44:03.556Z",
        "last_seen": "2026-11-21T18:44:03.556Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "letsbot",
      "version": "1.0.0",
      "protocol_version": "2025-03-26"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000; includeSubDomains; preload",
      "access-control-allow-origin": "*"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 1,
      "sample": [
        {
          "id": "8562",
          "url": "https://cryptoexchangecomparehq.com/mcp",
          "server_name": "com.cryptoexchangecomparehq/site",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T08:21:09.527Z"
        }
      ]
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "net.letsbot",
      "total": 0,
      "sample": []
    },
    "same_repository": null,
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "44307",
    "server_name": "net.letsbot/mcp",
    "url": "https://letsbot.net/mcp",
    "host": "letsbot.net",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-21T18:44:03.556Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "5342a198136d3eeed7bc7a25c13158822f5f21f7487b755a1f2ae14b5027fd4a",
    "first_listed_at": "2026-11-21T18:44:03.556Z",
    "created_at": "2026-11-21T13:00:03.030Z",
    "resolved_addresses": [
      "172.67.176.240",
      "104.21.56.41",
      "2606:4700:3033::ac43:b0f0",
      "2606:4700:3034::6815:3829"
    ]
  },
  "server": {
    "name": "net.letsbot/mcp",
    "title": "LetsBot",
    "description": "WhatsApp Business messaging, live chat, chatbots, campaigns and CRM for a LetsBot workspace.",
    "version": "1.0.0",
    "registry_status": "active",
    "repository_url": null,
    "website_url": "https://letsbot.net/en/whatsapp-mcp.html",
    "published_at": "2026-10-31T18:58:13.794Z",
    "updated_at": "2026-10-31T18:58:13.794Z",
    "first_seen": "2026-11-21T12:55:06.766Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [
      "writes-files"
    ],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T16:04:39.325Z"
  },
  "operator": {
    "key": "letsbot.net",
    "name": "letsbot.net",
    "platform": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 1,
    "answered": 1,
    "answered_percent": 100,
    "avg_listing_latency_ms": 977,
    "first_check_in_window": "2026-11-21T18:44:03.556Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "5342a198136d3eeed7bc7a25c13158822f5f21f7487b755a1f2ae14b5027fd4a",
    "tools": 95,
    "resources": 0,
    "prompts": 0,
    "first_seen": "2026-11-21T18:44:04.539Z",
    "tool_names": [
      "send_text_message",
      "send_image",
      "send_video",
      "send_audio",
      "send_file",
      "send_location",
      "send_contact_card",
      "send_template",
      "send_buttons",
      "send_list",
      "send_carousel",
      "reply_to_message",
      "send_reaction",
      "forward_message",
      "upload_file",
      "get_contacts",
      "get_contact",
      "create_contact",
      "update_contact",
      "get_my_chats",
      "get_conversations_awaiting_reply",
      "pin_contact",
      "archive_contact",
      "block_contact",
      "delete_contact",
      "assign_label",
      "assign_moderator",
      "reassign_conversations",
      "get_assignment_rules",
      "update_assignment_rules",
      "add_note",
      "get_account_overview",
      "get_owner_briefing",
      "get_report",
      "list_whatsapp_templates",
      "create_whatsapp_template",
      "list_scheduled_activity",
      "cancel_scheduled_activity",
      "get_messages",
      "get_message_status",
      "search_messages",
      "mark_as_read",
      "get_groups",
      "get_group_messages",
      "send_group_message",
      "send_group_file",
      "get_labels",
      "create_label",
      "get_label_contacts",
      "get_moderators",
      "get_quick_replies",
      "create_quick_reply",
      "update_quick_reply",
      "delete_quick_reply",
      "update_label",
      "delete_label",
      "ai_suggest_reply",
      "ai_summarize_conversation",
      "ai_analyze_contact",
      "ai_improve_message",
      "ai_translate_message",
      "ai_sentiment_analysis",
      "ai_dashboard_summary",
      "get_order_status",
      "search_products",
      "get_abandoned_carts",
      "list_store_automations",
      "set_store_automation_active",
      "create_campaign",
      "get_campaigns",
      "get_campaign_status",
      "cancel_campaign",
      "resume_campaign",
      "resend_campaign",
      "get_bot_status",
      "toggle_bot",
      "get_bot_conversations",
      "create_simple_conversation",
      "create_interactive_conversation",
      "update_bot_conversation",
      "get_bot_settings",
      "update_bot_settings",
      "set_bot_conversation_active",
      "duplicate_bot_conversation",
      "delete_bot_conversation",
      "get_ad_lead_settings",
      "update_ad_lead_settings",
      "get_notification_template",
      "update_notification_template",
      "save_cart_reminder",
      "draft_bot_flow",
      "get_ai_assistant_settings",
      "update_ai_assistant_settings",
      "diagnose_messaging",
      "get_store_setup_checklist"
    ],
    "declared": {
      "tools": [
        {
          "name": "send_text_message",
          "description": "Send a text message to a contact on any connected platform: a WhatsApp number (international format without +, e.g. 201234567890), or the `phone` / `chat_id` of a website chat, Messenger, Instagram, Telegram, X or SMS contact exactly as get_conversations_awaiting_reply or get_contacts returns it. The message goes out on the platform the contact wrote from.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "message",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed (e.g. wc1-d838cd71… for a website chat visitor)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this message."
              },
              "message": {
                "type": "string",
                "description": "The text message to send"
              }
            }
          },
          "annotations": {
            "title": "Send Text Message",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_image",
          "description": "Send an image to a WhatsApp number with an optional caption.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "image_url",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "caption": {
                "type": "string",
                "description": "Optional caption for the image"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this image."
              },
              "image_url": {
                "type": "string",
                "description": "URL of the image to send"
              }
            }
          },
          "annotations": {
            "title": "Send Image",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_video",
          "description": "Send a video to a WhatsApp number with an optional caption.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "video_url",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "caption": {
                "type": "string",
                "description": "Optional caption for the video"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this video."
              },
              "video_url": {
                "type": "string",
                "description": "URL of the video to send"
              }
            }
          },
          "annotations": {
            "title": "Send Video",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_audio",
          "description": "Send an audio file or voice note to a WhatsApp number.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "audio_url",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this audio."
              },
              "audio_url": {
                "type": "string",
                "description": "URL of the audio file to send"
              }
            }
          },
          "annotations": {
            "title": "Send Audio",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_file",
          "description": "Send a document/file to a WhatsApp number. `file_url` must be a DIRECT url to the file itself. If you generated the file yourself, or it is not already at a direct public url, call upload_file first (it takes the bytes as base64 and returns a url plus the filename to pass here). A Google Drive / Dropbox / OneDrive share link is not a direct url — it points at a download page, and the file arrives as an unopenable \"BIN\" attachment.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "file_url",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "caption": {
                "type": "string",
                "description": "Optional caption for the file"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this file."
              },
              "file_url": {
                "type": "string",
                "description": "URL of the file to send"
              },
              "filename": {
                "type": "string",
                "description": "Display name INCLUDING the extension (e.g. invoice.pdf). WhatsApp shows this name and uses the extension to pick the file type, so a name without one arrives as a generic \"BIN\" attachment the recipient cannot open. Required whenever file_url has no filename in its path."
              }
            }
          },
          "annotations": {
            "title": "Send File",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_location",
          "description": "Send a location to a WhatsApp number.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "latitude",
              "longitude",
              "confirm"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Optional location name"
              },
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this location."
              },
              "latitude": {
                "type": "string",
                "description": "Latitude coordinate"
              },
              "longitude": {
                "type": "string",
                "description": "Longitude coordinate"
              }
            }
          },
          "annotations": {
            "title": "Send Location",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_contact_card",
          "description": "Send a contact card (vCard) to a WhatsApp number.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "contact_name",
              "contact_phone",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this contact card."
              },
              "contact_name": {
                "type": "string",
                "description": "Name on the contact card"
              },
              "organization": {
                "type": "string",
                "description": "Optional organization name"
              },
              "contact_phone": {
                "type": "string",
                "description": "Phone number on the contact card"
              }
            }
          },
          "annotations": {
            "title": "Send Contact Card",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_template",
          "description": "Send a WhatsApp-approved message template to a number. Templates are required for sending messages outside the 24-hour window.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "template_name",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this template."
              },
              "language": {
                "type": "string",
                "description": "Template language code (e.g. ar, en)"
              },
              "components": {
                "type": "object",
                "description": "Values for the template placeholders. Preferred shape is a map keyed by component: {\"body\": [\"Acme Ltd\", \"one-line summary\"]} — plain strings in the order the variables appear in the template text ({{1}}, {{2}} …). A template written with NAMED variables ({{customer_name}}, {{order_id}}) also takes the body as a map keyed by variable name, in any order: {\"body\": {\"customer_name\": \"Reem\", \"order_id\": \"A-17\"}} — every name in the template text is required and no other name is accepted; a plain list still works and is matched to the names in text order. A text header takes {\"title\": {\"{{1}}\": \"value\"}} (for a named header {\"title\": {\"order_id\": \"A-17\"}} also works); a MEDIA header (image, video, document) takes {\"title\": {\"type\": \"image\", \"url\": \"https://...\"}} and counts as a parameter of its own. A dynamic URL button takes {\"buttons\": {\"0\": \"summer-sale\"}} — keyed by the button's 0-based position in the template, and the value is ONLY the variable part that replaces {{1}} in the button URL, not the whole link (the long form {\"0\": {\"sub_type\": \"url\", \"type\": \"text\", \"{{1}}\": \"summer-sale\"}} also works). The WhatsApp Cloud API component array — [{\"type\":\"body\",\"parameters\":[{\"type\":\"text\",\"text\":\"...\"}]}, {\"type\":\"button\",\"sub_type\":\"url\",\"index\":\"0\",\"parameters\":[{\"type\":\"text\",\"text\":\"summer-sale\"}]}] — is also accepted and converted automatically; for a named template its body parameters may carry Meta's \"parameter_name\" ({\"type\":\"text\",\"parameter_name\":\"customer_name\",\"text\":\"Reem\"}) and are matched by that name. Omit for a template with no placeholders. Parameter values must be single-line: a newline or tab is rejected by Meta."
              },
              "template_name": {
                "type": "string",
                "description": "Name of the approved WhatsApp template"
              }
            }
          },
          "annotations": {
            "title": "Send Template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_buttons",
          "description": "Send an interactive message with buttons to a WhatsApp number. Maximum 3 buttons.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "body",
              "buttons",
              "confirm"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "Message body text"
              },
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "title": {
                "type": "string",
                "description": "Optional header title"
              },
              "footer": {
                "type": "string",
                "description": "Optional footer text"
              },
              "buttons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                },
                "description": "Array of button objects with id and title"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this button message."
              }
            }
          },
          "annotations": {
            "title": "Send Buttons",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_list",
          "description": "Send an interactive list/menu message to a WhatsApp number.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "body",
              "sections",
              "confirm"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "Message body text"
              },
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "title": {
                "type": "string",
                "description": "Optional header title"
              },
              "footer": {
                "type": "string",
                "description": "Optional footer text"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this list message."
              },
              "sections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                },
                "description": "Array of section objects with title and rows"
              },
              "button_text": {
                "type": "string",
                "description": "Text on the list button (e.g. \"View Options\")"
              }
            }
          },
          "annotations": {
            "title": "Send List",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_carousel",
          "description": "Send a carousel of cards (title, subtitle, image, up to 3 buttons each; max 10 cards) to a Messenger or Instagram contact. Provide the recipient PSID/IGSID and platform.",
          "inputSchema": {
            "type": "object",
            "required": [
              "recipient",
              "cards",
              "confirm"
            ],
            "properties": {
              "cards": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "title"
                  ],
                  "properties": {
                    "title": {
                      "type": "string",
                      "description": "Card title (required, up to 80 chars)."
                    },
                    "buttons": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "Up to 3 buttons. Each is a URL button {type:\"web_url\",title,url} or postback {type:\"postback\",title,payload}."
                    },
                    "subtitle": {
                      "type": "string",
                      "description": "Optional card subtitle."
                    },
                    "image_url": {
                      "type": "string",
                      "description": "Optional card image URL."
                    }
                  }
                },
                "maxItems": 10,
                "description": "Up to 10 cards."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this carousel."
              },
              "platform": {
                "enum": [
                  "messenger",
                  "instagram"
                ],
                "type": "string",
                "description": "Which Meta channel to send from. Defaults to messenger."
              },
              "recipient": {
                "type": "string",
                "description": "The contact PSID (Messenger) or IGSID (Instagram)."
              }
            }
          },
          "annotations": {
            "title": "Send Carousel",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "reply_to_message",
          "description": "Reply to a specific message in a conversation on any connected platform (WhatsApp, website chat, Messenger, Instagram, Telegram, …). Also replies inside a WhatsApp group when \"phone\" is the group's chat_id from get_groups (QR-connected numbers only), optionally tagging members with \"mentions\".",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "message_id",
              "text",
              "confirm"
            ],
            "properties": {
              "text": {
                "type": "string",
                "description": "The reply text. In a group, every \"@<number>\" (international format, e.g. @5511970793770) tags that member."
              },
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without +, or the contact's phone / chat_id as listed. To reply inside a WhatsApp group, the group's \"chat_id\" from get_groups (e.g. 120363041234567890@g.us)."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this reply."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional, WhatsApp groups on a QR-connected number only. Group members to tag (@mention) so WhatsApp highlights their name and notifies them: phone numbers in international format without + (e.g. \"5511970793770\") or member ids from WhatsApp (e.g. \"5511970793770@s.whatsapp.net\", \"123456789012345@lid\"). A member whose @<number> is not already in the text gets it added at the start automatically. Every @<number> already written in the text is tagged too, so this list is optional when the text names them. Max 50."
              },
              "message_id": {
                "type": "string",
                "description": "The WhatsApp message ID to reply to"
              }
            }
          },
          "annotations": {
            "title": "Reply To Message",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_reaction",
          "description": "Add an emoji reaction to a message in a WhatsApp conversation.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "message_id",
              "emoji",
              "confirm"
            ],
            "properties": {
              "emoji": {
                "type": "string",
                "description": "Emoji to react with (e.g. 👍, ❤️, 😂)"
              },
              "phone": {
                "type": "string",
                "description": "WhatsApp number in international format without + (e.g. 201234567890), or the contact's phone / chat_id as listed by get_conversations_awaiting_reply (website chat, Messenger, Instagram, Telegram…)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to send this reaction."
              },
              "message_id": {
                "type": "string",
                "description": "The WhatsApp message ID to react to"
              }
            }
          },
          "annotations": {
            "title": "Send Reaction",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "forward_message",
          "description": "Forward a message from one WhatsApp chat to another.",
          "inputSchema": {
            "type": "object",
            "required": [
              "message_id",
              "to_phone",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to forward this message."
              },
              "to_phone": {
                "type": "string",
                "description": "Phone number to forward to (international format without +)"
              },
              "message_id": {
                "type": "string",
                "description": "The WhatsApp message ID to forward"
              }
            }
          },
          "annotations": {
            "title": "Forward Message",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "upload_file",
          "description": "Put a file into LetsBot storage and get back a direct https url plus the filename to pass to send_file / send_group_file / send_image / send_video / send_audio. Two ways in — pass exactly one: `source_url` when the file is already online (a public link, including a Google Drive \"Anyone with the link\" share link or a Dropbox link; LetsBot downloads it server-side, max 20 MB), or `content_base64` only for a small file you generated yourself and hold the bytes of. Prefer `source_url` whenever a link exists: large base64 strings do not fit in a tool call. Never pass a Google Drive, Dropbox or OneDrive share link straight to the send tools: those point at a download page rather than at the file, so WhatsApp shows an unopenable \"BIN\" attachment — run it through this tool first. Each call stores a new copy at a new url — if you already have a url from this tool, reuse it instead of uploading again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "filename"
            ],
            "properties": {
              "filename": {
                "type": "string",
                "description": "Name INCLUDING the extension, e.g. \"invoice-2026-012.pdf\". The extension must match what the bytes actually are. Any directory part is discarded; the stored object is given a random name. This name is what WhatsApp shows the recipient, so pass it on to send_file / send_group_file as `filename`. Required for both source_url and content_base64 — a share link's path (/view, /uc) is not a file name."
              },
              "source_url": {
                "type": "string",
                "description": "A public http(s) link to the file; LetsBot downloads it (max 20 MB, 20 s). Google Drive share links (drive.google.com/file/d/<id>/view) and Dropbox links (?dl=0) are converted to their direct download form automatically — the Drive file must be shared as \"Anyone with the link\". Private, internal and non-http(s) addresses are refused. Use this OR content_base64, not both."
              },
              "content_base64": {
                "type": "string",
                "description": "The file contents, base64-encoded — only for a small file you generated yourself. Max 20 MB after decoding. A \"data:...;base64,\" prefix is accepted and its declared type is ignored — the real type is detected from the bytes. Use this OR source_url, not both."
              }
            }
          },
          "annotations": {
            "title": "Upload File",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_contacts",
          "description": "Get a paginated list of WhatsApp contacts with optional search and filter.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (default: 1)"
              },
              "filter": {
                "enum": [
                  "all",
                  "awaiting_reply",
                  "pinned",
                  "blocked",
                  "archived",
                  "favorites"
                ],
                "type": "string",
                "description": "Filter contacts. \"awaiting_reply\" = the customer sent the last message and no reply has been sent since (a work backlog, not a read state)."
              },
              "search": {
                "type": "string",
                "description": "Search by name, phone, or username"
              }
            }
          },
          "annotations": {
            "title": "Get Contacts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_contact",
          "description": "Get detailed information about a specific WhatsApp contact including labels, moderators, last message, and the workspace's contact custom fields (custom_fields: every available field with its key, label, type, current value — null when empty — and allowed options for select fields). Use those keys with update_contact to set or clear a custom field.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              }
            }
          },
          "annotations": {
            "title": "Get Contact",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_contact",
          "description": "Create a new WhatsApp contact in the system. Optionally set the workspace's contact custom fields in the same call (custom_fields: key → value).",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Contact name"
              },
              "email": {
                "type": "string",
                "description": "Optional email address"
              },
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              },
              "custom_fields": {
                "type": "object",
                "description": "The workspace's own contact custom fields, as an object of field key → value (e.g. {\"ficha_cliente\": \"Cliente desde 2024, prefiere entregas por la mañana\"}). Keys are defined by the workspace, so call get_contact first: its \"custom_fields\" list shows every available key with its type, label, current value and, for select fields, the allowed option values. Value formats by type: text/textarea/phone/email/url → string; number/currency → number; date → \"YYYY-MM-DD\"; datetime → \"YYYY-MM-DD HH:MM\"; boolean → true/false; select → one option value; multiselect → array of option values. Pass null (or \"\") to clear a field. Fields you leave out are not changed.",
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "annotations": {
            "title": "Create Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_contact",
          "description": "Update a contact's information: name, email, city, country, and the workspace's own contact custom fields (custom_fields: key → value, null clears). Call get_contact first to see which custom field keys exist, their types and allowed options. Only the fields you pass are changed.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "city": {
                "type": "string",
                "description": "City"
              },
              "name": {
                "type": "string",
                "description": "New name for the contact"
              },
              "email": {
                "type": "string",
                "description": "New email"
              },
              "phone": {
                "type": "string",
                "description": "Phone number of the contact to update"
              },
              "country": {
                "type": "string",
                "description": "Country"
              },
              "custom_fields": {
                "type": "object",
                "description": "The workspace's own contact custom fields, as an object of field key → value (e.g. {\"ficha_cliente\": \"Cliente desde 2024, prefiere entregas por la mañana\"}). Keys are defined by the workspace, so call get_contact first: its \"custom_fields\" list shows every available key with its type, label, current value and, for select fields, the allowed option values. Value formats by type: text/textarea/phone/email/url → string; number/currency → number; date → \"YYYY-MM-DD\"; datetime → \"YYYY-MM-DD HH:MM\"; boolean → true/false; select → one option value; multiselect → array of option values. Pass null (or \"\") to clear a field. Fields you leave out are not changed.",
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "annotations": {
            "title": "Update Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_my_chats",
          "description": "Get the chats assigned to the person this connection acts as. A workspace-level connection (API key) gets every assigned chat.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (default: 1)"
              },
              "search": {
                "type": "string",
                "description": "Search by name or phone"
              }
            }
          },
          "annotations": {
            "title": "Get My Chats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_conversations_awaiting_reply",
          "description": "List conversations where the customer wrote last and nobody has replied yet, newest first. This is a backlog of work outstanding, NOT a read/unread state: it is derived from who spoke last, so it clears when a reply is sent from any device and returns if the customer writes again. It is unaffected by whether anyone has opened the chat. A customer who wrote to two of your WhatsApp numbers has one conversation per number: each number still waiting is its own row (whatsapp_channel_id) — reply on THAT number by passing channel_id to the send tool.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (default: 1)"
              }
            }
          },
          "annotations": {
            "title": "Conversations Awaiting a Reply",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "pin_contact",
          "description": "Pin or unpin a contact chat so it stays at the top of the list.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "pin": {
                "type": "boolean",
                "description": "true to pin, false to unpin (default: true)"
              },
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              }
            }
          },
          "annotations": {
            "title": "Pin Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "archive_contact",
          "description": "Archive or unarchive a contact chat.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              },
              "archive": {
                "type": "boolean",
                "description": "true to archive, false to unarchive (default: true)"
              }
            }
          },
          "annotations": {
            "title": "Archive Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "block_contact",
          "description": "Block or unblock a WhatsApp contact.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "block": {
                "type": "boolean",
                "description": "true to block, false to unblock (default: true)"
              },
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              }
            }
          },
          "annotations": {
            "title": "Block Contact",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_contact",
          "description": "Permanently delete one contact (a one-to-one chat) together with its whole conversation: every message and media file is erased shortly after, and this cannot be undone. Same as Delete on the contact in the LetsBot panel. Requires confirm: call with confirm=false first to get a preview (name, message count, labels, assigned team members), show it to the user, then call again with confirm=true. It does NOT block the number — the customer can still write again, which creates a new, empty contact; use block_contact to stop someone messaging, or archive_contact to just hide a chat. WhatsApp groups cannot be deleted with this tool. Exporting contacts is only available in the LetsBot panel.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "confirm"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact in international format without + (e.g. 201234567890), or the chat id shown by get_contact."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to permanently delete this contact and erase its conversation."
              }
            }
          },
          "annotations": {
            "title": "Delete a Contact and its Conversation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "assign_label",
          "description": "Assign or remove a label from a contact. Toggles the label — if already assigned it will be removed, if not assigned it will be added.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "label_id"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact"
              },
              "label_id": {
                "type": "integer",
                "description": "ID of the label to assign/remove"
              }
            }
          },
          "annotations": {
            "title": "Assign Label",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "assign_moderator",
          "description": "Assign a team member (moderator) to a conversation, or remove them from it. Pass action=assign or action=unassign to say which; without action the call toggles (adds if absent, removes if present). The assigned member is notified. To move many conversations from one member to another at once, use reassign_conversations.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "user_id"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact"
              },
              "action": {
                "enum": [
                  "assign",
                  "unassign",
                  "toggle"
                ],
                "type": "string",
                "description": "assign: add the member (no change if already assigned). unassign: remove them (no change if not assigned). toggle (default): flip."
              },
              "user_id": {
                "type": "integer",
                "description": "ID of the moderator/user to assign/remove"
              }
            }
          },
          "annotations": {
            "title": "Assign Moderator",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reassign_conversations",
          "description": "Move conversations from one team member to another in one step — e.g. \"move Ahmed's waiting chats to Mona\". By default only the conversations awaiting a reply (the customer wrote last) move; use scope=all for every open conversation the member holds, or waiting_longer_than_minutes for only the late ones. The giver is removed, the receiver is assigned and notified, and the change is recorded in the conversation history. Get member ids from get_moderators or get_agent_performance.",
          "inputSchema": {
            "type": "object",
            "required": [
              "from_user_id",
              "to_user_id",
              "confirm"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Most conversations to move in this call, oldest wait first. Default 200, max 500."
              },
              "scope": {
                "enum": [
                  "all",
                  "awaiting_reply"
                ],
                "type": "string",
                "description": "awaiting_reply (default): only conversations where the customer is waiting for an answer. all: every non-archived conversation assigned to from_user_id."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to move the conversations."
              },
              "to_user_id": {
                "type": "integer",
                "description": "Team member who receives them."
              },
              "from_user_id": {
                "type": "integer",
                "description": "Team member whose conversations move away."
              },
              "waiting_longer_than_minutes": {
                "type": "integer",
                "description": "Only conversations whose customer has been waiting at least this many minutes (implies awaiting_reply). E.g. 60 = waiting an hour or more."
              }
            }
          },
          "annotations": {
            "title": "Reassign Conversations Between Team Members",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_assignment_rules",
          "description": "Read how new conversations are automatically given to team members (operators): the assignment mode (off / round robin / least open), which team receives them, whether only available operators count, the per-operator cap, reassigning a conversation when its operator does not reply in time, rebalancing, and the backup operator. Each setting comes with a plain-words explanation, plus the teams, operators and limits you can use with update_assignment_rules. Read-only. Use get_workload / get_agent_performance for who currently holds which chats, and reassign_conversations to move chats by hand.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Conversation Assignment Rules",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_assignment_rules",
          "description": "Change how new conversations are automatically given to team members. Pass ONLY the settings to change; everything else stays as it is. Call get_assignment_rules first to see the current values, the teams and the operators you can use. Examples: turn it on with mode=\"round_robin\"; cap each operator at 10 chats with max_open=10; move a chat nobody answered within 15 minutes with reassign_after_minutes=15; set max_open/reassign_after_minutes/team_id/fallback_user_id to null to clear them. A backup operator (fallback_user_id) is required when after_last_hop or when_full is \"fallback\". Returns the settings before and after. Sends nothing to customers and does not move existing chats by itself (use reassign_conversations for that).",
          "inputSchema": {
            "type": "object",
            "properties": {
              "mode": {
                "enum": [
                  "off",
                  "round_robin",
                  "least_open"
                ],
                "type": "string",
                "description": "off = no automatic assignment by this rule; round_robin = operators take turns; least_open = operator with the fewest chats."
              },
              "team_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Only members of this active team receive conversations; null = all operators with live-chat access."
              },
              "max_open": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Max conversations one operator may hold (1-500); null = no cap."
              },
              "on_reopen": {
                "type": "boolean",
                "description": "true = a conversation the customer reopens is assigned again by this rule."
              },
              "rebalance": {
                "type": "boolean",
                "description": "true = move chats off an operator who holds more than max_open."
              },
              "when_full": {
                "enum": [
                  "wait",
                  "fallback"
                ],
                "type": "string",
                "description": "When everyone is at the cap: wait = the chat waits until someone has room; fallback = give it to the backup operator."
              },
              "count_basis": {
                "enum": [
                  "open",
                  "awaiting"
                ],
                "type": "string",
                "description": "What the cap counts: open = assigned open chats; awaiting = chats where the customer is waiting for a reply."
              },
              "after_last_hop": {
                "enum": [
                  "stay",
                  "fallback"
                ],
                "type": "string",
                "description": "After the last move: stay = keep the last operator; fallback = give it to the backup operator."
              },
              "only_available": {
                "type": "boolean",
                "description": "true = skip operators who are away/offline."
              },
              "fallback_user_id": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Backup operator id (from get_assignment_rules choices.operators); null = none."
              },
              "excluded_channels": {
                "type": "array",
                "items": {
                  "enum": [
                    "whatsapp",
                    "messenger",
                    "instagram",
                    "telegram",
                    "webchat",
                    "email",
                    "sms",
                    "tiktok",
                    "x"
                  ],
                  "type": "string"
                },
                "description": "Channels whose new chats are never assigned or moved automatically (they stay unassigned for anyone to pick up); [] = assign every channel."
              },
              "reassign_max_hops": {
                "type": "integer",
                "description": "How many times one waiting chat may be moved (1-10)."
              },
              "release_on_offline": {
                "type": "boolean",
                "description": "true = when an operator sets herself Offline, her chats still waiting for a reply move at once to an available teammate (same team and cap); chats she already answered stay."
              },
              "awaiting_window_days": {
                "type": "integer",
                "description": "Days an unanswered chat keeps counting against its operator (1-90). Used with count_basis=awaiting."
              },
              "reassign_after_minutes": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Move a chat to another operator when its operator has not replied after this many minutes (1-1440); null = never."
              },
              "reassign_keep_previous": {
                "type": "boolean",
                "description": "true = after such a move, the operator who did not reply stays on the chat too."
              }
            }
          },
          "annotations": {
            "title": "Update Conversation Assignment Rules",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "add_note",
          "description": "Add an internal note to a conversation — visible only to the merchant's team in the LetsBot inbox, never sent to the customer. Use it to leave context for colleagues (e.g. \"customer wants a refund, waiting for the warehouse\"). A note does not count as a reply to the customer. To alert teammates, mention them: write @Name in the body (e.g. \"@Sara please call the customer\") or pass their ids or names in \"mentions\" — each mentioned teammate is notified in the inbox and on their phone.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "The note text (max 4000 characters). @Name mentions a teammate."
              },
              "phone": {
                "type": "string",
                "description": "Phone number (or chat id) of the contact."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "description": "Optional teammates to notify: user ids (from get_moderators) or names, e.g. [\"7\", \"Fatma\"]."
              }
            }
          },
          "annotations": {
            "title": "Add an Internal Note to a Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_account_overview",
          "description": "Summarise this LetsBot workspace's account in one call: (1) subscription — current plan, billing period, start and end/renewal date, status, whether it renews automatically and the next automatic charge, trial state and days left, any temporary plan boost, the line items and the add-ons/features included; (2) usage — messages sent in the rolling last 30 days against the plan's monthly message limit (the same figure as the panel dashboard), AI replies used against the AI allowance, team seats used against the plan's seat limit, and the number of contacts; (3) channels — every WhatsApp number (official Cloud API or QR) with its connection state, plus Messenger, Instagram, Telegram, e-mail inboxes and, where the workspace has them, the website chat widget, Viber/LINE/WeChat and SMS. Use it when the user asks what plan they are on, when it renews or expires, what is included, how much of their quota is left, or which channels are connected. Each section carries a `where_to_manage` hint (panel page and link) for changes. Read-only: it changes nothing, sends nothing to anyone, does NOT renew, upgrade, cancel, change billing, or connect/disconnect anything, and it does not contact Meta or any other outside service, so a WhatsApp number's connection state is the last state LetsBot recorded. It returns no passwords, access tokens, API keys, webhook secrets or card/bank details — only plan, usage and channel names, numbers and states. Prices are in minor units (cents). A section that could not be read comes back as null with a note.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Account Overview (plan, usage, channels)",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_owner_briefing",
          "description": "A short briefing of what needs the owner's attention in this LetsBot workspace right now, in one call: conversations where a customer is still waiting for a reply (how many, how long the oldest has waited, and the first few names), customer messages and new contacts in the last 24 hours, WhatsApp/Messenger/Instagram/Telegram channels that are disconnected or lost access, a plan or trial that ends soon, and message usage close to the monthly limit. Use it when the user asks \"what's new?\", \"anything urgent?\", \"give me a summary\", or for a morning/daily briefing — especially by voice. `alerts` is already sorted most urgent first; read those first, in short sentences, in the user's language, and do not read out phone numbers or ids unless asked. For more detail use get_conversations_awaiting_reply or get_account_overview. With several workspaces, call it once per workspace (see list_workspaces). Read-only: it changes nothing, sends nothing and contacts no outside service.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Owner Briefing (what needs attention now)",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_report",
          "description": "Read one tab of the LetsBot Reports page for a period: KPI cards with the change vs the previous period, the main chart (labels + series), the table rows (max 100) and footnotes. Tabs: conversations (opened/closed/open), responses (reply speed), resolutions, messages (inbound/outbound, delivery), contacts (new contacts by channel, ads vs organic), assignments, lifecycle, calls (WhatsApp calls) and broadcasts (campaign delivery and replies). Call with no tab to get the list of tabs available in this workspace. Same numbers the merchant sees in the panel for the same period. Read-only.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "to": {
                "type": "string",
                "description": "Last day (YYYY-MM-DD, inclusive) when period is custom."
              },
              "tab": {
                "enum": [
                  "conversations",
                  "responses",
                  "resolutions",
                  "messages",
                  "contacts",
                  "assignments",
                  "lifecycle",
                  "calls",
                  "agent_performance",
                  "users",
                  "broadcasts",
                  "topics",
                  "qa"
                ],
                "type": "string",
                "description": "Which report tab. Omit to list the tabs available in this workspace and what each one shows."
              },
              "from": {
                "type": "string",
                "description": "First day (YYYY-MM-DD) when period is custom. Max range 366 days."
              },
              "period": {
                "enum": [
                  "today",
                  "yesterday",
                  "7d",
                  "30d",
                  "60d",
                  "90d",
                  "this_month",
                  "last_month",
                  "custom"
                ],
                "type": "string",
                "description": "Period preset in the workspace time zone. Default 30d. Use custom with from and to."
              },
              "channel": {
                "enum": [
                  "whatsapp",
                  "messenger",
                  "instagram",
                  "telegram",
                  "email",
                  "tiktok",
                  "x",
                  "linkedin"
                ],
                "type": "string",
                "description": "Only this channel. Omit for all channels."
              },
              "group_by": {
                "enum": [
                  "time",
                  "channel",
                  "source",
                  "user",
                  "type",
                  "direction",
                  "status",
                  "agent",
                  "team",
                  "category",
                  "stage",
                  "opened_by",
                  "closed_by",
                  "actor",
                  "closed",
                  "human_messages",
                  "avg_first_response",
                  "median_first_response",
                  "avg_response_time",
                  "calls_answered",
                  "csat",
                  "notes"
                ],
                "type": "string",
                "description": "Table/chart grouping. Each tab supports only some values (listed in available_tabs[].group_by_options); an unsupported value falls back to the tab's default."
              }
            }
          },
          "annotations": {
            "title": "Workspace Report",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_whatsapp_templates",
          "description": "List the WhatsApp message templates (Meta-approved message formats) of this workspace: name, exact language code, category (MARKETING / UTILITY / AUTHENTICATION), Meta review status and the rejection reason when Meta gave one, body text, header type, and the placeholders each template expects (numbered {{1}} or named {{customer_name}}). Each row says whether send_template can send it (only APPROVED, non-carousel templates). Use it before send_template to pick a template and pass its exact name, language and parameters, or to answer \"which templates were rejected and why?\". Filters: status, category, language, search (name, template id or language); 50 per page. Read-only: it does not create, edit, submit or sync templates with Meta — that is done in the LetsBot panel. Templates exist only on the official WhatsApp Cloud API connection.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "minimum": 1,
                "description": "Page number (50 templates per page). Default 1."
              },
              "search": {
                "type": "string",
                "description": "Text to find in the template name, Meta template id or language code."
              },
              "status": {
                "enum": [
                  "APPROVED",
                  "PENDING",
                  "REJECTED",
                  "IN_APPEAL",
                  "PAUSED",
                  "DISABLED",
                  "FLAGGED",
                  "ARCHIVED",
                  "DELETED",
                  "REINSTATED",
                  "LOCKED",
                  "LIMIT_EXCEEDED",
                  "PENDING_DELETION"
                ],
                "type": "string",
                "description": "Only templates with this Meta status. APPROVED templates are the only ones that can be sent."
              },
              "category": {
                "enum": [
                  "AUTHENTICATION",
                  "MARKETING",
                  "UTILITY"
                ],
                "type": "string",
                "description": "Only templates of this Meta category."
              },
              "language": {
                "type": "string",
                "description": "Exact Meta language code, e.g. \"ar\", \"en\", \"en_US\", \"es\", \"pt_BR\"."
              }
            }
          },
          "annotations": {
            "title": "List WhatsApp Templates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_whatsapp_template",
          "description": "Create a new WhatsApp message template and submit it to Meta for review (Official WhatsApp / Cloud API workspaces only). A template is the only way to start a conversation or message a customer outside the 24-hour reply window; once Meta APPROVES it, send it with send_template. Inputs: name (lowercase letters, digits and underscores; Meta registers it as \"nt_<name>\"), language (any language Meta accepts for templates, e.g. \"ar\", \"en\", \"es\", \"pt\", \"fr\", \"de\", \"tr\"), category, body, an example value for every body placeholder, and optionally a header (text, or an image/video/document with a public sample URL), a footer and buttons. Categories: UTILITY = a message about something the customer already started (order update, booking reminder, account notice) — no promotion; MARKETING = promotions, offers, announcements, re-engagement — billed per delivered message at Meta's marketing rate. Meta decides the final category and may RE-CATEGORISE a UTILITY template that contains promotional wording as MARKETING (billed as marketing). AUTHENTICATION (one-time passcodes) cannot be authored here — the panel's custom-template editor does not author it either. Placeholders: positional {{1}}, {{2}} … numbered from 1 without gaps, OR named {{customer_name}} (lowercase) — never both in one template; pass examples as {\"1\": \"Sara\"} or {\"customer_name\": \"Sara\"}. Consent gate: call with confirm=false first — nothing is saved or sent and you get the exact payload Meta will receive; show it to the user and only call again with confirm=true after they approve. Meta reviews a submitted template within minutes up to 24 hours; the result (APPROVED / REJECTED with Meta's reason) appears in list_whatsapp_templates. This tool does not edit or delete existing templates (use the WhatsApp templates page in the panel) and does not send any message.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name",
              "language",
              "category",
              "body",
              "confirm"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "Message text, up to 1024 characters. Placeholders as {{1}}, {{2}} … or {{customer_name}}. A placeholder cannot be the whole message, and the body cannot start or end with one (punctuation and emojis do not count) — put real words before the first and after the last."
              },
              "name": {
                "type": "string",
                "description": "Template name: lowercase letters, digits and underscores only (e.g. \"order_shipped\"). Unique per workspace. Meta registers it as \"nt_<name>\" — that is the name list_whatsapp_templates and send_template use."
              },
              "footer": {
                "type": "string",
                "description": "Optional footer, max 60 characters, no placeholders (emojis are removed — Meta refuses them there)."
              },
              "header": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "type": {
                    "enum": [
                      "none",
                      "text",
                      "image",
                      "video",
                      "document"
                    ],
                    "type": "string"
                  },
                  "media_url": {
                    "type": "string"
                  }
                },
                "description": "Optional header. {\"type\": \"text\", \"text\": \"Your order\"} (max 60 chars; a named template may use ONE {{placeholder}} in it), or {\"type\": \"image\"|\"video\"|\"document\", \"media_url\": \"https://…\"} — a PUBLIC sample file Meta reviews (uploaded to Meta on submit); every send of the approved template must then supply its own media."
              },
              "buttons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "text"
                  ],
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "quick_reply",
                        "url",
                        "phone_number"
                      ],
                      "type": "string"
                    },
                    "url_example": {
                      "type": "string"
                    },
                    "phone_number": {
                      "type": "string"
                    }
                  }
                },
                "description": "Optional, up to 10 buttons (at most 2 url and 1 phone_number). Labels max 25 characters, no emojis. quick_reply: {\"type\":\"quick_reply\",\"text\":\"Track order\"}. url: {\"type\":\"url\",\"text\":\"Open\",\"url\":\"https://shop.com/o/{{1}}\",\"url_example\":\"https://shop.com/o/1045\"} — a {{1}} is allowed only at the END of the url and then url_example is required. phone_number: {\"type\":\"phone_number\",\"text\":\"Call us\",\"phone_number\":\"+966500000000\"}."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to submit this template to Meta for review."
              },
              "category": {
                "enum": [
                  "UTILITY",
                  "MARKETING",
                  "AUTHENTICATION"
                ],
                "type": "string",
                "description": "UTILITY (transactional, no promotion) or MARKETING (promotional, billed per message at Meta's marketing rate). Meta may re-categorise. AUTHENTICATION is refused here."
              },
              "examples": {
                "type": "object",
                "description": "Required by Meta: one realistic sample value per placeholder, keyed by the placeholder ({\"1\": \"Sara\", \"2\": \"#1045\"} or {\"customer_name\": \"Sara\"}). Also covers a named placeholder in a text header.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "language": {
                "type": "string",
                "description": "Bare language code the template is written in: one of ar, en, pt, es, fr, de, it, nl, ru, uk, pl, tr, id, ms, vi, th, zh_CN, ja, ko, hi, bn, ur, fa, sv, da, fi, cs, sk, sl, hu, ro, el, af, sq, az, be, bg, ca, hr, prs, et, fil, ka, gu, ha, he, ga, kn, kk, rw, ky, lo, lv, lt, mk, ml, mr, nb, ps, pa, sr, si, sw, ta, te, uz, zu. A few are registered at Meta with their region (\"pt\" → pt_BR, \"zh\" → zh_CN). One template = one language; create another template for another language."
              }
            }
          },
          "annotations": {
            "title": "Create WhatsApp Template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_scheduled_activity",
          "description": "List messages that are still waiting to go out to customers: pending store notifications from Salla, Zid and WooCommerce (order updates, abandoned-cart reminders, …) and the outgoing WhatsApp send queue (including failed sends that would be re-sent when the number reconnects). Use it when the merchant asks \"what is about to be sent?\" or wants to stop pending messages. Returns totals per source and rows with source + source_id — pass those to cancel_scheduled_activity. Does NOT list bulk campaigns (use get_campaigns / cancel_campaign) or scheduled social posts (list_scheduled_social_posts). Read-only.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number, starting at 1 (default 1)."
              },
              "phone": {
                "type": "string",
                "description": "Only rows whose recipient phone STARTS with this (digits, e.g. \"9665\")."
              },
              "date_to": {
                "type": "string",
                "description": "Only rows created on/before this day (YYYY-MM-DD)."
              },
              "sources": {
                "type": "array",
                "items": {
                  "enum": [
                    "salla.notification",
                    "zid.notification",
                    "woo.notification",
                    "message_queue"
                  ],
                  "type": "string"
                },
                "description": "Limit to these sources; omit for all. salla.notification / zid.notification / woo.notification = pending store notifications; message_queue = outgoing WhatsApp send queue."
              },
              "per_page": {
                "type": "integer",
                "description": "Rows per page, 1-50 (default 50)."
              },
              "date_from": {
                "type": "string",
                "description": "Only rows created on/after this day (YYYY-MM-DD)."
              }
            }
          },
          "annotations": {
            "title": "List Scheduled (Pending) Sends",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "cancel_scheduled_activity",
          "description": "Stop messages that are still waiting to be sent (as listed by list_scheduled_activity): either ONE row (pass source + source_id; it is cancelled immediately — stopping a send needs no approval) or ALL rows matching optional filters (pass all=true; this needs the user's confirmation — call first with confirm=false to get the count, then confirm=true). Pending store notifications (Salla / Zid / WooCommerce) are deleted; queued WhatsApp messages are marked cancelled and never sent. Already-sent messages are not affected and cannot be recalled. Does NOT stop bulk campaigns (use cancel_campaign).",
          "inputSchema": {
            "type": "object",
            "required": [
              "confirm"
            ],
            "properties": {
              "all": {
                "type": "boolean",
                "description": "true = cancel EVERY pending row matching the filters below (all sources when no filter). Requires confirm."
              },
              "phone": {
                "type": "string",
                "description": "Only rows whose recipient phone STARTS with this (digits, e.g. \"9665\")."
              },
              "source": {
                "enum": [
                  "salla.notification",
                  "zid.notification",
                  "woo.notification",
                  "message_queue"
                ],
                "type": "string",
                "description": "Source of the ONE row to cancel (from list_scheduled_activity)."
              },
              "confirm": {
                "type": "boolean",
                "description": "For all=true: pass false first to get the count and a breakdown (nothing is cancelled), show it to the user, then true to cancel. Cancelling ONE row (source + source_id) needs no approval and happens immediately whatever this value is — it can only stop a send."
              },
              "date_to": {
                "type": "string",
                "description": "Only rows created on/before this day (YYYY-MM-DD)."
              },
              "sources": {
                "type": "array",
                "items": {
                  "enum": [
                    "salla.notification",
                    "zid.notification",
                    "woo.notification",
                    "message_queue"
                  ],
                  "type": "string"
                },
                "description": "Limit to these sources; omit for all. salla.notification / zid.notification / woo.notification = pending store notifications; message_queue = outgoing WhatsApp send queue."
              },
              "date_from": {
                "type": "string",
                "description": "Only rows created on/after this day (YYYY-MM-DD)."
              },
              "source_id": {
                "type": "integer",
                "description": "source_id of the ONE row to cancel (from list_scheduled_activity)."
              }
            }
          },
          "annotations": {
            "title": "Cancel Scheduled (Pending) Sends",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_messages",
          "description": "Get messages from a WhatsApp conversation. Returns the most recent messages paginated.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number for pagination (default: 1)"
              },
              "phone": {
                "type": "string",
                "description": "Phone number in international format without +"
              },
              "per_page": {
                "type": "integer",
                "description": "Messages per page (default: 15, max: 50)"
              }
            }
          },
          "annotations": {
            "title": "Get Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_message_status",
          "description": "Check what WhatsApp actually did with messages you already sent — delivered, read, still pending, or FAILED with Meta's own reason. A send tool returning status \"sent\" only means Meta accepted the message; Meta can still refuse to deliver it seconds later, and this tool is the only way to learn that. Call it a minute or two after sending (pass the message_id values the send tools returned), or pass a phone number to review every recent outbound message to one contact.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Alternative to message_ids: a contact phone number in international format without +. Reviews every message sent TO that contact inside the time window. Use this for the send tools that return no message_id (buttons, list, carousel, reply, reaction)."
              },
              "minutes": {
                "type": "integer",
                "description": "How far back to look when checking by phone. Default 60, maximum 1440 (24 hours). Ignored when message_ids is given."
              },
              "message_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The message_id values returned by the send tools (WhatsApp wamids). Up to 200. Checked exactly, ignoring the time window."
              }
            }
          },
          "annotations": {
            "title": "Get Message Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "search_messages",
          "description": "Search messages across all conversations (individual chats and groups), or within one specific contact chat or group.",
          "inputSchema": {
            "type": "object",
            "required": [
              "query"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (default: 1)"
              },
              "phone": {
                "type": "string",
                "description": "Optional: limit search to a specific contact's individual chat. Group messages are excluded from this scope — use group_id for groups."
              },
              "query": {
                "type": "string",
                "description": "Search query to find in message text"
              },
              "group_id": {
                "type": "string",
                "description": "Optional: limit search to a specific group. Accepts the group chat_id (e.g. 120363041234567890@g.us), the id from get_groups, or the group name."
              },
              "since_minutes": {
                "type": "integer",
                "maximum": 43200,
                "minimum": 1,
                "description": "Optional: only messages from the last N minutes (1–43200). Use it whenever you only need recent messages: a search over the whole history reads every message the workspace ever stored and can take several seconds."
              }
            }
          },
          "annotations": {
            "title": "Search Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "mark_as_read",
          "description": "Mark a conversation as opened in the LetsBot inbox, and send a read receipt to the customer on channels that support one. This affects inbox read state ONLY. It does NOT clear the conversation from get_conversations_awaiting_reply — only sending a reply does that — so do not call this expecting the awaiting-reply backlog to go down.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact in international format without +"
              }
            }
          },
          "annotations": {
            "title": "Mark As Read",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_groups",
          "description": "Get a paginated list of WhatsApp group conversations. Read-only: listing groups never marks anything as read. Counts report what has not been opened in the LetsBot inbox, which is not the same as what the merchant has seen on their own phone. Use get_group_messages to read a group's history.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number (default: 1)"
              },
              "filter": {
                "enum": [
                  "all",
                  "not_opened_in_inbox",
                  "pinned",
                  "archived",
                  "favorites"
                ],
                "type": "string",
                "description": "Filter groups. \"not_opened_in_inbox\" = has inbound messages nobody has opened in the LetsBot inbox (inbox state only, not the merchant's phone)."
              },
              "search": {
                "type": "string",
                "description": "Search groups by name"
              },
              "membership": {
                "enum": [
                  "all",
                  "joined",
                  "left"
                ],
                "type": "string",
                "description": "Membership filter: all (default — matches the live-chat list), joined (still a member), left (removed from or left the group)"
              }
            }
          },
          "annotations": {
            "title": "Get Groups",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_group_messages",
          "description": "Get messages from a WhatsApp group conversation, newest first, with the sender of each message. Read-only: reading a group NEVER marks its messages as read and sends no read receipts. Use get_groups to list groups and their ids.",
          "inputSchema": {
            "type": "object",
            "required": [
              "group_id"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number for pagination (default: 1)"
              },
              "group_id": {
                "type": "string",
                "description": "The group to read. Accepts the group chat_id (e.g. 120363041234567890@g.us), the id returned by get_groups, or the group name."
              },
              "per_page": {
                "type": "integer",
                "description": "Messages per page (default: 15, max: 50)"
              }
            }
          },
          "annotations": {
            "title": "Get Group Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "send_group_message",
          "description": "Send one real WhatsApp text message from the workspace's WhatsApp number into one WhatsApp group, after the user confirms. Every member of that group (real people outside LetsBot) receives it, and a sent message cannot be recalled or edited. Works on a number connected to LetsBot by QR code (the number's own WhatsApp groups), and on an official green-tick Cloud API number (not Coexistence) for groups created with Meta's Groups API under Channels › WhatsApp groups — their chat_id contains letters; @mentions are not supported there. On the official Cloud API, WhatsApp does not deliver the number's existing group chats. Identify the group with \"group_id\", set to the group's \"chat_id\" from get_groups (e.g. 120363041234567890@g.us); \"chat_id\" is accepted as an alias. Group names are not accepted. One group per call: this is not a broadcast or bulk-messaging tool.",
          "inputSchema": {
            "type": "object",
            "required": [
              "message",
              "confirm"
            ],
            "properties": {
              "chat_id": {
                "type": "string",
                "description": "Alias of \"group_id\", accepted because get_groups calls this value \"chat_id\". Pass the group in \"group_id\" OR \"chat_id\", not both."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to post this message into the group."
              },
              "message": {
                "type": "string",
                "description": "The text to post into the group. Every member of the group will see it. To tag (@mention) a member so WhatsApp notifies them, write @ followed by their full number in international format without + or spaces, e.g. \"@5511970793770 please send the report\" — every such @number becomes a real mention. Members can also be listed in \"mentions\"."
              },
              "group_id": {
                "type": "string",
                "description": "The group's \"chat_id\" exactly as returned by get_groups (e.g. 120363041234567890@g.us), for ONE group. The digits without @g.us are also accepted. Group names and the numeric \"id\" field are refused. This is the preferred argument."
              },
              "mentions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional, WhatsApp groups on a QR-connected number only. Group members to tag (@mention) so WhatsApp highlights their name and notifies them: phone numbers in international format without + (e.g. \"5511970793770\") or member ids from WhatsApp (e.g. \"5511970793770@s.whatsapp.net\", \"123456789012345@lid\"). A member whose @<number> is not already in the text gets it added at the start automatically. Every @<number> already written in the text is tagged too, so this list is optional when the text names them. Max 50."
              }
            }
          },
          "annotations": {
            "title": "Send Group Message",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_group_file",
          "description": "Send one real file — a document such as a PDF, an image, or a video — from the workspace's WhatsApp number into one WhatsApp group, after the user confirms. Every member of that group receives it and it cannot be recalled. `file_url` must be a DIRECT url to the file: if the file is a Google Drive / Dropbox share link, or only exists as bytes you generated, call upload_file first (pass the link as `source_url`) and use the url and filename it returns. Works on a number connected by QR code, and on an official green-tick Cloud API number (not Coexistence) for groups created with Meta's Groups API (their chat_id contains letters). Identify the group with \"group_id\", set to the group's \"chat_id\" from get_groups (e.g. 120363041234567890@g.us); \"chat_id\" is accepted as an alias. Group names are not accepted. One group per call: not a broadcast tool. For text only, use send_group_message.",
          "inputSchema": {
            "type": "object",
            "required": [
              "file_url",
              "confirm"
            ],
            "properties": {
              "caption": {
                "type": "string",
                "description": "Optional text shown with the file in the group."
              },
              "chat_id": {
                "type": "string",
                "description": "Alias of \"group_id\", accepted because get_groups calls this value \"chat_id\". Pass the group in \"group_id\" OR \"chat_id\", not both."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to post this file into the group."
              },
              "file_url": {
                "type": "string",
                "description": "Direct https url of the file — typically the `url` returned by upload_file. Not a Drive/Dropbox/OneDrive share page."
              },
              "filename": {
                "type": "string",
                "description": "Display name INCLUDING the extension (e.g. \"proposal.pdf\") — pass the `filename` upload_file returned. WhatsApp uses the extension to pick the file type, so a name without one arrives as an unopenable \"BIN\" attachment and is refused. Required whenever file_url has no filename in its path."
              },
              "group_id": {
                "type": "string",
                "description": "The group's \"chat_id\" exactly as returned by get_groups (e.g. 120363041234567890@g.us), for ONE group. The digits without @g.us are also accepted. Group names and the numeric \"id\" field are refused. This is the preferred argument."
              },
              "media_type": {
                "enum": [
                  "document",
                  "image",
                  "video"
                ],
                "type": "string",
                "description": "How WhatsApp shows it: \"document\" (default — a downloadable file with its name, right for PDFs and office files), \"image\" (shown inline; jpg/png/webp) or \"video\" (played inline; mp4)."
              }
            }
          },
          "annotations": {
            "title": "Send Group File",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_labels",
          "description": "Get all labels/tags available in the account. Labels are used to categorize and organize contacts.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Labels",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_label",
          "description": "Create a new label/tag for organizing contacts.",
          "inputSchema": {
            "type": "object",
            "required": [
              "name_ar",
              "name_en",
              "color"
            ],
            "properties": {
              "color": {
                "type": "string",
                "description": "Label color in hex format (e.g., #25d366)"
              },
              "name_ar": {
                "type": "string",
                "description": "Label name in Arabic"
              },
              "name_en": {
                "type": "string",
                "description": "Label name in English"
              }
            }
          },
          "annotations": {
            "title": "Create Label",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_label_contacts",
          "description": "Get all contacts that are assigned to a specific label.",
          "inputSchema": {
            "type": "object",
            "required": [
              "label_id"
            ],
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number for pagination (default: 1)"
              },
              "label_id": {
                "type": "integer",
                "description": "ID of the label"
              }
            }
          },
          "annotations": {
            "title": "Get Label Contacts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_moderators",
          "description": "Get all moderators/agents available in the account. Moderators are team members who can handle conversations.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Moderators",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_quick_replies",
          "description": "Get all quick replies/canned responses available. Quick replies are pre-written message templates that can be sent quickly.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Quick Replies",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_quick_reply",
          "description": "Create a new quick reply/canned response. Quick replies let agents send pre-written messages instantly.",
          "inputSchema": {
            "type": "object",
            "required": [
              "title_ar",
              "title_en",
              "text"
            ],
            "properties": {
              "text": {
                "type": "string",
                "description": "The quick reply message text"
              },
              "title_ar": {
                "type": "string",
                "description": "Title/keyword in Arabic"
              },
              "title_en": {
                "type": "string",
                "description": "Title/keyword in English"
              },
              "reply_type": {
                "enum": [
                  "text",
                  "image",
                  "file",
                  "audio",
                  "video",
                  "location"
                ],
                "type": "string",
                "description": "Type of reply: text, image, file, audio, video, location"
              }
            }
          },
          "annotations": {
            "title": "Create Quick Reply",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_quick_reply",
          "description": "Update an existing quick reply/canned response by ID. Only the provided fields change; everything else stays as it was. Run get_quick_replies first to find the quick reply ID.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the quick reply to update"
              },
              "text": {
                "type": "string",
                "description": "New quick reply message text"
              },
              "status": {
                "type": "boolean",
                "description": "Enable or disable this quick reply"
              },
              "body_ar": {
                "type": "string",
                "description": "New quick reply body in Arabic"
              },
              "body_en": {
                "type": "string",
                "description": "New quick reply body in English"
              },
              "title_ar": {
                "type": "string",
                "description": "New title/keyword in Arabic"
              },
              "title_en": {
                "type": "string",
                "description": "New title/keyword in English"
              },
              "reply_type": {
                "enum": [
                  "text",
                  "image",
                  "file",
                  "audio",
                  "video",
                  "location"
                ],
                "type": "string",
                "description": "Type of reply: text, image, file, audio, video, location"
              }
            }
          },
          "annotations": {
            "title": "Update Quick Reply",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_quick_reply",
          "description": "Delete a quick reply (canned response) by ID. Run get_quick_replies first to find the ID. To only hide it, use update_quick_reply with status=false instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id",
              "confirm"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the quick reply to delete"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to delete the quick reply."
              }
            }
          },
          "annotations": {
            "title": "Delete Quick Reply",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "update_label",
          "description": "Rename or recolour an existing contact label by ID. Only the fields you pass change. Run get_labels first to find the ID. Contacts keep the label; they just show the new name/colour.",
          "inputSchema": {
            "type": "object",
            "required": [
              "label_id"
            ],
            "properties": {
              "color": {
                "type": "string",
                "description": "New colour as a hex code including the #, e.g. #25d366"
              },
              "name_ar": {
                "type": "string",
                "description": "New label name in Arabic"
              },
              "name_en": {
                "type": "string",
                "description": "New label name in English"
              },
              "label_id": {
                "type": "integer",
                "description": "ID of the label to update"
              }
            }
          },
          "annotations": {
            "title": "Update Label",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_label",
          "description": "Delete a contact label by ID. The label is removed from every contact that has it and from the inbox filters; the contacts themselves are not touched. Run get_labels first to find the ID.",
          "inputSchema": {
            "type": "object",
            "required": [
              "label_id",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to delete the label."
              },
              "label_id": {
                "type": "integer",
                "description": "ID of the label to delete"
              }
            }
          },
          "annotations": {
            "title": "Delete Label",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "ai_suggest_reply",
          "description": "Return the recent conversation and contact context so the assistant can draft suggested replies. The assistant generates the reply suggestions from the returned context (nothing is sent).",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact to suggest a reply for"
              },
              "additional_context": {
                "type": "string",
                "description": "Optional additional context or instructions to steer the suggestions"
              }
            }
          },
          "annotations": {
            "title": "Prepare Reply Suggestion",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_summarize_conversation",
          "description": "Return the recent conversation history with a contact so the assistant can summarize it (key topics, issues, and outcomes). The assistant writes the summary from the returned messages.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact"
              },
              "message_count": {
                "type": "integer",
                "description": "Number of recent messages to include (default: 50, max: 100)"
              }
            }
          },
          "annotations": {
            "title": "Get Conversation for Summary",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_analyze_contact",
          "description": "Return a contact profile and recent conversation sample so the assistant can analyze the customer (engagement level, interests, recommendations). The assistant performs the analysis on the returned data.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact to analyze"
              }
            }
          },
          "annotations": {
            "title": "Get Contact Data for Analysis",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_improve_message",
          "description": "Return a draft message together with the desired tone and context so the assistant can rewrite it (grammar, tone, clarity) while keeping the original intent. The assistant produces the improved version.",
          "inputSchema": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "tone": {
                "enum": [
                  "professional",
                  "friendly",
                  "formal",
                  "casual"
                ],
                "type": "string",
                "description": "Desired tone: professional, friendly, formal, casual"
              },
              "context": {
                "type": "string",
                "description": "Optional conversation context for a better rewrite"
              },
              "message": {
                "type": "string",
                "description": "The message text to improve"
              }
            }
          },
          "annotations": {
            "title": "Prepare Message Improvement",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_translate_message",
          "description": "Return a message together with the requested target language so the assistant can translate it. The assistant produces the translation.",
          "inputSchema": {
            "type": "object",
            "required": [
              "message",
              "target_language"
            ],
            "properties": {
              "message": {
                "type": "string",
                "description": "The message text to translate"
              },
              "target_language": {
                "type": "string",
                "description": "Target language (e.g., Arabic, English, French, Spanish)"
              }
            }
          },
          "annotations": {
            "title": "Prepare Message Translation",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_sentiment_analysis",
          "description": "Return the customer messages of a conversation so the assistant can analyze sentiment (positive, negative, or neutral) and emotional indicators. The assistant performs the sentiment analysis on the returned messages.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact"
              },
              "message_count": {
                "type": "integer",
                "description": "Number of recent customer messages to include (default: 20, max: 50)"
              }
            }
          },
          "annotations": {
            "title": "Get Messages for Sentiment Analysis",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "ai_dashboard_summary",
          "description": "Return key dashboard metrics (contact counts, conversations awaiting a reply, active moderators, today's activity, recent contacts) plus guidance so the assistant can write an interpreted summary. The tool itself only computes the counts. It reports no read/unread state: nothing here indicates what the merchant has opened or seen on their own device.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Dashboard Metrics",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_order_status",
          "description": "Get the status and details of an e-commerce order. Supports Salla and Zid platforms, and any other connected store that can look orders up (odoo, shopify, woocommerce). Orders are synced from the connected store.",
          "inputSchema": {
            "type": "object",
            "required": [
              "order_id"
            ],
            "properties": {
              "order_id": {
                "type": "string",
                "description": "The order ID/reference number"
              },
              "platform": {
                "enum": [
                  "salla",
                  "zid",
                  "odoo",
                  "shopify",
                  "woocommerce"
                ],
                "type": "string",
                "description": "E-commerce platform: salla, zid or odoo, shopify, woocommerce. If not specified, searches every connected store."
              }
            }
          },
          "annotations": {
            "title": "Get Order Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "search_products",
          "description": "Search for products in the connected e-commerce store. Searches by name in Salla and Zid product catalogs, and in every other connected store (odoo, shopify, woocommerce) by name, SKU or barcode.",
          "inputSchema": {
            "type": "object",
            "required": [
              "query"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Max results to return (default: 10)"
              },
              "query": {
                "type": "string",
                "description": "Search query (product name or keyword)"
              },
              "platform": {
                "enum": [
                  "salla",
                  "zid",
                  "odoo",
                  "shopify",
                  "woocommerce"
                ],
                "type": "string",
                "description": "E-commerce platform: salla, zid or odoo, shopify, woocommerce. If not specified, searches every connected store."
              }
            }
          },
          "annotations": {
            "title": "Search Products",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_abandoned_carts",
          "description": "Get abandoned carts from the connected store (Salla, Zid, Shopify, WooCommerce or Magento) for the last N days, with a recovery summary: how many carts were abandoned and are still open, how many were recovered (bought later), how many of those were recovered after a WhatsApp reminder, the recovery rate and the recovered value. Each cart lists the customer name and phone, total, currency, items, checkout link, store, status (open or recovered) and the WhatsApp reminders already sent. Figures match the Insights page in LetsBot. WooCommerce carts are checkouts the shopper started but did not pay. Read-only: it sends nothing. To message a shopper, use send_template with the cart's customer_phone and an approved template; do not send the same cart a second reminder if reminders_sent is already above 0 unless the user asks.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 365,
                "minimum": 1,
                "description": "How many days back to look (1-365). Default 7."
              },
              "page": {
                "type": "integer",
                "minimum": 1,
                "description": "Page number for the cart list (default: 1, 15 carts per page)."
              },
              "status": {
                "enum": [
                  "all",
                  "open",
                  "recovered"
                ],
                "type": "string",
                "description": "Which carts to list: open (abandoned, not bought yet), recovered (bought later) or all. Default all. The summary always covers both."
              },
              "platform": {
                "enum": [
                  "salla",
                  "zid",
                  "shopify",
                  "woocommerce",
                  "magento"
                ],
                "type": "string",
                "description": "Only this store platform. If not specified, every store that has carts is included."
              }
            }
          },
          "annotations": {
            "title": "Get Abandoned Carts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_store_automations",
          "description": "List every automatic WhatsApp message this workspace sends to its store customers, and whether each one is ON or OFF: order/store event notifications (kind notification_template — e.g. order created, shipped, delivered, per store platform), abandoned-cart reminders (kind cart_reminder, plus older per-store ones as legacy_cart_reminder, read-only) and automation reminders (kind behavioral_reminder — e.g. product viewed, checkout started, ask for a rating after delivery). Each row has id, kind, platform, event, delay (for reminders), template info (type, languages, Meta category and approval status on an official number), active, can_toggle, last_sent_at and warnings explaining why an active message might not actually send. Also returns which stores are connected. Use it before set_store_automation_active (which needs kind + id) and to answer \"which automatic messages are on?\". It does NOT change anything, show message text, edit templates or send test messages.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "kind": {
                "enum": [
                  "notification_template",
                  "cart_reminder",
                  "behavioral_reminder",
                  "legacy_cart_reminder"
                ],
                "type": "string",
                "description": "Optional: only this kind of automation."
              },
              "active": {
                "type": "boolean",
                "description": "Optional: true = only those switched ON, false = only those switched OFF."
              },
              "platform": {
                "type": "string",
                "description": "Optional: only automations for this store platform (e.g. salla, zid, shopify, woocommerce)."
              }
            }
          },
          "annotations": {
            "title": "List Automatic Store Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_store_automation_active",
          "description": "Turn ONE automatic store message on or off — an order/store notification, an abandoned-cart reminder or an automation reminder — exactly like its toggle in the LetsBot panel. Get kind + id from list_store_automations first. Turning it ON makes LetsBot message the merchant's customers automatically every time the event happens (Meta bills each message on an official WhatsApp number), so only do it when the merchant explicitly asks, and it needs confirm=true after showing the preview. Turning it OFF takes effect immediately and needs no confirmation. It does NOT edit the message text, submit templates to Meta, send a test, or create/delete automations (those are done in the LetsBot panel). Older per-store reminders (legacy_cart_reminder) cannot be switched here.",
          "inputSchema": {
            "type": "object",
            "required": [
              "kind",
              "id",
              "active",
              "confirm"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "The automation id, as returned by list_store_automations (ids are per kind)."
              },
              "kind": {
                "enum": [
                  "notification_template",
                  "cart_reminder",
                  "behavioral_reminder"
                ],
                "type": "string",
                "description": "The automation kind, as returned by list_store_automations."
              },
              "active": {
                "type": "boolean",
                "description": "true = switch ON (starts automatic sends), false = switch OFF."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to switch the automation on. Only checked when active=true; when switching OFF any value is accepted."
              }
            }
          },
          "annotations": {
            "title": "Switch an Automatic Store Message On/Off",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_campaign",
          "description": "Create a new bulk message campaign to send messages to multiple contacts. Messages can be targeted by label. Campaign will be scheduled and processed by the queue.",
          "inputSchema": {
            "type": "object",
            "required": [
              "text",
              "label_ids",
              "confirm"
            ],
            "properties": {
              "text": {
                "type": "string",
                "description": "The message text to send"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to create and dispatch this bulk campaign to every matching contact."
              },
              "send_now": {
                "type": "boolean",
                "description": "Whether to dispatch immediately (true) or schedule for later (false). Default: false — a campaign must be dispatched explicitly."
              },
              "label_ids": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Array of label IDs to target. Contacts with these labels will receive the message."
              },
              "window_ack": {
                "type": "boolean",
                "description": "Required (true) when this workspace sends through an official WhatsApp Cloud API number: this campaign is free-form text, which Meta delivers ONLY to contacts who messaged the business in the last 24 hours (everyone else fails with error 131047). Pass true only after telling the user that. To reach everyone, use an approved template campaign in LetsBot instead."
              },
              "sending_date": {
                "type": "string",
                "description": "Scheduled date/time in YYYY-MM-DD HH:mm format. Required if send_now is false."
              }
            }
          },
          "annotations": {
            "title": "Create Campaign",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_campaigns",
          "description": "Get a list of bulk message campaigns. Shows campaign status, delivery stats, and scheduling info.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number for pagination (default: 1)"
              },
              "status": {
                "enum": [
                  "all",
                  "pending",
                  "in_progress",
                  "done",
                  "canceled"
                ],
                "type": "string",
                "description": "Filter by status: all, pending, in_progress, done, canceled"
              }
            }
          },
          "annotations": {
            "title": "Get Campaigns",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_campaign_status",
          "description": "Get detailed status of a specific bulk message campaign including per-contact delivery statistics.",
          "inputSchema": {
            "type": "object",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "campaign_id": {
                "type": "integer",
                "description": "ID of the campaign"
              }
            }
          },
          "annotations": {
            "title": "Get Campaign Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "cancel_campaign",
          "description": "Stop a bulk message campaign that is scheduled or sending right now. Recipients not reached yet will not get the message; those already sent are unaffected. Use it immediately when the merchant says a campaign is wrong or must stop. The campaign can be resumed later from the LetsBot panel (Bulk messages → the campaign).",
          "inputSchema": {
            "type": "object",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "campaign_id": {
                "type": "integer",
                "description": "ID of the campaign (from get_campaigns or create_campaign)."
              }
            }
          },
          "annotations": {
            "title": "Stop a Bulk Campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "resume_campaign",
          "description": "Resume a bulk campaign that was stopped (cancel_campaign / Cancel in the panel), finished with recipients left unsent, stopped because its template header file was missing, or paused because the plan's monthly message limit was used up (resume it after the plan is upgraded). Sends the campaign to every recipient who has not received it yet — real WhatsApp messages that Meta charges for. Requires confirm: call with confirm=false first to get a preview (how many people will be messaged, template, estimated Meta cost), show it to the user, then call again with confirm=true. Needs the Send Bulk add-on. Does NOT re-send to people already sent — use resend_campaign for that. Use get_campaign_status to see progress afterwards, cancel_campaign to stop it again.",
          "inputSchema": {
            "type": "object",
            "required": [
              "campaign_id",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to resume this campaign and message every recipient not reached yet."
              },
              "window_ack": {
                "type": "boolean",
                "description": "Required (true) only when the campaign is not an approved template and the workspace uses an official WhatsApp Cloud API number: Meta then delivers it only to contacts who messaged in the last 24 hours. Pass true only after telling the user that."
              },
              "campaign_id": {
                "type": "integer",
                "description": "ID of the campaign (from get_campaigns)."
              }
            }
          },
          "annotations": {
            "title": "Resume a Stopped Bulk Campaign",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "resend_campaign",
          "description": "Send a bulk campaign again to the recipients whose message is stuck at \"sent\" — WhatsApp accepted it but it was never confirmed delivered (phone offline, number inactive). Delivered and read recipients are NOT messaged again. Recipients who never got it yet are included. Real WhatsApp messages that Meta charges for, and someone who did receive it without a delivery receipt may get it twice. Requires confirm: call with confirm=false first for a preview (how many people, template, estimated Meta cost), show it to the user, then confirm=true. Needs the Send Bulk add-on. To continue a stopped campaign use resume_campaign; to stop one use cancel_campaign.",
          "inputSchema": {
            "type": "object",
            "required": [
              "campaign_id",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to re-send this campaign to every recipient stuck at \"sent\"."
              },
              "window_ack": {
                "type": "boolean",
                "description": "Required (true) only when the campaign is not an approved template and the workspace uses an official WhatsApp Cloud API number: Meta then delivers it only to contacts who messaged in the last 24 hours. Pass true only after telling the user that."
              },
              "campaign_id": {
                "type": "integer",
                "description": "ID of the campaign (from get_campaigns)."
              }
            }
          },
          "annotations": {
            "title": "Re-send Undelivered Campaign Messages",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_bot_status",
          "description": "Get the current bot status and settings. Shows whether the bot is active, AI mode, default reply settings, and match percentage.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Bot Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "toggle_bot",
          "description": "Toggle the bot on or off for a specific contact. When bot is disabled for a contact, automated replies will not be sent.",
          "inputSchema": {
            "type": "object",
            "required": [
              "phone",
              "enabled"
            ],
            "properties": {
              "phone": {
                "type": "string",
                "description": "Phone number of the contact"
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether to enable (true) or disable (false) the bot for this contact"
              },
              "pause_duration": {
                "type": "string",
                "description": "Optional, only when enabled is false: how long the bot stays off. A number of minutes as a string (e.g. \"60\" or \"240\", at most \"43200\"), \"end_of_day\" (until the end of today in the workspace time zone) or \"manual\" (stays off until someone turns it back on). Omit it to follow the workspace setting \"Turn the bot back on after a manual stop\" (off by default, so the bot stays off)."
              }
            }
          },
          "annotations": {
            "title": "Toggle Bot",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_bot_conversations",
          "description": "Get all bot auto-reply conversations/rules. Shows configured triggers and their responses.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "page": {
                "type": "integer",
                "description": "Page number for pagination (default: 1)"
              },
              "enabled_only": {
                "type": "boolean",
                "description": "If true, only return enabled conversations (default: true)"
              }
            }
          },
          "annotations": {
            "title": "Get Bot Conversations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_simple_conversation",
          "description": "Create a simple bot auto-reply rule. When a customer sends a message matching the trigger keyword, the bot replies with the specified text. With \"ask_contact\" the reply asks for the customer's phone number or e-mail with a one-tap Messenger button (text only on other channels); \"confirmation\" is then sent once after the customer taps it.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hear",
              "text"
            ],
            "properties": {
              "hear": {
                "type": "string",
                "description": "Trigger keyword or phrase that activates this reply"
              },
              "text": {
                "type": "string",
                "description": "Reply message text to send when triggered. With \"ask_contact\" it is the question shown above the button and may be \"\" (= a standard question in the workspace language)."
              },
              "agent_id": {
                "type": "integer",
                "description": "Optional moderator ID to auto-assign to the contact when triggered"
              },
              "channels": {
                "type": "array",
                "items": {
                  "enum": [
                    "whatsapp",
                    "instagram",
                    "messenger",
                    "telegram",
                    "webchat",
                    "tiktok",
                    "x",
                    "email",
                    "sms",
                    "custom"
                  ],
                  "type": "string"
                },
                "description": "Optional. Channels this rule replies on, e.g. [\"instagram\", \"messenger\"]. Omit or [] = every channel (default). \"whatsapp\" covers both official and unofficial WhatsApp numbers. On other channels the message falls through to the other rules, the default reply or the AI."
              },
              "label_id": {
                "type": "integer",
                "description": "Optional label ID to auto-assign to the contact when triggered"
              },
              "ask_contact": {
                "enum": [
                  "phone",
                  "email"
                ],
                "type": "string",
                "description": "Optional. Make the rule ask the customer for their phone number (\"phone\") or e-mail (\"email\") with one tap. On Facebook Messenger the reply text goes out with a quick-reply button pre-filled from the customer's Facebook profile (hidden by Meta when the profile has no such value); the tapped value is saved on the contact (e-mail field when empty, otherwise an internal note; phone always as an internal note). Instagram has no equivalent (Meta disabled it), so Instagram, WhatsApp and other channels receive the text only and the customer types the answer; a typed phone number / e-mail (within 24 hours of the ask) is saved the same way. \"text\" is optional with this argument: empty = a standard question. The rule must reply on Messenger (channels [] or including \"messenger\")."
              },
              "confirmation": {
                "type": "string",
                "description": "Optional, with an \"ask_contact\" rule only. Confirmation message sent ONCE on the same channel and in the same conversation right after the customer taps the Messenger button and shares the phone number / e-mail, or — on any channel — types one in their next messages within 24 hours of the ask, e.g. \"Thanks, we'll contact you by WhatsApp\". While it is set, neither keyword rules nor the AI answer that message. Max 2000 characters."
              },
              "match_message": {
                "type": "boolean",
                "description": "If true, requires exact match. If false, partial/fuzzy match (default: false)"
              }
            }
          },
          "annotations": {
            "title": "Create Simple Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_interactive_conversation",
          "description": "Create an interactive bot conversation with buttons. When triggered, shows a message with clickable button options that lead to different responses.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hear",
              "text",
              "buttons"
            ],
            "properties": {
              "hear": {
                "type": "string",
                "description": "Trigger keyword or phrase"
              },
              "text": {
                "type": "string",
                "description": "Message body that appears with the buttons"
              },
              "title": {
                "type": "string",
                "description": "Header title for the interactive message"
              },
              "footer": {
                "type": "string",
                "description": "Footer text below the message"
              },
              "buttons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "title"
                  ],
                  "properties": {
                    "title": {
                      "type": "string",
                      "description": "Button display text"
                    },
                    "reply_text": {
                      "type": "string",
                      "description": "Auto-reply text when this button is pressed"
                    }
                  }
                },
                "description": "Array of buttons (max 3)"
              },
              "channels": {
                "type": "array",
                "items": {
                  "enum": [
                    "whatsapp",
                    "instagram",
                    "messenger",
                    "telegram",
                    "webchat",
                    "tiktok",
                    "x",
                    "email",
                    "sms",
                    "custom"
                  ],
                  "type": "string"
                },
                "description": "Optional. Channels this rule replies on, e.g. [\"instagram\", \"messenger\"]. Omit or [] = every channel (default). \"whatsapp\" covers both official and unofficial WhatsApp numbers. On other channels the message falls through to the other rules, the default reply or the AI."
              }
            }
          },
          "annotations": {
            "title": "Create Interactive Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_bot_conversation",
          "description": "Update an existing bot auto-reply rule by ID. Only the provided fields change; everything else stays as it was. \"channels\" limits the rule to some channels ([] = every channel). Run get_bot_conversations first to find the conversation ID.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the bot conversation to update"
              },
              "hear": {
                "type": "string",
                "description": "New trigger keyword or phrase that activates this reply"
              },
              "text": {
                "type": "string",
                "description": "New reply message text to send when triggered"
              },
              "enabled": {
                "type": "boolean",
                "description": "Enable or disable this auto-reply rule"
              },
              "agent_id": {
                "type": "integer",
                "description": "Moderator ID to auto-assign to the contact when triggered (use 0 to clear)"
              },
              "channels": {
                "type": "array",
                "items": {
                  "enum": [
                    "whatsapp",
                    "instagram",
                    "messenger",
                    "telegram",
                    "webchat",
                    "tiktok",
                    "x",
                    "email",
                    "sms",
                    "custom"
                  ],
                  "type": "string"
                },
                "description": "Optional. Channels this rule replies on, e.g. [\"instagram\", \"messenger\"]. Omit or [] = every channel (default). \"whatsapp\" covers both official and unofficial WhatsApp numbers. On other channels the message falls through to the other rules, the default reply or the AI."
              },
              "label_id": {
                "type": "integer",
                "description": "Label ID to auto-assign to the contact when triggered (use 0 to clear)"
              },
              "ask_contact": {
                "enum": [
                  "phone",
                  "email",
                  "none"
                ],
                "type": "string",
                "description": "Optional. Make the rule ask the customer for their phone number (\"phone\") or e-mail (\"email\") with one tap. On Facebook Messenger the reply text goes out with a quick-reply button pre-filled from the customer's Facebook profile (hidden by Meta when the profile has no such value); the tapped value is saved on the contact (e-mail field when empty, otherwise an internal note; phone always as an internal note). Instagram has no equivalent (Meta disabled it), so Instagram, WhatsApp and other channels receive the text only and the customer types the answer; a typed phone number / e-mail (within 24 hours of the ask) is saved the same way. \"text\" is optional with this argument: empty = a standard question. \"none\" turns an ask rule back into a plain text reply. The rule must reply on Messenger (channels [] or including \"messenger\")."
              },
              "confirmation": {
                "type": "string",
                "description": "Optional, with an \"ask_contact\" rule only. Confirmation message sent ONCE on the same channel and in the same conversation right after the customer taps the Messenger button and shares the phone number / e-mail, or — on any channel — types one in their next messages within 24 hours of the ask, e.g. \"Thanks, we'll contact you by WhatsApp\". While it is set, neither keyword rules nor the AI answer that message. Max 2000 characters. Pass \"\" to remove it."
              },
              "match_message": {
                "type": "boolean",
                "description": "If true, requires an exact match. If false, partial/fuzzy match."
              }
            }
          },
          "annotations": {
            "title": "Update Bot Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_bot_settings",
          "description": "Get all bot and AI-related settings for the current account.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Bot Settings",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_bot_settings",
          "description": "Update bot settings. Only the settings you pass are changed; the others stay as they are. ai_mode chooses HOW the AI behaves (\"standard\" = full assistant, \"cod_only\" = only confirms cash-on-delivery orders); it does not switch AI replies on or off — use update_ai_assistant_settings with ai_replies_enabled for that.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "ai_mode": {
                "enum": [
                  "standard",
                  "cod_only"
                ],
                "type": "string",
                "description": "\"standard\" = the AI answers with its full capabilities. \"cod_only\" = the AI only confirms cash-on-delivery orders, and new contacts start with the bot paused. To turn AI replies on/off use update_ai_assistant_settings (ai_replies_enabled)."
              },
              "match_percentage": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "How much of a keyword the customer must type for a bot rule to match (1-100, default 60). Higher = stricter matching."
              },
              "default_reply_delay": {
                "type": "integer",
                "minimum": 0,
                "description": "How long after a customer's previous message the default reply stays silent, as a number in default_reply_delay_unit (e.g. 1 with unit \"hours\"). If no unit is passed, the workspace's current unit is kept."
              },
              "enable_default_reply": {
                "type": "boolean",
                "description": "Enable/disable the default reply sent when no bot rule matches."
              },
              "default_reply_delay_unit": {
                "enum": [
                  "minutes",
                  "hours",
                  "seconds",
                  "days"
                ],
                "type": "string",
                "description": "Unit of default_reply_delay."
              }
            }
          },
          "annotations": {
            "title": "Update Bot Settings",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "set_bot_conversation_active",
          "description": "Turn one bot flow (auto-reply conversation of any type: simple, buttons, template or list) ON or OFF by ID. An OFF flow stays saved but the bot stops answering its keywords. Asking for the state it is already in changes nothing. A buttons/template flow with no buttons, or a list flow with no sections, cannot be turned ON until it is completed in the panel. This does NOT switch the whole bot (use toggle_bot) and does not edit the reply (use update_bot_conversation). Run get_bot_conversations with enabled_only=false to find IDs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id",
              "active"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the bot flow (from get_bot_conversations)"
              },
              "active": {
                "type": "boolean",
                "description": "true to turn the flow ON, false to turn it OFF"
              }
            }
          },
          "annotations": {
            "title": "Set Bot Conversation Active",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "duplicate_bot_conversation",
          "description": "Make a full copy of one bot flow (any type) by ID: the reply, its media, and all of its buttons, list sections and follow-up replies. The copy has the same keywords and the same ON/OFF state as the original, so two flows now answer the same keywords — change the copy's keyword with update_bot_conversation, or turn it off with set_bot_conversation_active. Each call creates a new copy. Run get_bot_conversations with enabled_only=false to find IDs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the bot flow to copy (from get_bot_conversations)"
              }
            }
          },
          "annotations": {
            "title": "Duplicate Bot Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_bot_conversation",
          "description": "Permanently delete one bot flow (any type) by ID, together with its buttons and list sections. The bot stops answering its keywords. This cannot be undone — to pause a flow instead, use set_bot_conversation_active with active=false. Call with confirm=false first to get a preview (keywords, buttons, sections) to show the user. Run get_bot_conversations with enabled_only=false to find IDs.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id",
              "confirm"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "ID of the bot flow to delete (from get_bot_conversations)"
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to permanently delete this bot flow."
              }
            }
          },
          "annotations": {
            "title": "Delete Bot Conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_ad_lead_settings",
          "description": "Get the ad-lead auto-labeling configuration. Shows the label and moderator (if any) that the tenant has chosen to auto-apply to incoming contacts that arrive from a Meta Click-to-WhatsApp ad.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get Ad Lead Settings",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_ad_lead_settings",
          "description": "Configure which label and moderator are auto-applied to contacts that arrive from a Meta Click-to-WhatsApp ad. Pass 0 for either field to clear that setting. Pass nothing to leave both as they were. Run get_labels and get_moderators first to find valid IDs.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "agent_id": {
                "type": "integer",
                "description": "Moderator (User) ID to auto-assign on ad-lead arrival. 0 clears the setting (no moderator auto-assigned)."
              },
              "label_id": {
                "type": "integer",
                "description": "ContactLabel ID to auto-apply on ad-lead arrival. 0 clears the setting (feature disabled for labels)."
              }
            }
          },
          "annotations": {
            "title": "Update Ad Lead Settings",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_notification_template",
          "description": "Read ONE automatic store notification (order status, verification code/OTP, welcome, review request …) in full: its message text in every language, its image/video/file, whether it is on, and its WhatsApp (Meta) approval. Pass the id from list_store_automations (kind notification_template), or the store module + event slug (e.g. module \"salla\", slug \"otp\" or \"completed\").",
          "inputSchema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The template id (list_store_automations, kind notification_template)."
              },
              "slug": {
                "type": "string",
                "description": "Event slug when no id is known, e.g. \"otp\", \"completed\", \"customer_created\"."
              },
              "module": {
                "type": "string",
                "description": "Store module when looking up by slug, e.g. \"salla\"."
              }
            }
          },
          "annotations": {
            "title": "Read a Store Notification Template",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_notification_template",
          "description": "Edit ONE automatic store notification (order status, verification code/OTP, welcome, review request …) that LetsBot sends on WhatsApp to the store's real customers when that event happens: change its message text in one or more languages, which languages are sent, its image/video/file (an https link), and/or switch it on (customers start receiving it automatically) or off (they stop receiving it). The previous text and media are overwritten, not kept. On a QR-connected number customers get the new text from the next notification; on an official (Cloud API) number WhatsApp keeps sending the copy Meta approved until the merchant syncs the new text to Meta in the panel. This tool itself never submits anything to Meta. Read it first with get_notification_template, keep every {variable} the merchant still wants, and only change what the merchant asked for.",
          "inputSchema": {
            "type": "object",
            "required": [
              "id",
              "confirm"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "The template id (get_notification_template / list_store_automations)."
              },
              "texts": {
                "type": "object",
                "description": "New message text per language code, e.g. {\"ar\": \"…\", \"en\": \"…\"}. Only the languages given change.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "active": {
                "type": "boolean",
                "description": "Optional: true switches it ON (customers get it automatically), false OFF."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to save these changes."
              },
              "media_url": {
                "type": "string",
                "description": "Optional: public https link of the new image/video/file (only for a media notification)."
              },
              "remove_media": {
                "type": "boolean",
                "description": "Optional: true removes the current image/video/file."
              },
              "enabled_languages": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional: the languages this notification is sent in, e.g. [\"ar\"] or [\"ar\",\"en\"]."
              }
            }
          },
          "annotations": {
            "title": "Edit a Store Notification Template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "save_cart_reminder",
          "description": "Create a new abandoned-cart reminder step (omit id) or edit one (pass its id from list_store_automations, kind cart_reminder): when it is sent after the cart is abandoned (delay_value + delay_unit), its message text per language, the minimum cart total, and whether it is on. While it is on, LetsBot sends it automatically on WhatsApp to the store's real customers who leave a cart, so editing an active reminder changes what those customers receive from then on; the previous text and settings are not kept. A new reminder is created switched OFF unless the merchant asked to switch it on. Use {customer_name}, {cart_total}, {cart_link} style variables only if the merchant wants them.",
          "inputSchema": {
            "type": "object",
            "required": [
              "confirm"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "description": "Omit to create a new reminder; pass the cart_reminder id to edit one."
              },
              "texts": {
                "type": "object",
                "description": "Message text per language code, e.g. {\"ar\": \"…\"}. Required (at least one language) when creating.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "title": {
                "type": "string",
                "description": "Internal name the merchant sees in the panel, e.g. \"First reminder\"."
              },
              "active": {
                "type": "boolean",
                "description": "true = ON (customers get it automatically), false = OFF. New reminders default to OFF."
              },
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to save the cart reminder."
              },
              "delay_unit": {
                "enum": [
                  "minutes",
                  "hours"
                ],
                "type": "string",
                "description": "Unit of delay_value."
              },
              "delay_value": {
                "type": "integer",
                "description": "How long after the cart is abandoned, e.g. 2."
              },
              "minimum_cart_total": {
                "type": "number",
                "description": "Optional: only carts worth at least this much (0 = all carts)."
              }
            }
          },
          "annotations": {
            "title": "Create or Edit a Cart Reminder",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "draft_bot_flow",
          "description": "Build a keyword bot flow (menu, buttons, replies) from a description in the merchant's words, any language. It is created SWITCHED OFF in the bot builder so the merchant can review and edit it, then switch it on. Uses 1 AI credit. Put everything the merchant described into \"description\": the trigger words, the menu options and each reply.",
          "inputSchema": {
            "type": "object",
            "required": [
              "description",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to build the flow (1 AI credit)."
              },
              "description": {
                "type": "string",
                "description": "What the flow does, in the merchant's words (10–2000 characters)."
              }
            }
          },
          "annotations": {
            "title": "Build a Bot Flow (Created Off)",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_ai_assistant_settings",
          "description": "Read how the AI assistant answers customers: whether AI replies are on, its instructions, its working hours and outside-hours message, when it hands the chat to a person (pause after hand-off / after a manual reply), what it does with voice notes, extra rules, timezone, and the Arabic dialect/tone when available.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Read the AI Assistant Settings",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_ai_assistant_settings",
          "description": "Change how the workspace's AI assistant automatically answers the business's real customers on WhatsApp (and any other connected chat channel it answers). The change applies to the next customer messages straight away, the previous values are overwritten, and turning ai_replies_enabled on makes the AI reply to customers by itself (each reply uses an AI credit). Pass ONLY the settings the merchant asked to change, inside \"settings\": ai_replies_enabled (bool), instructions (the full new instructions text — read them first with get_ai_assistant_settings and keep what the merchant did not ask to remove), working_hours (weekly schedule object or null), outside_hours_message_enabled (bool), outside_hours_message, pause_bot_after_handoff (bool), pause_after_manual_reply_minutes (0-1440), count_mcp_as_manual_reply (bool, default false — when true, messages sent through MCP tools like this one pause the bot for pause_after_manual_reply_minutes; when false they never pause it), count_api_as_manual_reply (bool, default false — the same for messages sent through the REST API; LetsBot's own automatic notices never count), transfer_voice_to_agent (bool), voice_note_mode (reply|silent|react), extra_rules, timezone, and dialect / tone when get_ai_assistant_settings lists them.",
          "inputSchema": {
            "type": "object",
            "required": [
              "settings",
              "confirm"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "Consent gate — REQUIRED on every call. Pass false first: the tool then performs no action and returns a preview of exactly what would happen. Show that preview to the user, get their explicit approval, and only then call again with true to change the AI settings."
              },
              "settings": {
                "type": "object",
                "description": "The settings to change, e.g. {\"voice_note_mode\": \"silent\"}."
              }
            }
          },
          "annotations": {
            "title": "Change the AI Assistant Settings",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "diagnose_messaging",
          "description": "Answer \"why are my messages failing / not arriving?\": checks the WhatsApp number connection (QR logged out, access removed by Meta, test number, billing block), the reasons Meta gave for the latest failed messages, failed automatic store messages, and automatic messages whose WhatsApp template is not approved — each problem with its fix. Read-only.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Diagnose Failed or Missing Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_store_setup_checklist",
          "description": "The step-by-step set-up of a store on LetsBot (Salla, Zid, Shopify, …): 1 connect the WhatsApp number, 2 store notifications (order status, verification code, welcome, review), 3 abandoned-cart reminders, 4 cash-on-delivery confirmation, 5 AI replies. Use it when the merchant asks to set up his store/account or \"what is left\"; then walk him through the first unfinished step.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Store Set-up Checklist",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": []
    },
    "instructions": null
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}