{
  "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": "api.wassenger.com",
    "site": "wassenger.com",
    "addresses": [
      {
        "address": "34.120.161.103",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "34.120.161.103"
        ],
        "first_seen": "2026-11-21T11:54:00.845Z",
        "last_seen": "2026-11-23T17:05:06.943Z",
        "checks": 3
      }
    ],
    "hosting": [
      {
        "value": "Google Cloud",
        "evidence": "Via header \"1.1 google\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "WhatsApp MCP",
      "version": "1.0.0",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "via": "1.1 google"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "com.wassenger",
      "total": 0,
      "sample": []
    },
    "same_repository": {
      "repository_url": "https://github.com/wassengerhq/whatsapp-mcp",
      "total": 0,
      "sample": []
    },
    "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": "18201",
    "server_name": "com.wassenger/whatsapp",
    "url": "https://api.wassenger.com/mcp",
    "host": "api.wassenger.com",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T17:05:06.943Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "b18a6c1c89856c2378ed6f36545dec4c97bd9fa280a0586a938051d016323970",
    "first_listed_at": "2026-11-21T11:54:00.845Z",
    "created_at": "2026-11-21T07:05:16.223Z",
    "resolved_addresses": [
      "34.120.161.103"
    ]
  },
  "server": {
    "name": "com.wassenger/whatsapp",
    "title": "WhatsApp Business API by Wassenger",
    "description": "Send and read WhatsApp messages, templates, chats and campaigns through the official Business API.",
    "version": "1.0.0",
    "registry_status": "active",
    "repository_url": "https://github.com/wassengerhq/whatsapp-mcp",
    "website_url": "https://wassenger.com/integrations/claude",
    "published_at": "2026-10-25T15:19:14.287Z",
    "updated_at": "2026-10-25T15:19:14.287Z",
    "first_seen": "2026-11-21T07:05:15.633Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [
      "sends-messages"
    ],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T17:04:07.588Z"
  },
  "operator": {
    "key": "wassenger.com",
    "name": "wassenger.com",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 3,
    "answered_percent": 100,
    "avg_listing_latency_ms": 708,
    "first_check_in_window": "2026-11-21T11:54:00.845Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "b18a6c1c89856c2378ed6f36545dec4c97bd9fa280a0586a938051d016323970",
    "tools": 54,
    "resources": 0,
    "prompts": 48,
    "first_seen": "2026-11-22T17:04:03.539Z",
    "tool_names": [
      "send_whatsapp_message",
      "manage_whatsapp_message_interactions",
      "verifyWhatsAppNumberExists",
      "validatePhoneNumbers",
      "get_whatsapp_chats",
      "analyze_whatsapp_chats",
      "get_whatsapp_unread_chats",
      "get_whatsapp_chats_by_status",
      "get_whatsapp_assigned_chats",
      "get_whatsapp_chats_by_contact_type",
      "get_whatsapp_chat_by_id",
      "search_whatsapp_chats_by_name",
      "get_whatsapp_archived_chats",
      "get_whatsapp_chats_by_date_range",
      "get_whatsapp_chat_statistics",
      "export_whatsapp_chats",
      "manage_whatsapp_chat",
      "get_whatsapp_chat_messages",
      "analyze_whatsapp_chat_messages",
      "get_whatsapp_devices",
      "get_whatsapp_device_details",
      "list_whatsapp_templates",
      "create_whatsapp_template",
      "delete_whatsapp_template",
      "list_whatsapp_flows",
      "send_whatsapp_flow",
      "list_whatsapp_flow_responses",
      "manage_whatsapp_team",
      "search_whatsapp_outbound_files",
      "upload_whatsapp_file_from_url",
      "get_whatsapp_file_details",
      "update_whatsapp_file_metadata",
      "delete_whatsapp_file",
      "download_whatsapp_file",
      "search_whatsapp_chat_files",
      "get_whatsapp_chat_file_details",
      "download_whatsapp_chat_file",
      "manage_whatsapp_groups",
      "manage_whatsapp_group_participants",
      "manage_whatsapp_channels",
      "manage_whatsapp_channel_messages",
      "manage_whatsapp_labels",
      "manage_whatsapp_contacts",
      "manage_whatsapp_contact_actions",
      "manage_whatsapp_status",
      "manage_whatsapp_departments",
      "manage_whatsapp_campaigns",
      "manage_whatsapp_campaign_contacts",
      "manage_whatsapp_pipelines",
      "manage_whatsapp_deals",
      "manage_whatsapp_deal_notes",
      "manage_whatsapp_queue",
      "ping",
      "health_check"
    ],
    "declared": {
      "tools": [
        {
          "name": "send_whatsapp_message",
          "description": "Comprehensive WhatsApp message sending with action-based operations. Supports all message types including text, media, location, contact, poll, event messages, with scheduling, live delivery, expiration, agent messaging, and template support. All message sending operations unified in one tool.\n\nScheduling: pass exactly one of deliverAt, delay or delayTo on the text, media, template, agent or scheduled actions. Leaving all three out sends the message right away. On WhatsApp Cloud API (WABA) numbers a plain text, media or agent message still needs the customer to have written within the last 24 hours at delivery time, so a reminder that lands later than that must use the template action.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "chat"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp chat ID (e.g., 1234567890@c.us for phone numbers, 123456789000000000@g.us for groups, 123456789000000@newsletter for WhatsApp channels)"
              },
              "poll": {
                "type": "object",
                "properties": {
                  "secret": {
                    "type": "boolean",
                    "default": false,
                    "description": "Hide vote results until poll ends"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 100,
                      "minLength": 1
                    },
                    "maxItems": 12,
                    "minItems": 2,
                    "description": "Poll voting options (2-12 options)"
                  },
                  "question": {
                    "type": "string",
                    "maxLength": 100,
                    "minLength": 1,
                    "description": "Poll question"
                  },
                  "multipleAnswers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Allow multiple answer selection"
                  }
                },
                "description": "Poll content (required for poll action)",
                "additionalProperties": false
              },
              "agent": {
                "$ref": "#/properties/agentId",
                "description": "Agent ID (24 character hex string)"
              },
              "delay": {
                "type": "integer",
                "minimum": 1,
                "description": "Deliver the message after this many seconds (max 31536000, a year)"
              },
              "event": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "description": "Event date in ISO 8601 format"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "minLength": 1,
                    "description": "Event name"
                  },
                  "callLink": {
                    "type": "string",
                    "format": "uri",
                    "description": "Call link for the event"
                  },
                  "callType": {
                    "enum": [
                      "voice",
                      "video"
                    ],
                    "type": "string",
                    "description": "Type of call event"
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 200,
                    "description": "Event location"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Event description"
                  }
                },
                "description": "Event content (required for event action)",
                "additionalProperties": false
              },
              "media": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public URL of the media file"
                  },
                  "file": {
                    "type": "string",
                    "description": "Uploaded file ID from Wassenger"
                  },
                  "format": {
                    "enum": [
                      "gif",
                      "ptt",
                      "native"
                    ],
                    "type": "string",
                    "description": "Media format (gif for GIFs, ptt for voice notes)"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Custom filename for the media"
                  },
                  "viewOnce": {
                    "type": "boolean",
                    "description": "Send as view-once media"
                  }
                },
                "description": "Media content (required for media action)",
                "additionalProperties": false
              },
              "order": {
                "type": "boolean",
                "default": false,
                "description": "Ensure strict message delivery order"
              },
              "action": {
                "enum": [
                  "text",
                  "template",
                  "scheduled",
                  "media",
                  "location",
                  "contact",
                  "poll",
                  "event",
                  "live",
                  "expiring",
                  "agent"
                ],
                "type": "string",
                "description": "Action to perform for WhatsApp message sending"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Target WhatsApp device ID (24 character hex string) used for message delivery. Only required if you have multiple WhatsApp numbers connected. Use MCP tool \"get_whatsapp_devices\" to retrieve a list of available devices."
              },
              "actions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "action"
                  ],
                  "properties": {
                    "action": {
                      "enum": [
                        "chat:assign",
                        "chat:unassign",
                        "chat:resolve",
                        "chat:unresolve",
                        "chat:read",
                        "chat:unread",
                        "labels:add",
                        "labels:remove",
                        "labels:set",
                        "metadata:set",
                        "metadata:add",
                        "metadata:remove"
                      ],
                      "type": "string"
                    },
                    "params": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 10,
                "description": "Actions to perform after message delivery (for agent action)"
              },
              "agentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Agent ID for agent messaging (required for agent action)"
              },
              "delayTo": {
                "type": "string",
                "description": "Deliver the message after a duration: 30m, 2h, 3d, 2w, 1M (max a year)"
              },
              "enqueue": {
                "enum": [
                  "never",
                  "opportunistic"
                ],
                "type": "string",
                "default": "never",
                "description": "Message delivery mode (for live action)"
              },
              "message": {
                "type": "string",
                "maxLength": 15000,
                "minLength": 1,
                "description": "Text message content (required for text, scheduled, live, expiring, agent, template actions)"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Contact website URL"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Contact name"
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "Contact email"
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 16,
                      "minLength": 8,
                      "description": "Phone number in E.164 format (e.g., +1234567890)"
                    },
                    "organization": {
                      "type": "string",
                      "description": "Contact organization"
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 10,
                "minItems": 1,
                "description": "Array of contacts to send, max 10 (required for contact action)"
              },
              "location": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Location name or title"
                  },
                  "address": {
                    "type": "string",
                    "description": "Human-readable address"
                  },
                  "coordinates": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "maxItems": 2,
                    "minItems": 2,
                    "description": "Latitude and longitude coordinates"
                  }
                },
                "description": "Location content (required for location action)",
                "additionalProperties": false
              },
              "template": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "$ref": "#/properties/template/properties/header/properties/text"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "amount": {
                              "type": "integer",
                              "description": "Amount in minor units multiplied by 1000 (e.g. 10990 for $10.99)"
                            },
                            "currency": {
                              "type": "string",
                              "maxLength": 3,
                              "minLength": 3,
                              "description": "ISO 4217 Currency Code (e.g. USD, EUR)"
                            },
                            "presentation": {
                              "type": "string",
                              "description": "Default text if localization fails (e.g. \"$10.99\")"
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "date": {
                              "type": "string",
                              "description": "ISO 8601 date string"
                            },
                            "calendar": {
                              "enum": [
                                "gregorian",
                                "solar_hijri"
                              ],
                              "type": "string"
                            },
                            "timezone": {
                              "type": "string",
                              "description": "IAN time zone name"
                            },
                            "timestamp": {
                              "type": "integer",
                              "description": "Unix epoch timestamp in seconds"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    },
                    "maxItems": 15,
                    "description": "Template body variables"
                  },
                  "flow": {
                    "type": "object",
                    "properties": {
                      "data": {
                        "type": "object",
                        "description": "Values to prefill the form with, by field name",
                        "additionalProperties": {}
                      },
                      "token": {
                        "type": "string",
                        "maxLength": 200,
                        "minLength": 1,
                        "description": "Your reference for this send; it comes back with the answers"
                      }
                    },
                    "description": "For a template whose button opens a WhatsApp Form",
                    "additionalProperties": false
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "description": "Approved template name"
                  },
                  "button": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "description": "URL suffix for URL buttons"
                        },
                        "name": {
                          "type": "string",
                          "description": "Variable name for URL buttons"
                        },
                        "type": {
                          "enum": [
                            "quick_reply",
                            "url",
                            "copy_code",
                            "mpm",
                            "flow"
                          ],
                          "type": "string"
                        },
                        "value": {
                          "type": "string",
                          "description": "Variable value for URL buttons"
                        },
                        "action": {
                          "type": "object",
                          "properties": {
                            "data": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "flow": {
                              "type": "string"
                            },
                            "sections": {
                              "type": "array"
                            },
                            "thumbnail": {
                              "type": "string"
                            }
                          },
                          "additionalProperties": false
                        },
                        "coupon": {
                          "type": "string",
                          "description": "Coupon code for copy_code buttons"
                        },
                        "payload": {
                          "type": "string",
                          "description": "Payload for quick_reply buttons"
                        },
                        "position": {
                          "type": "integer",
                          "maximum": 9,
                          "minimum": 0,
                          "description": "Button position index (0-9)"
                        }
                      },
                      "additionalProperties": false
                    },
                    "maxItems": 10,
                    "description": "Template button variables"
                  },
                  "header": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "maxLength": 32,
                            "description": "Variable placeholder name (e.g., \"0\", \"1\", \"name\")"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 1024,
                            "description": "Text value to replace the placeholder"
                          }
                        },
                        "additionalProperties": false
                      },
                      "media": {
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "description": "Public URL of the media"
                          },
                          "file": {
                            "type": "string",
                            "maxLength": 24,
                            "minLength": 24,
                            "description": "Uploaded file ID (24 char hex)"
                          },
                          "type": {
                            "enum": [
                              "image",
                              "video",
                              "document"
                            ],
                            "type": "string"
                          },
                          "caption": {
                            "type": "string",
                            "maxLength": 1024
                          },
                          "filename": {
                            "type": "string"
                          }
                        },
                        "additionalProperties": false
                      },
                      "location": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "latitude": {
                            "type": "number",
                            "maximum": 90,
                            "minimum": -90
                          },
                          "longitude": {
                            "type": "number",
                            "maximum": 180,
                            "minimum": -180
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "description": "Template header variables",
                    "additionalProperties": false
                  },
                  "language": {
                    "type": "string",
                    "pattern": "^[a-z]{2}(_[A-Z]{2})?$",
                    "description": "Template language code (e.g., en, en_US)"
                  },
                  "timeoffer": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string"
                      },
                      "timezone": {
                        "type": "string"
                      },
                      "timestamp": {
                        "type": "integer"
                      }
                    },
                    "description": "Limited time offer expiration",
                    "additionalProperties": false
                  }
                },
                "description": "Template configuration (required for template action)",
                "additionalProperties": false
              },
              "deliverAt": {
                "type": "string",
                "description": "Absolute ISO 8601 instant to deliver the message at, with a time zone (e.g. 2026-09-20T09:00:00+02:00). Must be in the future and less than a year away"
              },
              "reference": {
                "type": "string",
                "maxLength": 150,
                "minLength": 1,
                "description": "Custom reference ID for message tracking"
              },
              "expiration": {
                "type": "string",
                "description": "Time-to-live duration e.g. \"1h\", \"30m\", \"2d\" (for expiring action)"
              },
              "previewUrl": {
                "type": "boolean",
                "default": true,
                "description": "Enable URL preview in messages (for text, template actions)"
              },
              "sendReadAck": {
                "type": "boolean",
                "default": true,
                "description": "Send chat read acknowledgment after the message is delivered"
              },
              "idempotencyKey": {
                "type": "string",
                "maxLength": 36,
                "minLength": 6,
                "description": "Your unique key for this message, 6 to 36 characters (a UUID works). Reuse the same key when retrying the same message: the API then answers 409 Conflict with the id of the message already created instead of sending it twice. Use a new key for every different message."
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_message_interactions",
          "description": "Manage WhatsApp message interactions including replies, forwards, reactions, and poll voting. Handle all message interaction operations with action-based approach for comprehensive message engagement functionality.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "chat"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp chat ID (e.g., 1234567890@c.us for phone numbers, 123456789000000000@g.us for groups, 123456789000000@newsletter for WhatsApp channels)"
              },
              "vote": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "pattern": "[a-fA-F0-9]{18,32}",
                    "description": "Poll message ID to vote on"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "number",
                      "minimum": 0
                    },
                    "minItems": 0,
                    "description": "Option indices to vote for (empty array to remove all votes)"
                  }
                },
                "description": "Vote details (required for vote action)",
                "additionalProperties": false
              },
              "agent": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Agent ID (24 character hex string)"
              },
              "quote": {
                "type": "string",
                "pattern": "[a-fA-F0-9]{18,32}",
                "description": "Message ID to reply to (required for reply action)"
              },
              "action": {
                "enum": [
                  "reply",
                  "forward",
                  "reaction",
                  "vote"
                ],
                "type": "string",
                "description": "Action to perform for WhatsApp message interactions"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Target WhatsApp device ID (24 character hex string) used for message delivery. Only required if you have multiple WhatsApp numbers connected. Use MCP tool \"get_whatsapp_devices\" to retrieve a list of available devices."
              },
              "forward": {
                "type": "object",
                "properties": {
                  "chat": {
                    "type": "string",
                    "description": "Source chat ID where the message is located"
                  },
                  "message": {
                    "type": "string",
                    "pattern": "[a-fA-F0-9]{18,32}",
                    "description": "Message ID to forward"
                  }
                },
                "description": "Forward message details (required for forward action)",
                "additionalProperties": false
              },
              "message": {
                "type": "string",
                "maxLength": 15000,
                "minLength": 1,
                "description": "Reply message content (required for reply action)"
              },
              "reaction": {
                "type": "string",
                "maxLength": 10,
                "minLength": 1,
                "description": "Emoji reaction to send, use \"-\" to remove reaction (required for reaction action)"
              },
              "selectId": {
                "type": "string",
                "maxLength": 50,
                "description": "ID of selected button/list option when replying to interactive messages (for reply action)"
              },
              "reference": {
                "type": "string",
                "maxLength": 150,
                "minLength": 1,
                "description": "Custom reference ID for message tracking"
              },
              "idempotencyKey": {
                "type": "string",
                "maxLength": 36,
                "minLength": 6,
                "description": "Your unique key for this message, 6 to 36 characters (a UUID works). Reuse the same key when retrying the same message: the API then answers 409 Conflict with the id of the message already created instead of sending it twice. Use a new key for every different message."
              },
              "reactionMessage": {
                "type": "string",
                "pattern": "[a-fA-F0-9]{18,32}",
                "description": "Message ID to react to (required for reaction action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "verifyWhatsAppNumberExists",
          "description": "Checks if a given phone number is associated with an active WhatsApp account.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "phoneNumber"
            ],
            "properties": {
              "phoneNumber": {
                "type": "string",
                "maxLength": 16,
                "minLength": 8,
                "description": "The phone number to verify in E.164 format"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "validatePhoneNumbers",
          "description": "Validates the format of given phone numbers according to E.164 standard and checks their potential validity. Can validate up to 500 phone numbers at once.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "phoneNumbers"
            ],
            "properties": {
              "phoneNumbers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 16,
                  "minLength": 8
                },
                "maxItems": 500,
                "minItems": 1,
                "description": "Array of phone numbers to validate in E.164 format (max 500)"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Validate phone numbers",
            "readOnlyHint": true,
            "openWorldHint": true
          }
        },
        {
          "name": "get_whatsapp_chats",
          "description": "Comprehensive WhatsApp chat retrieval tool supporting all chat operations through a unified action-based interface. Perfect for accessing chat lists, searching conversations, filtering by various criteria, and managing chat data. Supports all WhatsApp chat retrieval operations with consistent formatting.\n\nAvailable actions:\n- recent: Most recent chats\n- unread: Chats with unread messages\n- by_status: Filter by chat status (pending, active, resolved, archived...)\n- assigned: Chats assigned to an agent or department, or to anyone\n- unassigned: Chats nobody is handling yet\n- by_contact_type: Filter by chat type (chat, group, community, channel)\n- by_id: One chat by its WhatsApp ID\n- search: Free text search over phone, name, contact, company, metadata and private notes\n- archived: Archived chats\n- by_date_range: Chats by last message, first message or last inbound message date\n\nEvery action accepts labels, labelsExclude, status and contactTypes as extra filters. To find leads that went quiet, use by_date_range with activityType \"lastInbound\" and a toDate: those are the chats where the customer has not written since then.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "query": {
                "type": "string",
                "maxLength": 150,
                "minLength": 1,
                "description": "Free text to search for (required for search action)"
              },
              "action": {
                "enum": [
                  "recent",
                  "unread",
                  "by_status",
                  "assigned",
                  "unassigned",
                  "by_contact_type",
                  "by_id",
                  "search",
                  "archived",
                  "by_date_range"
                ],
                "type": "string",
                "default": "recent",
                "description": "Chat retrieval action to perform"
              },
              "chatId": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "Specific chat ID (required for by_id action)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist, e.g. ['id','name','contact.phone','unreadCount']. Overrides verbosity when set."
              },
              "labels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1,
                  "description": "Label name, or \"*\" to match any label"
                },
                "maxItems": 30,
                "description": "Only chats carrying at least one of these labels. Use [\"*\"] for any label. Cannot be combined with labelsExclude"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "removed",
                    "banned",
                    "archived",
                    "muted",
                    "pending",
                    "active",
                    "resolved"
                  ],
                  "type": "string",
                  "description": "Platform chat status"
                },
                "maxItems": 7,
                "description": "Filter by chat status (required for by_status action, optional elsewhere)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "End date (for by_date_range and archived actions)"
              },
              "agentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Filter by assigned agent ID (for assigned action)"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Start date (for by_date_range and archived actions)"
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level: summary = curated high-signal fields (default, token-lean); standard = broader set; full = complete chat objects (escape hatch)."
              },
              "activityType": {
                "enum": [
                  "lastMessage",
                  "firstMessage",
                  "lastInbound"
                ],
                "type": "string",
                "default": "lastMessage",
                "description": "Which date the range applies to: last message of any side, first message ever, or last message received from the customer"
              },
              "contactTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "chat",
                    "group",
                    "community",
                    "channel",
                    "broadcast"
                  ],
                  "type": "string",
                  "description": "Type of WhatsApp chat"
                },
                "maxItems": 5,
                "description": "Filter by chat type (required for by_contact_type action, optional elsewhere)"
              },
              "departmentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Filter by assigned department ID (for assigned action)"
              },
              "labelsExclude": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/labels/items"
                },
                "maxItems": 30,
                "description": "Exclude chats carrying any of these labels. Use [\"*\"] to exclude every labelled chat"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "analyze_whatsapp_chats",
          "description": "Reports and exports of the chats of a WhatsApp number.\n\nAvailable actions:\n- statistics: the team's figures for a period (7 days by default, up to 92): new, resolved and reopened chats, messages received and sent, internal notes, average time to the first reply, to each reply, to resolve and to handle a chat, what was in the inbox at the end of the period, the most used labels and a day-by-day breakdown. Add compareFromDate and compareToDate to compare with an earlier period and get the change in percent. Days are cut at midnight in the account timezone, so for whole days pass local midnights with their offset. Times are in seconds. There is no breakdown per agent or per hour.\n- export: Export chats in JSON, CSV or TXT, filtered by status and date, paging through as many chats as requested\n\nUse this tool for: weekly reports, response time reviews, backups, and feeding chat lists into another system.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "device"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "default": 100,
                "maximum": 1000,
                "minimum": 1,
                "description": "Maximum number of WhatsApp chats to export (max 1000, fetched in pages of 500)"
              },
              "action": {
                "enum": [
                  "statistics",
                  "export"
                ],
                "type": "string",
                "description": "Chat analysis action to perform"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist for the json format. Overrides verbosity when set."
              },
              "format": {
                "enum": [
                  "json",
                  "csv",
                  "txt"
                ],
                "type": "string",
                "default": "json",
                "description": "Export format"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "removed",
                    "banned",
                    "archived",
                    "muted",
                    "pending",
                    "active",
                    "resolved"
                  ],
                  "type": "string",
                  "description": "Platform chat status"
                },
                "maxItems": 7,
                "description": "Export only: filter by chat status"
              },
              "toDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "End of the period. Statistics: defaults to now. Export: only chats whose last message is before this date"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Start of the period, e.g. 2026-09-11T00:00:00+02:00. Statistics: defaults to 7 days before toDate. Export: only chats whose last message is after this date"
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level for the json format"
              },
              "compareToDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: end of the earlier period to compare with"
              },
              "compareFromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: start of an earlier period to compare with. Requires compareToDate"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_unread_chats",
          "description": "Retrieve WhatsApp chats with unread messages. Essential for managing pending conversations and customer support.\n\nSame as get_whatsapp_chats with action \"unread\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "labels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1,
                  "description": "Label name, or \"*\" to match any label"
                },
                "maxItems": 30,
                "description": "Only chats carrying at least one of these labels. Use [\"*\"] for any label. Cannot be combined with labelsExclude"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chats_by_status",
          "description": "Search and filter WhatsApp chats by their platform status (active, pending, resolved, etc.). Useful for workflow management and chat organization.\n\nSame as get_whatsapp_chats with action \"by_status\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 30,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "removed",
                    "banned",
                    "archived",
                    "muted",
                    "pending",
                    "active",
                    "resolved"
                  ],
                  "type": "string",
                  "description": "Platform chat status"
                },
                "maxItems": 7,
                "description": "Filter by chat status (required for by_status action, optional elsewhere)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_assigned_chats",
          "description": "Retrieve WhatsApp chats assigned to specific agents or departments. Essential for agent workload management and performance tracking.\n\nSame as get_whatsapp_chats with action \"assigned\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 30,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "agentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Filter by assigned agent ID (for assigned action)"
              },
              "departmentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Filter by assigned department ID (for assigned action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chats_by_contact_type",
          "description": "Filter WhatsApp chats by contact type (individual users, groups, communities, channels). Useful for analyzing different communication patterns.\n\nSame as get_whatsapp_chats with action \"by_contact_type\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 30,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "contactTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "chat",
                    "group",
                    "community",
                    "channel",
                    "broadcast"
                  ],
                  "type": "string",
                  "description": "Type of WhatsApp chat"
                },
                "maxItems": 5,
                "description": "Filter by chat type (required for by_contact_type action, optional elsewhere)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chat_by_id",
          "description": "Retrieve detailed information about a specific chat using its WhatsApp ID. Includes complete metadata, assignment info, and activity details.\n\nSame as get_whatsapp_chats with action \"by_id\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "chat"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp chat ID (e.g., 1234567890@c.us for phone numbers, 123456789000000000@g.us for groups, 123456789000000@newsletter for WhatsApp channels)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist, e.g. ['id','name','contact.phone','unreadCount']. Overrides verbosity when set."
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level: summary = curated high-signal fields (default, token-lean); standard = broader set; full = complete chat objects (escape hatch)."
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "search_whatsapp_chats_by_name",
          "description": "Search for WhatsApp chats by contact name, group name, phone number, company, metadata or private notes. Perfect for quickly finding specific conversations.\n\nSame as get_whatsapp_chats with action \"search\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "limit": {
                "type": "number",
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "query": {
                "type": "string",
                "maxLength": 150,
                "minLength": 1,
                "description": "Free text to search for (required for search action)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "contactTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "chat",
                    "group",
                    "community",
                    "channel",
                    "broadcast"
                  ],
                  "type": "string",
                  "description": "Type of WhatsApp chat"
                },
                "maxItems": 5,
                "description": "Filter by chat type (required for by_contact_type action, optional elsewhere)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_archived_chats",
          "description": "Retrieve archived WhatsApp chats. Useful for accessing historical conversations and managing chat organization.\n\nSame as get_whatsapp_chats with action \"archived\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 30,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "End date (for by_date_range and archived actions)"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Start date (for by_date_range and archived actions)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chats_by_date_range",
          "description": "Retrieve WhatsApp chats that were active within a specific date range. Perfect for analyzing conversation patterns and generating reports.\n\nSame as get_whatsapp_chats with action \"by_date_range\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 300,
                "minimum": 0,
                "description": "Results page, starting at 0"
              },
              "sort": {
                "enum": [
                  "date:asc",
                  "date:desc",
                  "lastMessage:asc",
                  "lastMessage:desc",
                  "inbound:asc"
                ],
                "type": "string",
                "description": "Result order. Defaults to the API order (most recent activity first)"
              },
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of WhatsApp chats per call (max 100)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "End date (for by_date_range and archived actions)"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Start date (for by_date_range and archived actions)"
              },
              "activityType": {
                "enum": [
                  "lastMessage",
                  "firstMessage",
                  "lastInbound"
                ],
                "type": "string",
                "default": "lastMessage",
                "description": "Which date the range applies to: last message of any side, first message ever, or last message received from the customer"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chat_statistics",
          "description": "Figures of the team for a period: chat and message volumes, response and resolution times, and what was in the inbox at the end of the period, optionally compared with an earlier period.\n\nSame as analyze_whatsapp_chats with action \"statistics\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "toDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "End of the period. Defaults to now"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Start of the period, e.g. 2026-09-11T00:00:00+02:00. Defaults to 7 days before toDate"
              },
              "compareToDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: end of the earlier period to compare with"
              },
              "compareFromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: start of an earlier period to compare with. Requires compareToDate"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "export_whatsapp_chats",
          "description": "Export WhatsApp chats list in various formats for backup, analysis, or reporting purposes.\n\nSame as analyze_whatsapp_chats with action \"export\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "default": 100,
                "maximum": 1000,
                "minimum": 1,
                "description": "Maximum number of WhatsApp chats to export (max 1000, fetched in pages of 500)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist for the json format. Overrides verbosity when set."
              },
              "format": {
                "enum": [
                  "json",
                  "csv",
                  "txt"
                ],
                "type": "string",
                "default": "json",
                "description": "Export format"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "removed",
                    "banned",
                    "archived",
                    "muted",
                    "pending",
                    "active",
                    "resolved"
                  ],
                  "type": "string",
                  "description": "Platform chat status"
                },
                "maxItems": 7,
                "description": "Export only: filter by chat status"
              },
              "toDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "End of the period. Statistics: defaults to now. Export: only chats whose last message is before this date"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Start of the period, e.g. 2026-09-11T00:00:00+02:00. Statistics: defaults to 7 days before toDate. Export: only chats whose last message is after this date"
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level for the json format"
              },
              "compareToDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: end of the earlier period to compare with"
              },
              "compareFromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{1,3})?)?(Z|[+-]\\d{2}:\\d{2})?$",
                "description": "Statistics only: start of an earlier period to compare with. Requires compareToDate"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_chat",
          "description": "Change a WhatsApp chat in the team inbox without sending anything to the customer: hand it to a teammate or department, add or remove labels, resolve or reopen it, leave an internal note, or mark it read or unread. The customer sees none of it. Your team sees the change, and your account's chat webhooks are notified.\n\nAvailable actions:\n- assign: give the chat to agentId, agentEmail or departmentId (departments need a plan that includes them). A pending chat becomes active.\n- unassign: take the chat off its agent and department. It goes back to pending.\n- add_labels / remove_labels: the labels must already exist on the number, create them first with manage_whatsapp_labels. The chat keeps any label you do not mention.\n- resolve: close the conversation.\n- reopen: back to active if someone owns the chat, pending otherwise.\n- add_note: private note only your team can see (2 to 6000 characters). authorId writes it as that teammate.\n- mark_read / mark_unread: marking a resolved chat as unread reopens it.\n\nTo write to the customer, use send_whatsapp_message instead.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "device",
              "chat"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "pattern": "^(\\+?[0-9]{8,15}|[0-9-]{5,40}@(c\\.us|g\\.us|lid|newsletter|broadcast)|[A-Z]{2}\\.(ENT\\.)?[A-Za-z0-9]{1,128}@bsuid)$",
                "description": "The chat: a phone number in international format, or its WhatsApp chat ID as returned by get_whatsapp_chats"
              },
              "note": {
                "type": "string",
                "maxLength": 6000,
                "minLength": 2,
                "description": "Internal note text, WhatsApp formatting allowed (for add_note)"
              },
              "action": {
                "enum": [
                  "assign",
                  "unassign",
                  "add_labels",
                  "remove_labels",
                  "resolve",
                  "reopen",
                  "add_note",
                  "mark_read",
                  "mark_unread"
                ],
                "type": "string",
                "description": "What to change on the chat"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "WhatsApp number (device) ID the chat belongs to"
              },
              "labels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 30,
                  "minLength": 1
                },
                "maxItems": 40,
                "minItems": 1,
                "description": "Label names (for add_labels and remove_labels)"
              },
              "agentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "Teammate user ID to assign the chat to (for assign)"
              },
              "authorId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "Teammate user ID the note is written as. Defaults to the API key owner (for add_note)"
              },
              "agentEmail": {
                "type": "string",
                "format": "email",
                "maxLength": 100,
                "minLength": 5,
                "description": "Teammate email to assign the chat to, instead of agentId (for assign)"
              },
              "departmentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "Department ID to assign the chat to (for assign). Look it up with manage_whatsapp_departments"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chat_messages",
          "description": "Retrieve WhatsApp chat messages (both inbound and outbound) for a specific device. Backed by the device-scoped Chat Messages endpoint, which requires a Platform subscription on the target device.\n\nAvailable actions:\n- recent: Latest messages in a chat (newest first by default)\n- search: Text search across messages (within a chat or device-wide)\n- date_range: Messages in a specific time window\n- by_sender: Messages sent from a specific phone number or WID\n- by_type: Messages filtered by type (text, image, video, audio, document, location, contact, etc.)\n- by_id: Fetch a specific message by its WhatsApp message ID\n- thread: Get conversation context around a specific message (N before + target + N after)\n- media: Messages containing media files\n\nThe 'device' parameter accepts a device ID (24-hex), phone number in E.164 format, or device alias (e.g., \"Sales 2\") — pass exactly what the user named in their request. If the account has a single device, omit it and it will be auto-selected. If the account has multiple devices and the user didn't name one, the tool returns an error listing available devices — ask the user which one they mean.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp chat ID. Required for all actions except by_id and search (which accepts device-wide search when chat is omitted)"
              },
              "limit": {
                "type": "number",
                "default": 20,
                "maximum": 50,
                "minimum": 1,
                "description": "Maximum messages to retrieve per request (REST API caps at 50)"
              },
              "query": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Text to search for (required for search action)"
              },
              "action": {
                "enum": [
                  "recent",
                  "search",
                  "date_range",
                  "by_sender",
                  "by_type",
                  "by_id",
                  "thread",
                  "media"
                ],
                "type": "string",
                "description": "Action to perform for WhatsApp message retrieval operations"
              },
              "device": {
                "type": "string",
                "maxLength": 64,
                "minLength": 8,
                "description": "Target WhatsApp device — accepts device ID (24-hex), phone number in E.164 format, or device alias. Optional: if the account has a single device, it is auto-selected; otherwise specify which one."
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist, e.g. ['id','date','flow','body']. Overrides verbosity when set."
              },
              "sender": {
                "type": "string",
                "maxLength": 16,
                "minLength": 8,
                "description": "Phone number or WID of message sender (required for by_sender action)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "Upper bound of the date range (maps to REST `before`)"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Lower bound of the date range (maps to REST `after`)"
              },
              "messageId": {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{18,32}$",
                "description": "Specific message ID (required for by_id and thread actions)"
              },
              "sortOrder": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order by date (default: desc)"
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level: summary = curated high-signal fields (default, token-lean); standard = broader set; full = complete message objects (escape hatch)."
              },
              "mediaTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "image",
                    "video",
                    "audio",
                    "document",
                    "sticker"
                  ],
                  "type": "string"
                },
                "description": "Filter by specific media types (media action)"
              },
              "contextAfter": {
                "type": "number",
                "default": 5,
                "maximum": 20,
                "minimum": 0,
                "description": "Messages after target message (thread action)"
              },
              "includeMedia": {
                "type": "boolean",
                "default": true,
                "description": "Reserved for compatibility — media is always included when present"
              },
              "messageTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "text",
                    "image",
                    "video",
                    "audio",
                    "document",
                    "location",
                    "contact",
                    "poll",
                    "event",
                    "sticker",
                    "reaction",
                    "system"
                  ],
                  "type": "string",
                  "description": "Type of WhatsApp message"
                },
                "description": "Types of messages to retrieve (required for by_type action)"
              },
              "contextBefore": {
                "type": "number",
                "default": 5,
                "maximum": 20,
                "minimum": 0,
                "description": "Messages before target message (thread action)"
              },
              "includeQuotes": {
                "type": "boolean",
                "default": false,
                "description": "When true, request quoted message details from the API (off by default to keep responses lean)"
              },
              "includeReactions": {
                "type": "boolean",
                "default": true,
                "description": "Reserved for compatibility — reactions are returned inline by the REST API when available"
              },
              "includeFileDetails": {
                "type": "boolean",
                "default": true,
                "description": "Return full media file metadata (media action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "analyze_whatsapp_chat_messages",
          "description": "WhatsApp chat message analysis tool. Supports delivery-status lookups and chat export. The 'device' parameter accepts a device ID (24-hex), phone number (E.164), or alias — auto-selected if the account has a single device; otherwise the tool errors with the list of available devices so you can ask the user.\n\nAvailable actions:\n- delivery_status: Check delivery and read receipts for specific outbound messages (≤30 days old)\n- export: Export chat messages in JSON, CSV, or TXT format",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "chat": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp chat ID (required for export)"
              },
              "action": {
                "enum": [
                  "delivery_status",
                  "export"
                ],
                "type": "string",
                "description": "Action to perform for WhatsApp message analysis operations"
              },
              "device": {
                "type": "string",
                "maxLength": 64,
                "minLength": 8,
                "description": "Target WhatsApp device — accepts device ID (24-hex), phone number in E.164 format, or device alias. Optional: if the account has a single device, it is auto-selected; otherwise specify which one."
              },
              "format": {
                "enum": [
                  "json",
                  "csv",
                  "txt"
                ],
                "type": "string",
                "default": "json",
                "description": "Export format"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "Export period end date"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Export period start date"
              },
              "messageIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[a-fA-F0-9]{18,32}$",
                  "description": "WhatsApp message ID"
                },
                "maxItems": 20,
                "minItems": 1,
                "description": "Message IDs to check status for (required for delivery_status, max 20)"
              },
              "maxMessages": {
                "type": "number",
                "default": 500,
                "maximum": 1000,
                "minimum": 1,
                "description": "Maximum messages to export (paginated under the hood)"
              },
              "includeMedia": {
                "type": "boolean",
                "default": false,
                "description": "Include media file information in export"
              },
              "includeMetadata": {
                "type": "boolean",
                "default": true,
                "description": "Include full message metadata in export"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_devices",
          "description": "Comprehensive tool to retrieve WhatsApp devices with flexible filtering options. Supports all device query scenarios: get all devices, filter by status/session status, search by terms, get only active/online devices, etc.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Page number for pagination (0-based)"
              },
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Maximum number of devices to retrieve"
              },
              "search": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Search term: phone number, alias, or device ID"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "invalid",
                    "banned",
                    "removed",
                    "disabled",
                    "unpaid",
                    "pending",
                    "authorized",
                    "verified",
                    "operative"
                  ],
                  "type": "string",
                  "description": "Device operational status"
                },
                "description": "Filter by device operational statuses"
              },
              "minUptime": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Minimum session uptime in seconds (for online devices)"
              },
              "activeOnly": {
                "type": "boolean",
                "default": false,
                "description": "Only include active/operational devices (authorized, verified, operative)"
              },
              "exactMatch": {
                "type": "boolean",
                "default": false,
                "description": "Whether to use exact match for search (only applies when search is provided)"
              },
              "onlineOnly": {
                "type": "boolean",
                "default": false,
                "description": "Only include devices that are currently online"
              },
              "sessionStatus": {
                "type": "array",
                "items": {
                  "enum": [
                    "online",
                    "offline",
                    "timeout",
                    "timeout_sync",
                    "conflict",
                    "blocked",
                    "error",
                    "authorize",
                    "authorizing",
                    "new",
                    "loading"
                  ],
                  "type": "string",
                  "description": "WhatsApp session connectivity status"
                },
                "description": "Filter by session connectivity statuses"
              },
              "includeMetrics": {
                "type": "boolean",
                "default": true,
                "description": "Include device metrics (chat counts, contacts, etc.)"
              },
              "includeSettings": {
                "type": "boolean",
                "default": false,
                "description": "Include device settings and configuration"
              },
              "includeSessionLogs": {
                "type": "boolean",
                "default": false,
                "description": "Include recent session logs"
              },
              "includeSessionDetails": {
                "type": "boolean",
                "default": true,
                "description": "Include detailed session information"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_device_details",
          "description": "Retrieve comprehensive detailed information about a specific WhatsApp device using its ID. Returns complete device configuration, session status, metrics, and actionable insights. For WhatsApp Cloud API numbers it includes the health Meta reports: quality rating, messaging limit, payment problems, restrictions and the issues Meta lists with their fix. Use it to find out why messages are not going out.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deviceId"
            ],
            "properties": {
              "deviceId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID (24 character hexadecimal string)"
              },
              "includeMetrics": {
                "type": "boolean",
                "default": true,
                "description": "Include device metrics and statistics"
              },
              "includeSettings": {
                "type": "boolean",
                "default": true,
                "description": "Include device settings and configuration"
              },
              "includeSessionLogs": {
                "type": "boolean",
                "default": false,
                "description": "Include recent session logs"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "list_whatsapp_templates",
          "description": "Retrieve WhatsApp templates for a specific device (approved ones by default). Each template includes its components and the variables that must be filled in to send it. This is required for sending template-based messages.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "size": {
                "type": "number",
                "default": 500,
                "maximum": 500,
                "minimum": 1,
                "description": "Maximum number of templates to retrieve"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Target WhatsApp device ID (24 character hex string)"
              },
              "status": {
                "enum": [
                  "APPROVED",
                  "REJECTED",
                  "PENDING",
                  "DELETED"
                ],
                "type": "string",
                "default": "APPROVED",
                "description": "Filter templates by status (defaults to APPROVED)"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List WhatsApp Templates",
            "readOnlyHint": true,
            "openWorldHint": true
          }
        },
        {
          "name": "create_whatsapp_template",
          "description": "Create a WhatsApp message template and submit it to WhatsApp for review (WhatsApp Business API numbers only). It works in steps. Call it with whatever the user has given so far: if anything is missing or breaks a WhatsApp rule, it returns needsInput with the exact questions to ask, and nothing is created. When everything is valid it returns a preview and a confirmToken, still without creating anything. Show the preview; only after the user approves, call it again with the same fields plus the confirmToken. Supports text, image, video, document and location headers, body variables ({{1}} or {{first_name}}) with sample values, a footer, quick reply, URL, phone number and copy code buttons, and authentication (one-time code) templates.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "body": {
                "type": "string",
                "description": "Message body, up to 1024 characters. Mark per-message values with {{1}}, {{2}} or named variables like {{first_name}}; never at the very start or end, and never next to each other. Not used for AUTHENTICATION templates."
              },
              "name": {
                "type": "string",
                "description": "Template name: lowercase letters, numbers and underscores, e.g. order_ready"
              },
              "device": {
                "type": "string",
                "description": "WhatsApp Business API device ID (24 hex characters) that will own the template. Use get_whatsapp_devices to find it."
              },
              "footer": {
                "type": "string",
                "description": "Optional footer, up to 60 characters, without variables"
              },
              "header": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "ID of an already uploaded file, instead of mediaUrl"
                  },
                  "text": {
                    "type": "string",
                    "description": "Text for a TEXT header: up to 60 characters and at most one variable"
                  },
                  "format": {
                    "enum": [
                      "TEXT",
                      "IMAGE",
                      "VIDEO",
                      "DOCUMENT",
                      "LOCATION"
                    ],
                    "type": "string",
                    "description": "Header type"
                  },
                  "example": {
                    "type": "string",
                    "description": "Sample value for the {{1}} variable of a TEXT header"
                  },
                  "mediaUrl": {
                    "type": "string",
                    "description": "Public URL of a sample file: JPEG or PNG for IMAGE, MP4 for VIDEO, PDF for DOCUMENT"
                  }
                },
                "description": "Optional header shown above the body",
                "additionalProperties": false
              },
              "buttons": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "URL the button opens. End it with {{1}} when each message needs its own ending"
                    },
                    "text": {
                      "type": "string",
                      "description": "Button label, up to 25 characters (COPY_CODE buttons have a fixed label)"
                    },
                    "type": {
                      "enum": [
                        "QUICK_REPLY",
                        "URL",
                        "PHONE_NUMBER",
                        "COPY_CODE"
                      ],
                      "type": "string",
                      "description": "Button type"
                    },
                    "urlExample": {
                      "type": "string",
                      "description": "Sample value for the {{1}} at the end of the URL: only that part, not the full URL"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "description": "Number a PHONE_NUMBER button calls, in international format, e.g. +14155550142"
                    },
                    "couponExample": {
                      "type": "string",
                      "description": "Sample coupon code for a COPY_CODE button, up to 15 characters"
                    }
                  },
                  "additionalProperties": false
                },
                "description": "Optional buttons: up to 10 in total, at most 2 URL, 1 PHONE_NUMBER and 1 COPY_CODE, with quick replies grouped together"
              },
              "category": {
                "enum": [
                  "MARKETING",
                  "UTILITY",
                  "AUTHENTICATION"
                ],
                "type": "string",
                "description": "MARKETING (promotions and offers), UTILITY (order, account or appointment updates) or AUTHENTICATION (one-time codes)"
              },
              "language": {
                "type": "string",
                "description": "WhatsApp language code of the template text, e.g. en_US, es, pt_BR"
              },
              "bodyExamples": {
                "type": "object",
                "description": "One realistic sample value per body variable, keyed by the variable: {\"1\": \"Maria\"} or {\"first_name\": \"Maria\"}. Ask the user for them; never invent them.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "confirmToken": {
                "type": "string",
                "description": "Token returned with the preview. Pass it only after the user approved that exact preview."
              },
              "authentication": {
                "type": "object",
                "properties": {
                  "codeExpirationMinutes": {
                    "type": "number",
                    "description": "Minutes (1-90) until the code expires, shown in the footer"
                  },
                  "addSecurityRecommendation": {
                    "type": "boolean",
                    "description": "Add \"For your security, do not share this code.\" to the text"
                  }
                },
                "description": "Options for AUTHENTICATION templates only",
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create WhatsApp Template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_whatsapp_template",
          "description": "Delete one WhatsApp message template, in one language, from a WhatsApp Business API number. It works in two steps: called without a confirmToken it only reports which template would be deleted and returns a token, writing nothing; the deletion happens on a second call carrying that token, after the user approved it. It never deletes more than the template it reported, and it asks which language when the name exists in several.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the template to delete"
              },
              "device": {
                "type": "string",
                "description": "WhatsApp Business API device ID (24 hex characters) that owns the template"
              },
              "language": {
                "type": "string",
                "description": "Language code of the template to delete, e.g. es or en_US. Required when the name exists in several languages."
              },
              "confirmToken": {
                "type": "string",
                "description": "Token returned with the confirmation. Pass it only after the user approved deleting that exact template."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete WhatsApp Template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_whatsapp_flows",
          "description": "List WhatsApp Flows available for a device (WABA). Returns flow id, name, status, categories and entry screen. Use this to find a flow to send.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Target WhatsApp device ID (24 character hex string)"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "PUBLISHED",
                  "DEPRECATED",
                  "THROTTLED",
                  "BLOCKED"
                ],
                "type": "string",
                "description": "Filter by flow status"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List WhatsApp Flows",
            "readOnlyHint": true,
            "openWorldHint": true
          }
        },
        {
          "name": "send_whatsapp_flow",
          "description": "Send a published WhatsApp Form (Meta WhatsApp Flow) to a chat as a native interactive message: one message instead of asking question after question. Only works within the 24h customer-service window; to start a conversation, send a template whose button opens the form. Pass a token to match the answers to your own record (it comes back in the message:flow:response webhook), and data to prefill the form.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "phone",
              "flow_id",
              "cta"
            ],
            "properties": {
              "cta": {
                "type": "string",
                "maxLength": 30,
                "minLength": 1,
                "description": "Text of the button that opens the form (max 30 chars)"
              },
              "body": {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1,
                "description": "Message text shown above the button (max 1024 chars)"
              },
              "data": {
                "type": "object",
                "description": "Values to prefill the form with, by field name",
                "additionalProperties": {}
              },
              "phone": {
                "type": "string",
                "minLength": 6,
                "description": "Recipient phone number in international format (E.164), e.g. +34600111222"
              },
              "token": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Your reference for this send (an order or ticket id). It comes back with the answers."
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Target WhatsApp device ID (24 character hex string)"
              },
              "footer": {
                "type": "string",
                "maxLength": 60,
                "minLength": 1,
                "description": "Footer text under the message (max 60 chars)"
              },
              "header": {
                "type": "string",
                "maxLength": 60,
                "minLength": 1,
                "description": "Header text above the message (max 60 chars)"
              },
              "screen": {
                "type": "string",
                "description": "Screen to open. If omitted, the form opens on its first screen."
              },
              "flow_id": {
                "type": "string",
                "description": "The WhatsApp Flow ID to send (flowId from list_whatsapp_flows)"
              },
              "idempotencyKey": {
                "type": "string",
                "maxLength": 36,
                "minLength": 6,
                "description": "Your unique key for this message, 6 to 36 characters (a UUID works). Reuse the same key when retrying the same message: the API then answers 409 Conflict with the id of the message already created instead of sending it twice. Use a new key for every different message."
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Send WhatsApp Form",
            "openWorldHint": true
          }
        },
        {
          "name": "list_whatsapp_flow_responses",
          "description": "List what customers answered in a WhatsApp Form (Meta WhatsApp Flow), newest first: who answered, each question's label and value, and when. Takes the form's id from list_whatsapp_flows (not its flowId). Only keys of the account owner or an admin can read answers.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "form_id"
            ],
            "properties": {
              "to": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "Last day, YYYY-MM-DD (UTC)"
              },
              "from": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "First day, YYYY-MM-DD (UTC)"
              },
              "page": {
                "type": "integer",
                "minimum": 0,
                "description": "Page, from 0"
              },
              "size": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Answers per page (default 25, max 100)"
              },
              "device": {
                "$ref": "#/properties/campaign",
                "description": "Only answers received on this number"
              },
              "form_id": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "The form id (\"id\" from list_whatsapp_flows, 24 hex characters)"
              },
              "campaign": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "description": "Only answers to this campaign"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List WhatsApp Form responses",
            "readOnlyHint": true,
            "openWorldHint": true
          }
        },
        {
          "name": "manage_whatsapp_team",
          "description": "Comprehensive WhatsApp team management tool supporting all team operations. Perfect for managing team member lifecycle, device access, and role assignments. Supports all WhatsApp team operations through a unified action-based interface.\n\nAvailable actions:\n- search: Search and list team members with filtering options\n- get: Get detailed information about a specific team member by ID\n- create: Create a new team member and grant them access to a WhatsApp device (requires device, email, displayName, password, role and color)\n- update: Update an existing team member's name, email, password, role or color\n- delete: Delete one or more team members from the account, choosing what happens to their assigned chats\n- grant_access: Grant an existing team member access to a WhatsApp device\n- revoke_access: Revoke a team member's access to a WhatsApp device, choosing what happens to their assigned chats\n\nNotes:\n- New team members are always created against a specific WhatsApp device and are granted access to it immediately.\n- grant_access and revoke_access operate on a single team member at a time.\n- delete, and revoke_access when chatAction is \"reassign\", require reassignTo.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "ids": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/userId"
                },
                "maxItems": 30,
                "description": "Restrict search results to these team member IDs"
              },
              "page": {
                "type": "integer",
                "default": 0,
                "maximum": 100,
                "minimum": 0,
                "description": "Results page number"
              },
              "role": {
                "enum": [
                  "admin",
                  "supervisor",
                  "agent"
                ],
                "type": "string",
                "description": "Filter by team member role for search, or the role to assign for create and update"
              },
              "size": {
                "type": "integer",
                "default": 50,
                "maximum": 300,
                "minimum": 1,
                "description": "Maximum number of results per page"
              },
              "color": {
                "enum": [
                  "blue",
                  "azure",
                  "indigo",
                  "purple",
                  "pink",
                  "red",
                  "orange",
                  "yellow",
                  "lime",
                  "green",
                  "teal",
                  "cyan",
                  "gray",
                  "gray-dark"
                ],
                "type": "string",
                "description": "Team member color (required for create, optional for update)"
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 100,
                "minLength": 5,
                "description": "Team member email address (required for create; may be used instead of userId to identify the member for delete and revoke_access)"
              },
              "force": {
                "type": "boolean",
                "default": false,
                "description": "Delete team members even when they still have access to active WhatsApp devices (for delete action)"
              },
              "query": {
                "type": "string",
                "maxLength": 100,
                "minLength": 2,
                "description": "Free text search over team member name and email (for search action)"
              },
              "action": {
                "enum": [
                  "search",
                  "get",
                  "create",
                  "update",
                  "delete",
                  "grant_access",
                  "revoke_access"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp team members"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID (required for create, grant_access and revoke_access actions; optional filter for search)"
              },
              "invite": {
                "type": "boolean",
                "default": false,
                "description": "Send an invitation email to the new team member (for create action)"
              },
              "remove": {
                "type": "boolean",
                "default": false,
                "description": "Also delete the team member from the account, not just from this device (for revoke_access action)"
              },
              "status": {
                "enum": [
                  "any",
                  "active",
                  "inactive",
                  "pending",
                  "removed"
                ],
                "type": "string",
                "description": "Filter by team member status (for search action)"
              },
              "userId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Team member ID (required for get, update, grant_access and revoke_access actions)"
              },
              "userIds": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/userId"
                },
                "maxItems": 10,
                "minItems": 1,
                "description": "Array of team member IDs to delete (required for the delete action, max 10)"
              },
              "password": {
                "type": "string",
                "maxLength": 50,
                "minLength": 5,
                "description": "Team member password (required for create, optional for update)"
              },
              "exceptIds": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/userId"
                },
                "maxItems": 50,
                "description": "Exclude these team member IDs from search results"
              },
              "chatAction": {
                "enum": [
                  "unassign",
                  "reassign",
                  "resolve"
                ],
                "type": "string",
                "default": "unassign",
                "description": "What to do with the chats assigned to the removed team member"
              },
              "loginAfter": {
                "$ref": "#/properties/loginBefore",
                "description": "Only team members whose last login is after this ISO 8601 date and time"
              },
              "reassignTo": {
                "$ref": "#/properties/userId",
                "description": "Team member ID to reassign chats to (required when chatAction is \"reassign\")"
              },
              "displayName": {
                "type": "string",
                "maxLength": 30,
                "minLength": 2,
                "description": "Team member display name (required for create)"
              },
              "loginBefore": {
                "type": "string",
                "format": "date-time",
                "description": "Only team members whose last login is before this ISO 8601 date and time"
              },
              "onlineAfter": {
                "$ref": "#/properties/loginBefore",
                "description": "Only team members last seen online after this ISO 8601 date and time"
              },
              "onlineBefore": {
                "$ref": "#/properties/loginBefore",
                "description": "Only team members last seen online before this ISO 8601 date and time"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "search_whatsapp_outbound_files",
          "description": "Search and list uploaded WhatsApp files with advanced filtering. Returns outbound files that have been uploaded to the platform for sending as media messages. Supports extensive filtering by filename, file type, size, creation date, tags, and more.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "ext": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by file extensions (e.g., [\"jpg\", \"pdf\", \"mp4\"])"
              },
              "kind": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by file kinds (e.g., [\"image\", \"video\", \"document\"])"
              },
              "mime": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by MIME types (e.g., [\"image/jpeg\", \"video/mp4\"])"
              },
              "page": {
                "type": "integer",
                "default": 0,
                "maximum": 100,
                "minimum": 0,
                "description": "Page number for pagination (0-based)"
              },
              "size": {
                "type": "integer",
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of files to return per page"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by file tags"
              },
              "after": {
                "type": "string",
                "format": "date-time",
                "description": "Filter files created after this date (ISO 8601 format)"
              },
              "before": {
                "type": "string",
                "format": "date-time",
                "description": "Filter files created before this date (ISO 8601 format)"
              },
              "format": {
                "type": "array",
                "items": {
                  "enum": [
                    "gif",
                    "ptt",
                    "native"
                  ],
                  "type": "string"
                },
                "description": "Filter by file format types"
              },
              "origin": {
                "enum": [
                  "upload",
                  "remote"
                ],
                "type": "string",
                "description": "Filter by upload origin: upload (local file) or remote (URL)"
              },
              "search": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Search files by filename, tags, or reference ID"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "pending",
                    "active",
                    "ready",
                    "error",
                    "expired"
                  ],
                  "type": "string"
                },
                "description": "Filter by file status"
              },
              "maxSize": {
                "type": "integer",
                "minimum": 1,
                "description": "Maximum file size in bytes"
              },
              "minSize": {
                "type": "integer",
                "minimum": 1,
                "description": "Minimum file size in bytes"
              },
              "filename": {
                "type": "string",
                "maxLength": 200,
                "description": "Filter by exact filename"
              },
              "permission": {
                "enum": [
                  "public",
                  "readonly",
                  "private"
                ],
                "type": "string",
                "description": "Filter by access permission level"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "upload_whatsapp_file_from_url",
          "description": "Upload a file from a remote URL to the WhatsApp platform for use in media messages. The file will be downloaded from the provided URL and stored securely. Returns the uploaded file details including ID for use in message sending.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "maxLength": 1024,
                "minLength": 6,
                "description": "Public URL from which to download file contents"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 10,
                "description": "Optional tags for file categorization"
              },
              "format": {
                "enum": [
                  "gif",
                  "ptt",
                  "native"
                ],
                "type": "string",
                "description": "File presentation format (gif for videos as GIF, ptt for audio as voice note)"
              },
              "filename": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Custom filename for the uploaded file"
              },
              "reference": {
                "type": "string",
                "maxLength": 100,
                "minLength": 2,
                "description": "Optional reference identifier for file tracking"
              },
              "expiration": {
                "enum": [
                  "10m",
                  "30m",
                  "1h",
                  "6h",
                  "12h",
                  "1d",
                  "2d",
                  "3d",
                  "5d",
                  "6d",
                  "7d",
                  "15d",
                  "30d",
                  "60d",
                  "90d",
                  "120d",
                  "180d",
                  "360d",
                  "1y",
                  "2y"
                ],
                "type": "string",
                "description": "File expiration time-to-live"
              },
              "permission": {
                "enum": [
                  "public",
                  "readonly",
                  "private"
                ],
                "type": "string",
                "description": "File access permission level"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_file_details",
          "description": "Get detailed information about a specific uploaded WhatsApp file by ID. Returns complete file metadata including size, type, format, status, expiration, tags, and download URLs.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "fileId"
            ],
            "properties": {
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "update_whatsapp_file_metadata",
          "description": "Update metadata and properties of an uploaded WhatsApp file. You can modify filename, tags, expiration time, access permissions, format, and reference ID to better organize and manage your files.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "fileId"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 1
                },
                "maxItems": 10,
                "minItems": 1,
                "description": "New tags for the file"
              },
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              },
              "format": {
                "enum": [
                  "gif",
                  "ptt",
                  "native"
                ],
                "type": "string",
                "description": "New file presentation format"
              },
              "message": {
                "type": "string",
                "maxLength": 15000,
                "description": "Default caption text for media messages (images/videos only)"
              },
              "filename": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "New filename for the file"
              },
              "reference": {
                "type": "string",
                "maxLength": 150,
                "minLength": 2,
                "description": "New reference identifier"
              },
              "expiration": {
                "enum": [
                  "10m",
                  "30m",
                  "1h",
                  "6h",
                  "12h",
                  "1d",
                  "2d",
                  "3d",
                  "5d",
                  "6d",
                  "7d",
                  "15d",
                  "30d",
                  "60d",
                  "90d",
                  "120d",
                  "180d",
                  "360d",
                  "1y",
                  "2y"
                ],
                "type": "string",
                "description": "New expiration time-to-live"
              },
              "permission": {
                "enum": [
                  "public",
                  "readonly",
                  "private"
                ],
                "type": "string",
                "description": "New access permission level"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "delete_whatsapp_file",
          "description": "Delete an uploaded WhatsApp file permanently. This action cannot be undone and will remove the file from storage. The file will no longer be available for sending in messages.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "fileId"
            ],
            "properties": {
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "download_whatsapp_file",
          "description": "Download the content of an uploaded WhatsApp file. Returns the file content in the specified format: URL only (default) or base64 encoded content.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "fileId"
            ],
            "properties": {
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              },
              "outputFormat": {
                "enum": [
                  "url",
                  "base64"
                ],
                "type": "string",
                "default": "url",
                "description": "Download format: url (download URL only) or base64 (encoded file content)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "search_whatsapp_chat_files",
          "description": "Search and list received files from WhatsApp chats (inbound files). These are media files that were sent to your WhatsApp number by other users. Supports filtering by chat, file type, date range, and more.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device"
            ],
            "properties": {
              "chat": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by specific chat IDs"
              },
              "flow": {
                "enum": [
                  "in",
                  "out",
                  "inbound",
                  "outbound"
                ],
                "type": "string",
                "description": "Filter by message flow direction"
              },
              "page": {
                "type": "integer",
                "default": 0,
                "maximum": 100,
                "minimum": 0,
                "description": "Page number for pagination (0-based)"
              },
              "size": {
                "type": "integer",
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "description": "Number of files to return per page"
              },
              "sort": {
                "enum": [
                  "date:desc",
                  "date:asc",
                  "size:desc",
                  "size:asc"
                ],
                "type": "string",
                "default": "date:desc",
                "description": "Sort order for results"
              },
              "type": {
                "type": "array",
                "items": {
                  "enum": [
                    "image",
                    "video",
                    "audio",
                    "document",
                    "ptt",
                    "sticker"
                  ],
                  "type": "string"
                },
                "description": "Filter by file media types"
              },
              "after": {
                "type": "string",
                "format": "date-time",
                "description": "Filter files received after this date (ISO 8601 format)"
              },
              "before": {
                "type": "string",
                "format": "date-time",
                "description": "Filter files received before this date (ISO 8601 format)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "search": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Search files by filename or content"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "get_whatsapp_chat_file_details",
          "description": "Get detailed information about a specific received file from a WhatsApp chat by ID. Returns complete file metadata including sender information, chat context, media details, and download URLs.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "fileId"
            ],
            "properties": {
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "download_whatsapp_chat_file",
          "description": "Download the content of a received file from a WhatsApp chat. Returns the file content in the specified format: URL only (default) or base64 encoded content.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "fileId"
            ],
            "properties": {
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fileId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "File ID (24 character hexadecimal string)"
              },
              "outputFormat": {
                "enum": [
                  "url",
                  "base64"
                ],
                "type": "string",
                "default": "url",
                "description": "Download format: url (download URL only) or base64 (encoded file content)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_groups",
          "description": "Universal WhatsApp group management tool that handles all group operations through action-based parameters. Supports search, create, update, join, leave, and invite management operations. Perfect for comprehensive WhatsApp group administration.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "Group invitation URL (for join action)"
              },
              "code": {
                "type": "string",
                "maxLength": 100,
                "minLength": 10,
                "description": "Group invitation code (for join action)"
              },
              "kind": {
                "type": "array",
                "items": {
                  "enum": [
                    "group",
                    "broadcast",
                    "community",
                    "channel"
                  ],
                  "type": "string",
                  "description": "Group chat type filter"
                },
                "description": "Filter groups by type (for search action)"
              },
              "name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Group name (required for create action)"
              },
              "page": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Results page number (for search action)"
              },
              "size": {
                "type": "number",
                "default": 100,
                "maximum": 500,
                "minimum": 1,
                "description": "Results page size (for search action)"
              },
              "sort": {
                "type": "string",
                "description": "Sort field and order (for search action)"
              },
              "action": {
                "enum": [
                  "search",
                  "get",
                  "create",
                  "update",
                  "join",
                  "leave",
                  "get_invite",
                  "revoke_invite"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp groups"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "remove": {
                "type": "boolean",
                "default": true,
                "description": "Remove group from chat list after leaving (for leave action)"
              },
              "search": {
                "type": "string",
                "maxLength": 150,
                "description": "Search groups by name or description (for search action)"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "active",
                    "archived",
                    "muted"
                  ],
                  "type": "string"
                },
                "description": "Filter groups by status (for search action)"
              },
              "groupId": {
                "type": "string",
                "maxLength": 50,
                "minLength": 10,
                "description": "WhatsApp group ID (required for get, update, leave, get_invite, revoke_invite actions)"
              },
              "include": {
                "type": "array",
                "items": {
                  "enum": [
                    "participants",
                    "metadata",
                    "lastMessage",
                    "pendingMembers"
                  ],
                  "type": "string"
                },
                "description": "Include additional data in response"
              },
              "ephemeral": {
                "enum": [
                  "off",
                  "24h",
                  "7d",
                  "90d"
                ],
                "type": "string",
                "description": "Ephemeral messages duration (for create/update actions)"
              },
              "description": {
                "type": "string",
                "maxLength": 500,
                "description": "Group description (for create/update actions)"
              },
              "permissions": {
                "type": "object",
                "properties": {
                  "edit": {
                    "enum": [
                      "all",
                      "admins"
                    ],
                    "type": "string",
                    "description": "Group settings edit permissions"
                  },
                  "send": {
                    "$ref": "#/properties/permissions/properties/edit",
                    "description": "Group message publication permissions"
                  },
                  "invite": {
                    "$ref": "#/properties/permissions/properties/edit",
                    "description": "Group invite new participants permissions"
                  },
                  "approval": {
                    "type": "boolean",
                    "description": "Group new participant approval required by administrators"
                  }
                },
                "description": "Group permissions and settings (for create/update actions)",
                "additionalProperties": false
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "phone"
                  ],
                  "properties": {
                    "admin": {
                      "type": "boolean",
                      "default": false,
                      "description": "Whether this participant should be added as a group admin"
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 20,
                      "minLength": 8,
                      "description": "Phone number in E.164 format (e.g., +1234567890)"
                    }
                  },
                  "additionalProperties": false
                },
                "description": "Group participants (required for create action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_group_participants",
          "description": "Universal WhatsApp group participants management tool that handles all participant operations through action-based parameters. Supports add, remove, promote, demote, and approval management operations. Essential for WhatsApp group moderation.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "groupId",
              "action"
            ],
            "properties": {
              "all": {
                "type": "boolean",
                "description": "Apply action to all participants/pending members (for remove, approve, reject actions)"
              },
              "action": {
                "enum": [
                  "add",
                  "remove",
                  "promote",
                  "demote",
                  "get_pending",
                  "approve",
                  "reject"
                ],
                "type": "string",
                "description": "Action to perform on group participants"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/participants/items/properties/phone"
                },
                "description": "Phone numbers of participants (for remove, promote, demote, approve, reject actions)"
              },
              "groupId": {
                "type": "string",
                "maxLength": 50,
                "minLength": 10,
                "description": "WhatsApp group ID"
              },
              "participants": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "phone"
                  ],
                  "properties": {
                    "admin": {
                      "type": "boolean",
                      "default": false,
                      "description": "Whether this participant should be added as a group admin"
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 20,
                      "minLength": 8,
                      "description": "Phone number in E.164 format (e.g., +1234567890)"
                    }
                  },
                  "additionalProperties": false
                },
                "description": "Participants to add with admin status (for add action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_channels",
          "description": "Comprehensive WhatsApp channel management tool supporting all channel operations. Perfect for managing channel lifecycle, membership, and content. Supports all WhatsApp channel operations through a unified action-based interface.\n\nAvailable actions:\n- list: List and retrieve channels with filtering options\n- get: Get detailed information about a specific channel\n- create: Create new channels with optional profile images\n- update: Update existing channel information (name, description)\n- search: Search for public channels by category and keywords\n- join: Join/follow channels via invite code or URL\n- leave: Leave/unfollow channels\n- delete: Delete channels (alias for leave)\n- update_image: Update channel profile images",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Channel name (required for create, optional for update)"
              },
              "page": {
                "type": "number",
                "minimum": 0,
                "description": "Page number for pagination (0-based)"
              },
              "sort": {
                "type": "string",
                "description": "Sort field and order (e.g., \"-createdAt\", \"name\")"
              },
              "limit": {
                "type": "number",
                "maximum": 250,
                "minimum": 1,
                "description": "Number of results to retrieve (max 250)"
              },
              "action": {
                "enum": [
                  "list",
                  "get",
                  "create",
                  "update",
                  "search",
                  "join",
                  "leave",
                  "delete",
                  "update_image"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp channels"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "include": {
                "type": "array",
                "items": {
                  "enum": [
                    "contact",
                    "chat",
                    "stats"
                  ],
                  "type": "string"
                },
                "description": "Include related entities in response"
              },
              "category": {
                "enum": [
                  "recommended",
                  "trending",
                  "popular",
                  "new",
                  "featured"
                ],
                "type": "string",
                "description": "Category of channels to search for (for search action)"
              },
              "imageUrl": {
                "type": "string",
                "format": "uri",
                "description": "URL of image to use as channel profile picture (JPG or PNG, max 1MB)"
              },
              "channelId": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp channel ID (required for get, update, leave, delete, update_image actions)"
              },
              "countries": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 2,
                  "minLength": 2
                },
                "description": "Country codes to filter channels by (e.g., [\"US\", \"GB\"])"
              },
              "imageData": {
                "type": "string",
                "description": "Base64-encoded image data (JPG or PNG, max 1MB)"
              },
              "inviteUrl": {
                "type": "string",
                "format": "uri",
                "description": "Channel invitation URL (required if joinMethod is \"url\")"
              },
              "sortField": {
                "enum": [
                  "creation_time",
                  "subscribers"
                ],
                "type": "string",
                "description": "Field to sort search results by"
              },
              "sortOrder": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order for search results"
              },
              "inviteCode": {
                "type": "string",
                "description": "Channel invitation code (required if joinMethod is \"code\")"
              },
              "joinMethod": {
                "enum": [
                  "code",
                  "url"
                ],
                "type": "string",
                "description": "Method to join the channel (for join action)"
              },
              "permission": {
                "enum": [
                  "admin",
                  "subscriber",
                  "owner"
                ],
                "type": "string",
                "description": "Filter channels by permission type (for list action)"
              },
              "description": {
                "type": "string",
                "maxLength": 2048,
                "description": "Channel description (up to 2048 characters)"
              },
              "imageSource": {
                "enum": [
                  "url",
                  "base64"
                ],
                "type": "string",
                "description": "Source type for channel image"
              },
              "searchQuery": {
                "type": "string",
                "maxLength": 200,
                "description": "Text to search for in channel names and descriptions (for search action)"
              },
              "uploadImage": {
                "type": "boolean",
                "description": "Whether to upload a profile image (for create action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_channel_messages",
          "description": "Comprehensive WhatsApp channel message management tool for retrieving and managing channel content. Perfect for monitoring channel activity and accessing channel message history.\n\nAvailable actions:\n- get: Get recent messages from a specific channel with filtering options",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action",
              "channelId"
            ],
            "properties": {
              "page": {
                "type": "number",
                "minimum": 0,
                "description": "Page number for pagination (0-based)"
              },
              "limit": {
                "type": "number",
                "maximum": 100,
                "minimum": 1,
                "description": "Number of recent messages to retrieve (max 100)"
              },
              "action": {
                "enum": [
                  "get"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp channel messages"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "Get messages up to this date"
              },
              "fromDate": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Get messages from this date onwards"
              },
              "channelId": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp channel ID to get messages from"
              },
              "sortOrder": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order by timestamp"
              },
              "includeMedia": {
                "type": "boolean",
                "description": "Include media message details"
              },
              "messageTypes": {
                "type": "array",
                "items": {
                  "enum": [
                    "text",
                    "image",
                    "video",
                    "audio",
                    "document",
                    "location",
                    "contact",
                    "poll",
                    "event",
                    "sticker",
                    "reaction",
                    "system"
                  ],
                  "type": "string"
                },
                "description": "Filter by specific message types"
              },
              "includeDeleted": {
                "type": "boolean",
                "description": "Include deleted messages in results"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_labels",
          "description": "Comprehensive WhatsApp label management tool supporting all label operations. Perfect for organizing conversations with color-coded categories and managing chat organization systems. Supports both WhatsApp Business and platform-specific labels.\n\nAvailable actions:\n- list: Retrieve all available labels with filtering and metadata\n- create: Create new labels with custom colors and descriptions\n- update: Update existing label colors and descriptions\n- delete: Remove labels and cleanup associated chats",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 30,
                "minLength": 1,
                "description": "Label name (required for create, update, delete actions)"
              },
              "color": {
                "enum": [
                  "ruby",
                  "tomato",
                  "orange",
                  "sunflower",
                  "bubble",
                  "rose",
                  "poppy",
                  "rouge",
                  "raspberry",
                  "purple",
                  "lavender",
                  "violet",
                  "pool",
                  "emerald",
                  "kelly",
                  "apple",
                  "turquoise",
                  "aqua",
                  "gold",
                  "latte",
                  "cocoa",
                  "iron"
                ],
                "type": "string",
                "description": "Label color from predefined palette (required for create, optional for update)"
              },
              "action": {
                "enum": [
                  "list",
                  "create",
                  "update",
                  "delete"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp labels"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "activeOnly": {
                "type": "boolean",
                "description": "Only return active labels (for list action)"
              },
              "description": {
                "type": "string",
                "maxLength": 100,
                "minLength": 2,
                "description": "Label description (optional for create, required for update)"
              },
              "filterByScope": {
                "enum": [
                  "chat",
                  "wa"
                ],
                "type": "string",
                "description": "Filter labels by scope for list action"
              },
              "confirmDeletion": {
                "type": "boolean",
                "description": "Confirm label deletion and removal from all chats/contacts (required for delete action)"
              },
              "includeMetadata": {
                "type": "boolean",
                "description": "Include additional label metadata like scope and active status"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_contacts",
          "description": "Comprehensive WhatsApp contacts management with action-based operations. Supports listing, searching, creating, updating, deleting contacts, bulk operations, and metadata management. All contact operations including CRUD, filtering, pagination, and metadata handling in one unified tool.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "device"
            ],
            "properties": {
              "crm": {
                "type": "string",
                "maxLength": 50,
                "description": "CRM system name (for create, update actions)"
              },
              "wid": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/contactWid"
                },
                "description": "Filter contacts by WhatsApp IDs (for list action)"
              },
              "city": {
                "type": "string",
                "maxLength": 30,
                "description": "Contact city (for create, update actions)"
              },
              "kind": {
                "enum": [
                  "personal",
                  "business",
                  "private"
                ],
                "type": "string",
                "description": "Contact category (for create, update actions)"
              },
              "name": {
                "type": "string",
                "maxLength": 30,
                "description": "Contact first name (for create, update actions)"
              },
              "page": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Page number for pagination (0-based, for list action)"
              },
              "sort": {
                "type": "string",
                "description": "Sort field and order (e.g., \"-createdAt\", \"name\", for list action)"
              },
              "type": {
                "type": "array",
                "items": {
                  "enum": [
                    "personal",
                    "business",
                    "user",
                    "group",
                    "channel",
                    "private"
                  ],
                  "type": "string",
                  "description": "Contact type filter"
                },
                "description": "Filter contacts by type (for list action)"
              },
              "after": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?$",
                "description": "Filter contacts created after this date (for list action)"
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 100,
                "description": "Contact email address (for create, update actions)"
              },
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 200,
                "minimum": 1,
                "description": "Number of contacts to retrieve (max 200, for list action)"
              },
              "notes": {
                "type": "string",
                "maxLength": 3000,
                "description": "Private notes about the contact (for create, update actions)"
              },
              "owner": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9A-Fa-f]{24}$",
                  "maxLength": 24,
                  "minLength": 24,
                  "description": "Agent ID (24 character hex string)"
                },
                "description": "Filter contacts assigned to specific agents (for list action)"
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 20,
                    "minLength": 8,
                    "description": "Phone number in E.164 format (e.g., +1234567890)"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/properties/phone/anyOf/0"
                    }
                  }
                ],
                "description": "Phone number for create action, or array of phone numbers for list filtering"
              },
              "title": {
                "type": "string",
                "maxLength": 15,
                "description": "Contact title (Mr., Mrs., Dr., etc., for create, update actions)"
              },
              "action": {
                "enum": [
                  "list",
                  "get",
                  "create",
                  "update",
                  "delete",
                  "bulk_create",
                  "update_metadata",
                  "upsert_metadata"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp contacts"
              },
              "assign": {
                "$ref": "#/properties/owner/items",
                "description": "Assign contact to specific agent (for create action)"
              },
              "before": {
                "$ref": "#/properties/after",
                "description": "Filter contacts created before this date (for list action)"
              },
              "crmRef": {
                "type": "string",
                "maxLength": 500,
                "description": "CRM reference ID or URL (for create, update actions)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 40,
                "description": "Explicit dot-path allowlist, e.g. ['wid','phone','info.email']. Overrides verbosity when set."
              },
              "gender": {
                "enum": [
                  "male",
                  "female",
                  "other"
                ],
                "type": "string",
                "description": "Contact gender (for create, update actions)"
              },
              "search": {
                "type": "string",
                "maxLength": 150,
                "description": "Search contacts by name, surname, phone, email, company, address, or notes (for list action)"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "active",
                    "blocked"
                  ],
                  "type": "string",
                  "description": "Contact status"
                },
                "description": "Filter contacts by status (for list action)"
              },
              "upsert": {
                "type": "boolean",
                "default": false,
                "description": "Update the contact if it already exists instead of failing with 409 (for create and bulk_create actions)"
              },
              "address": {
                "type": "string",
                "maxLength": 100,
                "description": "Contact address (for create, update actions)"
              },
              "country": {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "description": "Contact country 2-letter ISO code (for create, update actions)"
              },
              "include": {
                "type": "array",
                "items": {
                  "enum": [
                    "chat"
                  ],
                  "type": "string"
                },
                "description": "Include related entities in response"
              },
              "surname": {
                "type": "string",
                "maxLength": 50,
                "description": "Contact surname/last name (for create, update actions)"
              },
              "altPhone": {
                "$ref": "#/properties/phone/anyOf/0",
                "description": "Alternative phone number (for create, update actions)"
              },
              "birthday": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                "description": "Contact birthday in YYYY-MM-DD format (for create, update actions)"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "phone"
                  ],
                  "properties": {
                    "kind": {
                      "$ref": "#/properties/kind",
                      "description": "Contact kind/category"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 30
                    },
                    "email": {
                      "type": "string",
                      "format": "email",
                      "maxLength": 100
                    },
                    "phone": {
                      "$ref": "#/properties/phone/anyOf/0"
                    },
                    "assign": {
                      "$ref": "#/properties/owner/items",
                      "description": "Agent ID (24 character hex string)"
                    },
                    "upsert": {
                      "type": "boolean",
                      "default": false
                    },
                    "surname": {
                      "type": "string",
                      "maxLength": 50
                    },
                    "metadata": {
                      "type": "array",
                      "items": {
                        "$ref": "#/properties/metadata/items"
                      },
                      "maxItems": 30
                    },
                    "companyName": {
                      "type": "string",
                      "maxLength": 50
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 1000,
                "minItems": 1,
                "description": "Array of contacts to create (max 1000, for bulk_create action)"
              },
              "currency": {
                "type": "string",
                "maxLength": 3,
                "minLength": 3,
                "description": "Contact currency 3-letter ISO code (for create, update actions)"
              },
              "metadata": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "value"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[a-zA-Z0-9_]+$",
                      "maxLength": 30,
                      "minLength": 1,
                      "description": "Metadata key (alphanumeric and underscore characters only)"
                    },
                    "value": {
                      "type": "string",
                      "maxLength": 300,
                      "description": "Metadata value (up to 300 characters)"
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 30,
                "description": "Contact metadata key-value pairs (for create, update, update_metadata, upsert_metadata actions)"
              },
              "timezone": {
                "type": "string",
                "maxLength": 40,
                "description": "Contact timezone (for create, update actions)"
              },
              "verbosity": {
                "enum": [
                  "summary",
                  "standard",
                  "full"
                ],
                "type": "string",
                "default": "summary",
                "description": "Response detail level for list/get: summary = curated high-signal fields (default, token-lean); standard = broader set; full = complete contact objects (escape hatch)."
              },
              "contactWid": {
                "type": "string",
                "maxLength": 40,
                "minLength": 6,
                "description": "WhatsApp contact ID (required for get, update, delete, update_metadata, upsert_metadata actions)"
              },
              "postalCode": {
                "type": "string",
                "maxLength": 20,
                "description": "Contact postal code (for create, update actions)"
              },
              "companyCode": {
                "type": "string",
                "maxLength": 50,
                "description": "Company code (for create, update actions)"
              },
              "companyName": {
                "type": "string",
                "maxLength": 50,
                "description": "Company name (for create, update actions)"
              },
              "companyRole": {
                "type": "string",
                "maxLength": 30,
                "description": "Contact role in company (for create, update actions)"
              },
              "description": {
                "type": "string",
                "maxLength": 100,
                "description": "Contact description (for create, update actions)"
              },
              "metadataKey": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 30,
                  "minLength": 1
                },
                "description": "Filter contacts with specific metadata keys (for list action)"
              },
              "companyEmail": {
                "type": "string",
                "format": "email",
                "maxLength": 100,
                "description": "Company email (for create, update actions)"
              },
              "companyPhone": {
                "$ref": "#/properties/phone/anyOf/0",
                "description": "Company phone number (for create, update actions)"
              },
              "companyTaxId": {
                "type": "string",
                "maxLength": 30,
                "description": "Company tax ID (for create, update actions)"
              },
              "removeFields": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Fields to remove/clear from contact (for update action)"
              },
              "updatedAfter": {
                "$ref": "#/properties/after",
                "description": "Filter contacts updated after this date (for list action)"
              },
              "metadataValue": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 300,
                  "minLength": 1
                },
                "description": "Filter contacts with specific metadata values (for list action)"
              },
              "updatedBefore": {
                "$ref": "#/properties/after",
                "description": "Filter contacts updated before this date (for list action)"
              },
              "companyCountry": {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "description": "Company country 2-letter ISO code (for create, update actions)"
              },
              "companyWebsite": {
                "type": "string",
                "format": "uri",
                "maxLength": 100,
                "description": "Company website (for create, update actions)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_contact_actions",
          "description": "Manage WhatsApp contact blocking and unblocking operations. Handle contact blocking status with action-based operations to control message reception from specific contacts. Contacts are identified by phone number in E.164 format, not by WhatsApp ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action",
              "device",
              "contacts"
            ],
            "properties": {
              "action": {
                "enum": [
                  "block",
                  "unblock"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp contact blocking/unblocking"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 16,
                  "minLength": 8,
                  "description": "Phone number in E.164 format (e.g., +1234567890)"
                },
                "maxItems": 50,
                "minItems": 1,
                "description": "Array of contact phone numbers in E.164 format to block or unblock (max 50)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_status",
          "description": "Comprehensive WhatsApp status management tool supporting all status operations. Perfect for managing status lifecycle, publishing immediate or scheduled content, and retrieving status history. Supports all WhatsApp status operations through a unified action-based interface.\n\nAvailable actions:\n- get: Search and retrieve status history with comprehensive filtering\n- publish: Publish immediate status updates with text, images, or videos\n- schedule: Schedule status updates for future publishing with advanced timing",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "ack": {
                "type": "array",
                "items": {
                  "enum": [
                    "pending",
                    "sent",
                    "delivered",
                    "read",
                    "failed"
                  ],
                  "type": "string",
                  "description": "Message delivery status"
                },
                "description": "Filter by delivery status (for get action)"
              },
              "wid": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by specific WhatsApp message IDs (for get action)"
              },
              "chat": {
                "type": "string",
                "description": "Filter status by specific chat WhatsApp ID (for get action)"
              },
              "flow": {
                "enum": [
                  "inbound",
                  "outbound"
                ],
                "type": "string",
                "description": "Filter by message direction (for get action)"
              },
              "font": {
                "enum": [
                  "helvetica",
                  "serif",
                  "norican"
                ],
                "type": "string",
                "description": "Font style for text status (for publish/schedule actions)"
              },
              "mine": {
                "type": "boolean",
                "description": "Return only status published by your own WhatsApp number (for get action)"
              },
              "page": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Page number for pagination (for get action)"
              },
              "type": {
                "type": "array",
                "items": {
                  "enum": [
                    "text",
                    "image",
                    "video"
                  ],
                  "type": "string",
                  "description": "Type of status content"
                },
                "description": "Filter by status content types (for get action)"
              },
              "color": {
                "enum": [
                  "red_purple",
                  "moss_green",
                  "dark_khaki",
                  "wine_red",
                  "light_taupe",
                  "goldenrod",
                  "olive_green",
                  "light_plum",
                  "dark_purple",
                  "light_coral",
                  "medium_sea_green",
                  "salmon",
                  "sky_blue",
                  "light_sky_blue",
                  "dark_taupe",
                  "slate_gray",
                  "dodger_blue",
                  "dark_magenta",
                  "seafoam_green",
                  "charcoal",
                  "periwinkle"
                ],
                "type": "string",
                "description": "Background color for text status (for publish/schedule actions)"
              },
              "delay": {
                "type": "number",
                "maximum": 2592000,
                "minimum": 60,
                "description": "Delay in seconds (for schedule action with scheduleType: delay)"
              },
              "limit": {
                "type": "number",
                "default": 20,
                "maximum": 100,
                "minimum": 1,
                "description": "Maximum number of status entries to retrieve (for get action)"
              },
              "media": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL of media file to upload"
                  },
                  "file": {
                    "type": "string",
                    "description": "Previously uploaded file ID"
                  },
                  "format": {
                    "enum": [
                      "native",
                      "gif",
                      "ptt"
                    ],
                    "type": "string",
                    "description": "Media format type"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 650,
                    "description": "Caption for media file"
                  },
                  "filename": {
                    "type": "string",
                    "description": "Custom filename for media file"
                  }
                },
                "description": "Media content (image/video) for status update (for publish/schedule actions)",
                "additionalProperties": false
              },
              "order": {
                "type": "boolean",
                "default": false,
                "description": "Enforce strict publication order for scheduled status (for publish action)"
              },
              "phone": {
                "type": "string",
                "maxLength": 15,
                "minLength": 10,
                "description": "Filter status from specific phone number or WhatsApp ID (for get action)"
              },
              "action": {
                "enum": [
                  "get",
                  "publish",
                  "schedule"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp status"
              },
              "device": {
                "type": "string",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID (24-character hex string)"
              },
              "search": {
                "type": "string",
                "description": "Search status by text content, contact name, or media filename (for get action)"
              },
              "toDate": {
                "$ref": "#/properties/fromDate",
                "description": "Get status published up to this date (for get action)"
              },
              "delayTo": {
                "enum": [
                  "15m",
                  "30m",
                  "1h",
                  "2h",
                  "6h",
                  "12h",
                  "1d",
                  "2d",
                  "3d",
                  "1w"
                ],
                "type": "string",
                "description": "Time notation delay (for schedule action with scheduleType: delayTo)"
              },
              "message": {
                "type": "string",
                "maxLength": 650,
                "description": "Text content for status update (required for text status in publish/schedule actions)"
              },
              "fromDate": {
                "type": "string",
                "format": "date-time",
                "description": "Get status published from this date onwards (for get action)"
              },
              "schedule": {
                "type": "object",
                "properties": {
                  "date": {
                    "$ref": "#/properties/fromDate",
                    "description": "Specific date and time to publish"
                  },
                  "delay": {
                    "type": "number",
                    "maximum": 2592000,
                    "minimum": 60,
                    "description": "Delay in seconds (1 minute to 30 days)"
                  },
                  "delayTo": {
                    "enum": [
                      "15m",
                      "30m",
                      "1h",
                      "2h",
                      "6h",
                      "12h",
                      "1d",
                      "2d",
                      "3d",
                      "1w"
                    ],
                    "type": "string",
                    "description": "Delay using time notation"
                  }
                },
                "description": "Schedule options for delayed publishing (for publish action)",
                "additionalProperties": false
              },
              "timezone": {
                "type": "string",
                "description": "Timezone for date scheduling (for schedule action)"
              },
              "reference": {
                "type": "string",
                "maxLength": 150,
                "description": "Filter by custom reference field or set reference for publish/schedule"
              },
              "scheduled": {
                "type": "boolean",
                "description": "Return only scheduled status to be published in the future (for get action)"
              },
              "sortOrder": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order by creation date (for get action)"
              },
              "publishDate": {
                "$ref": "#/properties/fromDate",
                "description": "Specific publish date and time (for schedule action with scheduleType: date)"
              },
              "strictOrder": {
                "type": "boolean",
                "default": false,
                "description": "Enforce strict publication order (for schedule action)"
              },
              "scheduleType": {
                "enum": [
                  "delay",
                  "delayTo",
                  "date"
                ],
                "type": "string",
                "description": "Type of scheduling method (required for schedule action)"
              },
              "idempotencyKey": {
                "type": "string",
                "description": "Unique key to prevent duplicate status publishing (for publish action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_departments",
          "description": "Comprehensive WhatsApp department management tool supporting all department operations. Perfect for organizing team structure, managing agent assignments, and customizing department appearance. Supports all WhatsApp department operations through a unified action-based interface.\n\nAvailable actions:\n- list: List and retrieve all departments with complete information\n- create: Create new departments with agents, colors, and icons\n- update: Update existing department information and agent assignments\n- delete: Delete departments (removes department but preserves agent assignments)",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action"
            ],
            "properties": {
              "icon": {
                "enum": [
                  "briefcase",
                  "users",
                  "user-tie",
                  "chart-bar",
                  "clipboard-list",
                  "comments",
                  "headset",
                  "user-cog",
                  "user-edit",
                  "user-friends",
                  "laptop-code",
                  "network-wired",
                  "building",
                  "handshake",
                  "address-book",
                  "layer-group",
                  "project-diagram",
                  "calendar-check",
                  "clipboard-check",
                  "tasks",
                  "chart-pie",
                  "hands-helping",
                  "user-shield",
                  "user-secret",
                  "user-graduate",
                  "landmark",
                  "archive"
                ],
                "type": "string",
                "description": "Department icon identifier"
              },
              "name": {
                "type": "string",
                "maxLength": 25,
                "minLength": 2,
                "description": "Department name (required for create, optional for update)"
              },
              "color": {
                "enum": [
                  "ruby",
                  "tomato",
                  "orange",
                  "sunflower",
                  "bubble",
                  "rose",
                  "poppy",
                  "rouge",
                  "raspberry",
                  "purple",
                  "lavender",
                  "violet",
                  "pool",
                  "emerald",
                  "kelly",
                  "apple",
                  "turquoise",
                  "aqua",
                  "gold",
                  "latte",
                  "cocoa",
                  "iron"
                ],
                "type": "string",
                "description": "Department color for visual identification"
              },
              "action": {
                "enum": [
                  "list",
                  "create",
                  "update",
                  "delete"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp departments"
              },
              "agents": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9A-Fa-f]{24}$",
                  "maxLength": 24,
                  "minLength": 24,
                  "description": "Agent ID (24 character hex string)"
                },
                "maxItems": 30,
                "minItems": 1,
                "description": "Array of agent IDs to include in the department (required for create, optional for update)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "description": {
                "type": "string",
                "maxLength": 300,
                "description": "Department description (max 300 characters)"
              },
              "departmentId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Department ID (required for update, delete actions)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_campaigns",
          "description": "Universal WhatsApp campaign management tool that handles all campaign operations through action-based parameters. Supports search, create, update, start, stop, and delete operations for WhatsApp bulk messaging campaigns. Perfect for comprehensive WhatsApp marketing automation.\n\nWhat a campaign sends depends on the number. Its connector, reported by get_whatsapp_devices and health_check, says which kind it is: cloud for WhatsApp Cloud API, web for a number linked by QR.\n- WhatsApp Cloud API (WABA) numbers: a pre-approved template is required, and it only reaches phone numbers, never groups. Pass template { name, language } and give each recipient the values its variables need. Read the template first with list_whatsapp_templates: every variable it reports has a location (header, body or buttons) and, for buttons, a buttonIndex starting at 0. Send each value with its component, and for a button variable use button_url_N or button_copy_code_N with that index.\n- Numbers linked by QR: a message, optionally with a file. Personalize it with placeholders: {{ name }} is the recipient's name, {{ phone }} their number, and each key in a recipient's variables fills {{ key }}. For example message \"Hi {{ name }}, your order {{ order }} has shipped\" with variables [{ key: \"order\", value: \"A-1043\" }]. Write keys and placeholders in lowercase. A placeholder a recipient has no value for disappears from their message; {{ order | on its way }} prints the text after the bar instead.\n\nTo send it: create with activate true, which needs settings.date and at least one recipient, or create first and then start, which asks for the same two. If activation fails during create, the campaign is deleted and you have to create it again.\n\nRecipients: pass them on create, up to 2000 per request. To add or remove them afterwards use manage_whatsapp_campaign_contacts. The total a campaign can hold depends on the plan, from 100 on trial to 2000.\n\nWhat it will cost: before launching a template campaign, estimate_cost gives the price Meta lists per message for each country, in costs: one line per country (or dialling code) with the category of the template and how many messages go there.\n\nPayment problems: when Meta reports one on a Cloud API number's WhatsApp Business account, the templates it sends are rejected (error 131042). A Cloud API number that needs reconnecting stops the same way, because its messages fail until it is reconnected. The three ways to send a campaign (create with activate true, update with activate true, and the start action) then refuse, say why and write nothing. Tell the user, and only repeat the call with confirmPaymentIssue true if they say the payment is already fixed or want to send anyway.\n\nThings that do not undo: delete removes a campaign for good, and stop does not recall messages already handed to WhatsApp.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "file": {
                "type": "string",
                "pattern": "^[0-9a-fA-F]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Uploaded file ID. On a template campaign this is the header media, and only for a template whose header is an image, video or document: on a template without a media header the API sends a header the template does not have and Meta rejects it. Upload the file first with upload_whatsapp_file_from_url"
              },
              "form": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^[0-9a-fA-F]{24}$",
                        "maxLength": 24,
                        "minLength": 24
                      },
                      {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-fA-F]{24}$",
                            "maxLength": 24,
                            "minLength": 24,
                            "description": "Web form ID"
                          },
                          "expiresIn": {
                            "type": "string",
                            "pattern": "^\\d{1,4}[hd]$",
                            "description": "How long each link stays open once sent, 1 hour to 90 days"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Only where web forms are enabled for the account: a published web form sent to every recipient, each with a link of their own minted when their message goes out. On numbers linked by QR the link replaces {{form.url}} in message, or is added at its end. On WhatsApp Cloud API numbers the template must have a form link button. Individual recipients only. null removes it (update)"
              },
              "name": {
                "type": "string",
                "maxLength": 50,
                "minLength": 1,
                "description": "Campaign name (required for create action)"
              },
              "page": {
                "type": "number",
                "default": 0,
                "maximum": 100,
                "minimum": 0,
                "description": "Results page number (for search action)"
              },
              "size": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Results page size (for search action, max 100)"
              },
              "after": {
                "type": "string",
                "format": "date-time",
                "description": "Filter campaigns created after this date (for search action)"
              },
              "costs": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "category",
                    "quantity"
                  ],
                  "properties": {
                    "country": {
                      "type": "string",
                      "pattern": "^[A-Za-z]{2}$",
                      "description": "Two-letter country code of the recipients, e.g. MX"
                    },
                    "category": {
                      "enum": [
                        "marketing",
                        "utility",
                        "authentication",
                        "authenticationInternational",
                        "service"
                      ],
                      "type": "string",
                      "description": "Category of the template, the one list_whatsapp_templates reports, in lowercase"
                    },
                    "quantity": {
                      "type": "integer",
                      "maximum": 10000000,
                      "minimum": 1,
                      "description": "Number of messages"
                    },
                    "phonePrefix": {
                      "type": "integer",
                      "maximum": 999,
                      "minimum": 1,
                      "description": "International dialling code of the recipients instead of the country, e.g. 52 for Mexico"
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 100,
                "minItems": 1,
                "description": "For estimate_cost: one line per country of the recipients, with the template category and the number of messages. Up to 100 lines"
              },
              "group": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 50,
                  "minLength": 10,
                  "description": "WhatsApp group ID (e.g., 447362053576-1500000000@g.us)"
                },
                "description": "Filter campaigns by group IDs (for search action)"
              },
              "owner": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by owner user IDs (for search action)"
              },
              "phone": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 20,
                  "minLength": 8,
                  "description": "Phone number in E.164 format (e.g., +1234567890)"
                },
                "description": "Filter campaigns by recipient phone numbers (for search action)"
              },
              "action": {
                "enum": [
                  "search",
                  "get",
                  "create",
                  "update",
                  "start",
                  "stop",
                  "delete",
                  "estimate_cost"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp campaigns"
              },
              "before": {
                "type": "string",
                "format": "date-time",
                "description": "Filter campaigns created before this date (for search action)"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID (required for create action)"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "removed",
                    "failed",
                    "archived",
                    "canceled",
                    "incomplete",
                    "draft",
                    "paused",
                    "pending",
                    "processing",
                    "processed"
                  ],
                  "type": "string",
                  "description": "WhatsApp campaign status"
                },
                "description": "Filter campaigns by status (for search action)"
              },
              "message": {
                "type": "string",
                "maxLength": 10000,
                "minLength": 2,
                "description": "Campaign message, for numbers linked by QR. On a WhatsApp Cloud API number use template instead. Personalize it with {{ name }}, {{ phone }} and {{ key }} for each key in the recipients' variables"
              },
              "activate": {
                "type": "boolean",
                "default": false,
                "description": "Start the campaign right after creating it. Needs settings.date and at least one recipient; without them the campaign is created and left as a draft"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/",
                      "maxLength": 2048,
                      "description": "Media file URL for this recipient, for a template whose header is an image, video or PDF. Use it instead of the campaign file to send a different file per recipient"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Contact display name"
                    },
                    "group": {
                      "$ref": "#/properties/group/items",
                      "description": "Group ID for group campaigns"
                    },
                    "phone": {
                      "$ref": "#/properties/phone/items",
                      "description": "Phone number for individual contacts"
                    },
                    "channel": {
                      "type": "string",
                      "maxLength": 50,
                      "minLength": 10,
                      "description": "Channel ID for channel campaigns"
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 10000,
                      "description": "Custom message for this contact (overrides campaign message), with the same {{ }} placeholders. Ignored on template campaigns"
                    },
                    "reference": {
                      "type": "string",
                      "maxLength": 200,
                      "description": "Reference identifier for tracking"
                    },
                    "variables": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "value"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_]+$",
                            "maxLength": 50,
                            "minLength": 1,
                            "description": "Variable key, in lowercase. QR campaigns: the placeholder name in the message, e.g. order for {{ order }}. Template campaigns: the placeholder number or name for body variables (\"1\", \"first_name\"), or header_1, button_url_0, button_copy_code_0. Buttons are numbered from 0"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 500,
                            "minLength": 1,
                            "description": "Variable value"
                          },
                          "component": {
                            "type": "string",
                            "pattern": "^(body|header|header_location|button_url_(0|[1-9]\\d?)|button_copy_code_(0|[1-9]\\d?))$",
                            "description": "Required on template campaigns: the part of the template the value fills (body, header, header_location, button_url_N or button_copy_code_N, N being the buttonIndex from list_whatsapp_templates). Not used on QR campaigns"
                          }
                        },
                        "additionalProperties": false
                      },
                      "maxItems": 30,
                      "description": "Values for this recipient. On a QR campaign each key fills the {{ key }} placeholder of the message. On a template campaign they fill the template variables, each with its component"
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 2000,
                "description": "Campaign recipients, for the create action only. Max 2000 per request, and the total a campaign can hold depends on the plan (100 on trial, 500 to 2000 otherwise). To add or remove recipients later use manage_whatsapp_campaign_contacts"
              },
              "settings": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When to deliver the campaign, ISO 8601. Required to activate it"
                  },
                  "speed": {
                    "enum": [
                      0.025,
                      0.0286,
                      0.0333,
                      0.04,
                      0.05,
                      0.0667,
                      0.1,
                      0.15,
                      0.2,
                      0.3,
                      0.5,
                      1,
                      1.25,
                      1.5,
                      1.75,
                      2,
                      2.5,
                      3,
                      4,
                      5
                    ],
                    "type": "number",
                    "description": "Minutes between two messages, one of the listed values. 5 is the slowest, one message every five minutes; 1 is one a minute; 0.5 about two a minute; 0.2 about four; 0.025 the fastest, about forty a minute on WhatsApp Cloud API numbers. Slower is safer against spam blocks"
                  }
                },
                "description": "Campaign delivery settings (for create/update actions)",
                "additionalProperties": false
              },
              "template": {
                "type": "object",
                "required": [
                  "name",
                  "language"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[a-z0-9_]+$",
                    "maxLength": 512,
                    "minLength": 1,
                    "description": "Approved template name, as listed by list_whatsapp_templates"
                  },
                  "language": {
                    "type": "string",
                    "maxLength": 5,
                    "minLength": 2,
                    "description": "Template language code, e.g. es or en_US. Required: with no language the API picks one of the approved templates with that name on its own"
                  }
                },
                "description": "Pre-approved template to send. Required on WhatsApp Cloud API numbers, and not accepted on numbers linked by QR",
                "additionalProperties": false
              },
              "campaignId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp campaign ID (required for get, update, start, stop, delete actions)"
              },
              "unsubscribe": {
                "type": "object",
                "required": [
                  "active"
                ],
                "properties": {
                  "word": {
                    "type": "string",
                    "default": "stop",
                    "pattern": "^[A-Za-z0-9]+$",
                    "maxLength": 30,
                    "minLength": 2,
                    "description": "Word a recipient replies to opt out"
                  },
                  "active": {
                    "type": "boolean",
                    "description": "Enable opt-out. Turning it off again does not remove it from a campaign that already had it"
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "action",
                        "params"
                      ],
                      "properties": {
                        "action": {
                          "enum": [
                            "message:send",
                            "metadata:add"
                          ],
                          "type": "string",
                          "description": "Action to perform when user unsubscribes"
                        },
                        "params": {
                          "type": "object",
                          "description": "Action parameters",
                          "additionalProperties": {}
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "Actions to perform when user unsubscribes"
                  },
                  "message": {
                    "type": "string",
                    "maxLength": 500,
                    "minLength": 10,
                    "description": "Opt-out line appended to the campaign message, and it must contain the word. Required when active is true. Ignored on template campaigns"
                  }
                },
                "description": "Unsubscribe settings (for create/update actions)",
                "additionalProperties": false
              },
              "confirmPaymentIssue": {
                "type": "boolean",
                "description": "Only after telling the user that Meta reports a payment problem on the number, or that it needs reconnecting: true to activate or start the campaign anyway, because they say it is already fixed or reconnected, or want to send regardless"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_campaign_contacts",
          "description": "Universal WhatsApp campaign contacts management tool that handles all campaign recipient operations through action-based parameters. Supports add, remove, and search operations for campaign recipients: phone numbers and groups. Essential for WhatsApp campaign recipient management.\n\nadd keeps the recipients already on the campaign. On a campaign that sends a template (WhatsApp Cloud API numbers), give every variable its component exactly as on manage_whatsapp_campaigns create: body, header, header_location, button_url_N or button_copy_code_N, with N the buttonIndex that list_whatsapp_templates reports. Such a campaign only reaches phone numbers, not groups. On a campaign from a number linked by QR, each variable key fills the {{ key }} placeholder of the campaign message.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId",
              "action"
            ],
            "properties": {
              "kind": {
                "type": "array",
                "items": {
                  "enum": [
                    "user",
                    "group",
                    "channel"
                  ],
                  "type": "string",
                  "description": "Type of WhatsApp contact (user, group, or channel)"
                },
                "description": "Filter by contact type (for search action)"
              },
              "page": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Results page number (for search action)"
              },
              "size": {
                "type": "number",
                "default": 100,
                "maximum": 1000,
                "minimum": 1,
                "description": "Results page size (for search action)"
              },
              "wids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "WhatsApp message IDs to remove (for remove action)"
              },
              "action": {
                "enum": [
                  "search",
                  "add",
                  "remove"
                ],
                "type": "string",
                "description": "Action to perform on campaign contacts"
              },
              "groups": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/contacts/items/properties/group"
                },
                "description": "Group IDs to remove (for remove action)"
              },
              "phones": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/contacts/items/properties/phone"
                },
                "description": "Phone numbers to remove (for remove action)"
              },
              "search": {
                "type": "string",
                "maxLength": 50,
                "description": "Search contacts by phone number, name, or group ID (for search action)"
              },
              "status": {
                "type": "array",
                "items": {
                  "enum": [
                    "pending",
                    "processing",
                    "delivered",
                    "failed"
                  ],
                  "type": "string"
                },
                "description": "Filter by delivery status (for search action)"
              },
              "target": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by contact target: phone number or group WhatsApp ID (for search action)"
              },
              "channels": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/contacts/items/properties/channel"
                },
                "description": "Channel IDs to remove (for remove action)"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "pattern": "^https?:\\/\\/",
                      "maxLength": 2048,
                      "description": "Media file URL for this recipient, for a template whose header is an image, video or PDF. Use it instead of the campaign file to send a different file per recipient"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 100,
                      "description": "Contact display name"
                    },
                    "group": {
                      "type": "string",
                      "maxLength": 50,
                      "minLength": 10,
                      "description": "Group ID for group campaigns"
                    },
                    "phone": {
                      "type": "string",
                      "maxLength": 20,
                      "minLength": 8,
                      "description": "Phone number for individual contacts"
                    },
                    "channel": {
                      "type": "string",
                      "maxLength": 50,
                      "minLength": 10,
                      "description": "Channel ID for channel campaigns"
                    },
                    "message": {
                      "type": "string",
                      "maxLength": 10000,
                      "description": "Custom message for this contact (overrides campaign message), with the same {{ }} placeholders. Ignored on template campaigns"
                    },
                    "reference": {
                      "type": "string",
                      "maxLength": 200,
                      "description": "Reference identifier for tracking"
                    },
                    "variables": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "key",
                          "value"
                        ],
                        "properties": {
                          "key": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_]+$",
                            "maxLength": 50,
                            "minLength": 1,
                            "description": "Variable key, in lowercase. QR campaigns: the placeholder name in the message, e.g. order for {{ order }}. Template campaigns: the placeholder number or name for body variables (\"1\", \"first_name\"), or header_1, button_url_0, button_copy_code_0. Buttons are numbered from 0"
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 500,
                            "minLength": 1,
                            "description": "Variable value"
                          },
                          "component": {
                            "type": "string",
                            "pattern": "^(body|header|header_location|button_url_(0|[1-9]\\d?)|button_copy_code_(0|[1-9]\\d?))$",
                            "description": "Required on template campaigns: the part of the template the value fills (body, header, header_location, button_url_N or button_copy_code_N, N being the buttonIndex from list_whatsapp_templates). Not used on QR campaigns"
                          }
                        },
                        "additionalProperties": false
                      },
                      "maxItems": 30,
                      "description": "Values for this recipient. On a QR campaign each key fills the {{ key }} placeholder of the message. On a template campaign they fill the template variables, each with its component"
                    }
                  },
                  "additionalProperties": false
                },
                "description": "Contacts to add to campaign (for add action)"
              },
              "campaignId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp campaign ID"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_pipelines",
          "description": "Comprehensive sales pipeline management tool for the WhatsApp sales funnel (CRM). A pipeline is a sales board: an ordered list of stages that deals move through, optionally fed by specific WhatsApp numbers. Use it to set up sales boards, inspect their configuration and read their headline numbers.\n\nAvailable actions:\n- list: Retrieve all sales pipelines of the account, optionally only those fed by one device\n- get: Retrieve a single pipeline with its full stage configuration\n- create: Create a new pipeline with stages, entry rules and behaviour settings\n- update: Update pipeline properties, stages, lost reasons or settings\n- delete: Remove a pipeline (refused with 409 while it still holds open deals)\n- summary: Per-stage deal counts and open amount totals for the board, plus won and lost totals for the last 30 days\n\nStage ordering matters: a pipeline requires at least one open, one won and one lost stage, and the won and lost stages must come AFTER all the open ones, because a deal advances to the next open stage by position. When no stages are supplied on create, a sensible default ladder is seeded.\n\nNote: the sales funnel is available on the Platform Professional subscription and above. Write operations answer 403 on a plan without it, while reads stay available so an account that downgrades keeps access to its funnel data.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "icon": {
                "enum": [
                  "funnel-dollar",
                  "filter",
                  "chart-line",
                  "handshake",
                  "money-bill-wave",
                  "bullseye",
                  "flag-checkered",
                  "coins",
                  "chart-pie",
                  "briefcase"
                ],
                "type": "string",
                "description": "Pipeline icon identifier. Defaults to funnel-dollar"
              },
              "name": {
                "type": "string",
                "maxLength": 30,
                "minLength": 2,
                "description": "Pipeline name (required for create action)"
              },
              "color": {
                "type": "string",
                "maxLength": 30,
                "minLength": 1,
                "description": "Pipeline color name used for quick identification"
              },
              "entry": {
                "type": "object",
                "properties": {
                  "mode": {
                    "enum": [
                      "manual",
                      "filter",
                      "all"
                    ],
                    "type": "string",
                    "description": "How chats enter this pipeline: manual, filter or all"
                  },
                  "filters": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "array",
                        "items": {
                          "enum": [
                            "chat",
                            "group",
                            "channel",
                            "broadcast"
                          ],
                          "type": "string"
                        },
                        "maxItems": 4,
                        "description": "Chat types that make a chat enter the pipeline"
                      },
                      "labels": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 40,
                          "minLength": 1
                        },
                        "maxItems": 20,
                        "description": "Chat labels that make a chat enter the pipeline"
                      }
                    },
                    "description": "Entry filters, only used when mode is filter",
                    "additionalProperties": false
                  }
                },
                "description": "Entry rule configuration: how chats enter this pipeline",
                "additionalProperties": false
              },
              "action": {
                "enum": [
                  "list",
                  "get",
                  "create",
                  "update",
                  "delete",
                  "summary"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp sales pipelines"
              },
              "device": {
                "$ref": "#/properties/pipelineId",
                "description": "WhatsApp device ID: only return pipelines fed by this device (for list action)"
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "name"
                  ],
                  "properties": {
                    "id": {
                      "type": "string",
                      "maxLength": 40,
                      "minLength": 1,
                      "description": "Stable stage identifier. Assigned by the server when omitted. On update, a stage matching a stored id is merged and omitted fields are preserved"
                    },
                    "kind": {
                      "enum": [
                        "open",
                        "won",
                        "lost"
                      ],
                      "type": "string",
                      "description": "Stage kind. The won and lost stages must come after all the open ones"
                    },
                    "name": {
                      "type": "string",
                      "maxLength": 30,
                      "minLength": 1,
                      "description": "Stage name"
                    },
                    "color": {
                      "type": "string",
                      "maxLength": 30,
                      "minLength": 1,
                      "description": "Stage color name used for quick identification"
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "addLabels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 40,
                            "minLength": 1
                          },
                          "maxItems": 10,
                          "description": "Labels to add when a deal enters this stage"
                        },
                        "assignAgent": {
                          "anyOf": [
                            {
                              "$ref": "#/properties/pipelineId"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Agent to assign when a deal enters this stage"
                        },
                        "removeLabels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 40,
                            "minLength": 1
                          },
                          "maxItems": 10,
                          "description": "Labels to remove when a deal enters this stage"
                        },
                        "assignDepartment": {
                          "anyOf": [
                            {
                              "$ref": "#/properties/pipelineId"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Department to assign when a deal enters this stage"
                        }
                      },
                      "description": "Automatic actions fired when a deal enters this stage",
                      "additionalProperties": false
                    },
                    "slaDays": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "maximum": 365,
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Maximum days a deal may stay in this stage before being flagged as stalled"
                    },
                    "labelMap": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 40,
                          "minLength": 1
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Chat label name mapped to this stage"
                    },
                    "position": {
                      "type": "integer",
                      "maximum": 99,
                      "minimum": 0,
                      "description": "Stage order position. Derived from the array order when omitted"
                    }
                  },
                  "additionalProperties": false
                },
                "maxItems": 20,
                "minItems": 3,
                "description": "Pipeline stages, in order. At least one open, one won and one lost stage are required, and the won and lost stages must come after all the open ones"
              },
              "devices": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/pipelineId"
                },
                "maxItems": 50,
                "description": "WhatsApp device IDs that feed this pipeline. An empty array means all the account devices"
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "maxLength": 3,
                    "minLength": 3
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO 4217 currency code for deal amounts. Defaults to the account currency; on update, pass null to clear it back to that default"
              },
              "settings": {
                "type": "object",
                "properties": {
                  "ai": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Enable AI analysis for deals in this pipeline"
                      },
                      "coolOffMinutes": {
                        "type": "integer",
                        "maximum": 1440,
                        "minimum": 5,
                        "description": "Minutes without new messages before a conversation is analyzed"
                      }
                    },
                    "description": "AI analysis settings",
                    "additionalProperties": false
                  },
                  "closeChatOnWon": {
                    "type": "boolean",
                    "description": "Resolve the chat when the deal is won"
                  },
                  "closeChatOnLost": {
                    "type": "boolean",
                    "description": "Resolve the chat when the deal is lost"
                  }
                },
                "description": "Pipeline behaviour settings",
                "additionalProperties": false
              },
              "pipelineId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Pipeline ID (required for get, update, delete and summary actions)"
              },
              "description": {
                "type": "string",
                "maxLength": 300,
                "minLength": 0,
                "description": "Pipeline description"
              },
              "lostReasons": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 60,
                  "minLength": 1
                },
                "maxItems": 20,
                "description": "Preset lost reasons offered when a deal is lost"
              },
              "confirmDeletion": {
                "type": "boolean",
                "description": "Confirm pipeline deletion (required for delete action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_deals",
          "description": "Comprehensive WhatsApp sales funnel deal management tool. A deal is one sales opportunity tied to a WhatsApp contact, sitting in one stage of one pipeline. Supports listing, retrieving, creating, updating, archiving, moving between stages, linking to chats, and fetching event history.\n\nAvailable actions:\n- list: Retrieve deals with rich filtering (pipeline, stage, status, agent, contact, device, stalled, chatStatus, unread, updatedAfter/Before, pagination)\n- get: Retrieve a single deal by ID\n- create: Create a new deal (requires pipeline, device, contactWid)\n- update: Update deal fields (title, amount, currency, agent, department) - stage moves are NOT here, use move_stage\n- archive: Archive a deal (frees the contact's open-deal slot, preserves as sales history)\n- move_stage: Move a deal to another stage (requires previousStage for atomic compare-and-swap)\n- link_chat: Link a deal to a WhatsApp conversation by contactWid\n- events: Fetch deal event history (limit, skip)\n\nImportant notes:\n1. move_stage requires previousStage - the stage the client last saw. The server performs an atomic compare-and-swap and answers 409 when it no longer matches. Always read the deal first (action: 'get') and pass its current stage value.\n2. Only ONE open deal may exist per contact per pipeline. The API answers 409 otherwise, and the check spans the @c.us/@lid identity equivalence.\n3. Restricted agents (plain agent role) only ever see their own deals, regardless of filters.\n4. Write operations (create, update, archive, move_stage, link_chat) require the Professional plan or above. Read operations (list, get, events) are not plan-gated.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "card": {
                "type": "object",
                "required": [
                  "name",
                  "phone",
                  "avatarUrl"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120,
                    "minLength": 1,
                    "description": "Display name on the card"
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 30,
                    "minLength": 1,
                    "description": "Phone number on the card"
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500,
                    "description": "Avatar URL for the card"
                  }
                },
                "description": "Display-only card seed",
                "additionalProperties": false
              },
              "page": {
                "type": "integer",
                "minimum": 1,
                "description": "Page number (1-based)"
              },
              "size": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Page size (default 50)"
              },
              "skip": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of events to skip"
              },
              "agent": {
                "anyOf": [
                  {
                    "$ref": "#/properties/dealId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Assigned agent user ID. Filter value on list; on update, pass null to unassign"
              },
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1,
                "description": "Number of events to return (default 50)"
              },
              "stage": {
                "type": "string",
                "description": "Stage ID within the pipeline"
              },
              "title": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Deal title (defaults to contact name)"
              },
              "action": {
                "enum": [
                  "list",
                  "get",
                  "create",
                  "update",
                  "archive",
                  "move_stage",
                  "link_chat",
                  "events"
                ],
                "type": "string",
                "description": "Action to perform on deals"
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "number",
                    "maximum": 999999999,
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal amount. On update, pass null to clear it"
              },
              "dealId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Deal ID (required for get, update, archive, move_stage, link_chat, events)"
              },
              "device": {
                "anyOf": [
                  {
                    "$ref": "#/properties/dealId"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/properties/dealId"
                    }
                  }
                ],
                "description": "WhatsApp device ID. A single ID when creating a deal; one or more IDs when filtering a list"
              },
              "status": {
                "enum": [
                  "open",
                  "won",
                  "lost",
                  "archived"
                ],
                "type": "string",
                "description": "Deal status filter (defaults to open)"
              },
              "unread": {
                "type": "boolean",
                "description": "Only deals whose conversation has unread messages"
              },
              "chatWid": {
                "$ref": "#/properties/contact",
                "description": "WhatsApp ID of the chat the deal was created from"
              },
              "contact": {
                "type": "string",
                "pattern": "@(c\\.us|lid|g\\.us|newsletter|broadcast)$",
                "maxLength": 50,
                "minLength": 5,
                "description": "Deals for one contact (spans @c.us/@lid identity equivalence)"
              },
              "stalled": {
                "enum": [
                  "true",
                  "false",
                  "sla",
                  "1w",
                  "1m",
                  "3m",
                  "6m"
                ],
                "type": "string",
                "description": "Deals stuck in their stage (requires pipeline)"
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "maxLength": 3,
                    "minLength": 3,
                    "description": "3-letter uppercase ISO 4217 currency code"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO 4217 currency code. Defaults to the pipeline currency; on update, pass null to clear it"
              },
              "pipeline": {
                "$ref": "#/properties/dealId",
                "description": "Filter by pipeline ID"
              },
              "chatStatus": {
                "enum": [
                  "removed",
                  "banned",
                  "archived",
                  "muted",
                  "pending",
                  "active",
                  "resolved",
                  "none"
                ],
                "type": "string",
                "description": "State of the deal's WhatsApp conversation (requires pipeline, only for open deals)"
              },
              "contactWid": {
                "$ref": "#/properties/contact",
                "description": "WhatsApp ID of the contact (required for create and link_chat)"
              },
              "department": {
                "anyOf": [
                  {
                    "$ref": "#/properties/dealId"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Department ID. On update, pass null to clear it"
              },
              "lostReason": {
                "type": "string",
                "maxLength": 60,
                "minLength": 1,
                "description": "Reason for losing the deal (only meaningful when moving to a lost stage)"
              },
              "unassigned": {
                "type": "boolean",
                "description": "Only deals with no agent (cannot be combined with agent)"
              },
              "updatedAfter": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 date-time, e.g. 2026-08-01T00:00:00.000Z (half-open range [after, before))"
              },
              "previousStage": {
                "$ref": "#/properties/dealId",
                "description": "The stage the client last saw (required for move_stage). Must be the current stage value from a prior get. Server answers 409 if stale."
              },
              "updatedBefore": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 date-time, e.g. 2026-08-01T00:00:00.000Z (half-open range [after, before))"
              },
              "confirmDeletion": {
                "type": "boolean",
                "description": "Confirm deal archiving (required for archive action)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_deal_notes",
          "description": "Comprehensive WhatsApp deal note management tool supporting all note operations. A note is what somebody wrote on a sales deal; a note that carries a due date IS a task. Perfect for managing sales notes, tracking tasks, and attaching files to deals. Supports both standalone notes and comments nested under deal history events.\n\nAvailable actions:\n- list: Retrieve all notes for a deal with filtering and metadata\n- create: Create a new note (optionally as a task with due date, or as a comment on a deal event)\n- update: Update note text, due date, completion status, or file attachments\n- delete: Remove a note (requires confirmation)\n\nNote: The Sales Funnel API is available on the Platform Professional subscription and above. Write endpoints return HTTP 403 when the account's plan does not include it; read endpoints are deliberately NOT plan-gated. Restricted agents (plain agent role) only ever receive their own deals, regardless of filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "action"
            ],
            "properties": {
              "done": {
                "type": "boolean",
                "description": "Completes the task (true) or reopens it (false). Update only."
              },
              "skip": {
                "type": "integer",
                "minimum": 0,
                "description": "Number of notes to skip (>= 0). List only."
              },
              "text": {
                "type": "string",
                "maxLength": 2000,
                "minLength": 1,
                "description": "Note body (required for create, optional for update)"
              },
              "dueAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO 8601 date-time string. A note that has one IS a task. On update, passing null turns the task back into a plain note."
              },
              "event": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Id of one of the deal's own history events. Create only, set at birth and never moved. Makes the note a comment nested under that event."
              },
              "files": {
                "type": "array",
                "items": {
                  "$ref": "#/properties/dealId"
                },
                "maxItems": 3,
                "description": "Ids of previously uploaded files to attach. Upload them first with the file-upload tools (POST /files). On BOTH create and update this means the COMPLETE list the note carries afterwards, never a delta: ids missing from the list are detached, and an empty array [] removes all of them. Accepted attachment types: images (jpeg, png, webp), PDF, Word, Excel, PowerPoint, plain text and markdown."
              },
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1,
                "description": "Maximum number of notes to return (1-200, default 50). List only."
              },
              "action": {
                "enum": [
                  "list",
                  "create",
                  "update",
                  "delete"
                ],
                "type": "string",
                "description": "Action to perform on deal notes"
              },
              "dealId": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "Deal ID (required for all actions)"
              },
              "noteId": {
                "$ref": "#/properties/dealId",
                "description": "Note ID (required for update and delete)"
              },
              "confirmDeletion": {
                "type": "boolean",
                "description": "Confirmation flag required for delete action"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "manage_whatsapp_queue",
          "description": "Comprehensive WhatsApp queue management tool supporting all queue operations. Perfect for monitoring queue health, controlling message delivery flow, and performing bulk message operations. Supports all WhatsApp queue operations through a unified action-based interface.\n\nAvailable actions:\n- get_status: Get comprehensive queue statistics and status information\n- update_status: Update queue processing status (pause/active/reject/freeze) with optional force delivery\n- delete_messages: Delete queued messages with flexible filtering options. A call with no messageIds, phoneNumbers, groupIds or dateRange would delete every queued and scheduled message, so it is refused unless confirmEmptyQueue is true",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "device",
              "action"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "default": false,
                "description": "Force delivery of all queued messages with no delay for 30 minutes (only works with \"active\" or \"reject\" status)"
              },
              "action": {
                "enum": [
                  "get_status",
                  "update_status",
                  "delete_messages"
                ],
                "type": "string",
                "description": "Action to perform on WhatsApp queue"
              },
              "device": {
                "type": "string",
                "pattern": "^[0-9A-Fa-f]{24}$",
                "maxLength": 24,
                "minLength": 24,
                "description": "WhatsApp device ID connected to Wassenger (24 character hexadecimal string)"
              },
              "status": {
                "enum": [
                  "pause",
                  "active",
                  "reject",
                  "freeze"
                ],
                "type": "string",
                "description": "Queue processing status (required for update_status action)"
              },
              "filters": {
                "type": "object",
                "properties": {
                  "groupIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 50,
                      "minLength": 8,
                      "description": "WhatsApp group/broadcast ID (e.g., 1234567890-000000000@g.us)"
                    },
                    "maxItems": 500,
                    "minItems": 1,
                    "description": "Delete messages targeting specific group/broadcast IDs (max 500)"
                  },
                  "dateRange": {
                    "type": "object",
                    "properties": {
                      "after": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
                        "maxLength": 30,
                        "description": "Delete messages created after this date"
                      },
                      "before": {
                        "$ref": "#/properties/filters/properties/dateRange/properties/after",
                        "description": "Delete messages created before this date"
                      }
                    },
                    "description": "Delete messages within a specific date range",
                    "additionalProperties": false
                  },
                  "messageIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[0-9A-Fa-f]+$",
                      "maxLength": 32,
                      "minLength": 18,
                      "description": "WhatsApp message ID (hexadecimal string)"
                    },
                    "maxItems": 500,
                    "minItems": 1,
                    "description": "Delete specific messages by their IDs (max 500)"
                  },
                  "phoneNumbers": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\+?[1-9]\\d{1,14}$",
                      "maxLength": 17,
                      "minLength": 8,
                      "description": "Phone number in E.164 format (e.g., +1234567890)"
                    },
                    "maxItems": 500,
                    "minItems": 1,
                    "description": "Delete messages targeting specific phone numbers (max 500)"
                  },
                  "skipScheduled": {
                    "type": "boolean",
                    "default": false,
                    "description": "Skip deletion of scheduled messages that will be delivered in the future"
                  }
                },
                "description": "Filtering options for selective message deletion (for delete_messages action)",
                "additionalProperties": false
              },
              "confirmEmptyQueue": {
                "type": "boolean",
                "default": false,
                "description": "Set to true only to delete every queued and scheduled message of the number (scheduled ones are kept if filters.skipScheduled is true). delete_messages refuses a call without messageIds, phoneNumbers, groupIds or a dateRange unless this is true"
              },
              "waitForCompletion": {
                "type": "boolean",
                "default": false,
                "description": "Wait until all messages are deleted (may take up to 90 seconds for large queues)"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "ping",
          "description": "Basic ping test to check MCP server connectivity and response time. Returns server status and timestamp.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "message": {
                "type": "string",
                "default": "ping",
                "maxLength": 100,
                "description": "Optional message to include in the ping response"
              }
            },
            "additionalProperties": false
          }
        },
        {
          "name": "health_check",
          "description": "Comprehensive health check of the MCP server and connected WhatsApp devices.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {},
            "additionalProperties": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": [
        {
          "name": "send-whatsapp-message",
          "description": "Generate a structured prompt for sending a WhatsApp message",
          "arguments": [
            {
              "name": "phoneNumber",
              "required": true,
              "description": "The phone number to send the message to (E.164 format)"
            },
            {
              "name": "message",
              "required": true,
              "description": "The content of the message to send"
            }
          ]
        },
        {
          "name": "send-whatsapp-template",
          "description": "Generate a structured prompt for sending a WhatsApp template",
          "arguments": [
            {
              "name": "phoneNumber",
              "required": true,
              "description": "The phone number to send the template to (E.164 format). E.g: +1234567890"
            },
            {
              "name": "templateName",
              "required": true,
              "description": "The name of the template to send"
            }
          ]
        },
        {
          "name": "verify-whatsapp-number",
          "description": "Generate a structured prompt for verifying if a WhatsApp number exists",
          "arguments": [
            {
              "name": "phoneNumber",
              "required": true,
              "description": "The phone number to verify (E.164 format)"
            }
          ]
        },
        {
          "name": "ping-server",
          "description": "Generate a structured prompt for testing MCP server connectivity",
          "arguments": [
            {
              "name": "message",
              "required": false,
              "description": "Optional message to include in the ping (default: 'ping')"
            }
          ]
        },
        {
          "name": "check-server-health",
          "description": "Generate a structured prompt for checking server and device health",
          "arguments": []
        },
        {
          "name": "get-whatsapp-devices-overview",
          "description": "Generate a structured prompt for retrieving WhatsApp devices with filtering options",
          "arguments": [
            {
              "name": "statusFilter",
              "required": false,
              "description": "Filter devices by status (operative, verified, authorized, etc.)"
            },
            {
              "name": "onlineOnly",
              "required": false,
              "description": "Show only online devices (true/false)"
            }
          ]
        },
        {
          "name": "monitor-device-health",
          "description": "Generate a structured prompt for monitoring WhatsApp device health and performance",
          "arguments": [
            {
              "name": "deviceId",
              "required": false,
              "description": "Specific device ID to monitor (24-character hex string)"
            },
            {
              "name": "includeMetrics",
              "required": false,
              "description": "Include detailed metrics and analytics (true/false)"
            }
          ]
        },
        {
          "name": "analyze-device-performance",
          "description": "Generate a structured prompt for analyzing device performance and identifying issues",
          "arguments": [
            {
              "name": "minUptime",
              "required": false,
              "description": "Minimum uptime in seconds to filter devices"
            },
            {
              "name": "activeOnly",
              "required": false,
              "description": "Focus on active devices only (true/false)"
            }
          ]
        },
        {
          "name": "get-whatsapp-chats-overview",
          "description": "Generate a structured prompt for retrieving WhatsApp chats with filtering and analysis",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Type of chat retrieval (recent, unread, by_status, assigned, etc.)"
            },
            {
              "name": "limit",
              "required": false,
              "description": "Number of chats to retrieve (1-100)"
            },
            {
              "name": "statusFilter",
              "required": false,
              "description": "Filter chats by status (active, resolved, pending)"
            }
          ]
        },
        {
          "name": "analyze-whatsapp-chat-patterns",
          "description": "Generate a structured prompt for analyzing chat patterns, activity, and performance metrics",
          "arguments": [
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (day, week, month)"
            },
            {
              "name": "groupBy",
              "required": false,
              "description": "How to group the figures (day or week)"
            },
            {
              "name": "includeInactive",
              "required": false,
              "description": "Include inactive chats in analysis (true/false)"
            }
          ]
        },
        {
          "name": "search-whatsapp-chats",
          "description": "Generate a structured prompt for searching and finding specific chats",
          "arguments": [
            {
              "name": "searchQuery",
              "required": true,
              "description": "Search term for chat names or contact names"
            },
            {
              "name": "exactMatch",
              "required": false,
              "description": "Use exact matching (true/false)"
            },
            {
              "name": "contactTypes",
              "required": false,
              "description": "Filter by contact types (chat, group, channel)"
            }
          ]
        },
        {
          "name": "follow-up-quiet-whatsapp-leads",
          "description": "Find leads that stopped replying and organize them for follow-up, without messaging anyone unless asked",
          "arguments": [
            {
              "name": "device",
              "required": true,
              "description": "WhatsApp number (device) ID"
            },
            {
              "name": "days",
              "required": false,
              "description": "Days since the customer last wrote (default 3)"
            },
            {
              "name": "label",
              "required": false,
              "description": "Only look at chats with this label, e.g. lead"
            },
            {
              "name": "assignTo",
              "required": false,
              "description": "Teammate email to hand the quiet leads to"
            }
          ]
        },
        {
          "name": "get-whatsapp-chat-messages",
          "description": "Generate a structured prompt for retrieving messages from specific WhatsApp chats",
          "arguments": [
            {
              "name": "chatId",
              "required": true,
              "description": "WhatsApp chat ID to retrieve messages from"
            },
            {
              "name": "action",
              "required": true,
              "description": "Type of message retrieval (recent, search, date_range, by_sender, etc.)"
            },
            {
              "name": "limit",
              "required": false,
              "description": "Number of messages to retrieve (1-100)"
            },
            {
              "name": "searchQuery",
              "required": false,
              "description": "Text to search for in messages (required for search action)"
            }
          ]
        },
        {
          "name": "analyze-whatsapp-chat-conversation",
          "description": "Generate a structured prompt for analyzing conversation patterns and message insights",
          "arguments": [
            {
              "name": "chatId",
              "required": true,
              "description": "WhatsApp chat ID to analyze"
            },
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (statistics, export, sentiment, activity)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Time period for analysis (last week, month, etc.)"
            }
          ]
        },
        {
          "name": "search-messages-across-chats",
          "description": "Generate a structured prompt for searching messages across multiple WhatsApp chats",
          "arguments": [
            {
              "name": "searchQuery",
              "required": true,
              "description": "Text content to search for across all chats"
            },
            {
              "name": "messageTypes",
              "required": false,
              "description": "Filter by message types (text, image, video, document)"
            },
            {
              "name": "exactMatch",
              "required": false,
              "description": "Use exact phrase matching (true/false)"
            }
          ]
        },
        {
          "name": "manage-whatsapp-groups",
          "description": "Generate a structured prompt for WhatsApp group management operations",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Group management action (search, create, update, join, leave, get_invite)"
            },
            {
              "name": "groupName",
              "required": false,
              "description": "Name of the group (required for create and search actions)"
            },
            {
              "name": "groupId",
              "required": false,
              "description": "WhatsApp group ID (required for update, leave, get_invite actions)"
            },
            {
              "name": "participants",
              "required": false,
              "description": "Phone numbers of participants to add (for create action)"
            }
          ]
        },
        {
          "name": "manage-group-participants",
          "description": "Generate a structured prompt for managing WhatsApp group participants",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Participant management action (add, remove, promote, demote, get_pending, approve)"
            },
            {
              "name": "groupId",
              "required": true,
              "description": "WhatsApp group ID where participants will be managed"
            },
            {
              "name": "phoneNumbers",
              "required": false,
              "description": "Phone numbers of participants to manage (comma-separated)"
            },
            {
              "name": "adminRole",
              "required": false,
              "description": "Whether to add participants as admins (true/false)"
            }
          ]
        },
        {
          "name": "analyze-whatsapp-group-activity",
          "description": "Generate a structured prompt for analyzing WhatsApp group activity and engagement",
          "arguments": [
            {
              "name": "groupId",
              "required": false,
              "description": "WhatsApp group ID to analyze (optional for general analysis)"
            },
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (activity, participants, engagement, moderation)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (week, month, quarter)"
            }
          ]
        },
        {
          "name": "manage-whatsapp-channels",
          "description": "Generate a structured prompt for WhatsApp channel management operations",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Channel management action (list, create, update, search, join, leave, update_image)"
            },
            {
              "name": "channelName",
              "required": false,
              "description": "Name of the channel (required for create action)"
            },
            {
              "name": "channelId",
              "required": false,
              "description": "WhatsApp channel ID (required for update, leave, update_image actions)"
            },
            {
              "name": "description",
              "required": false,
              "description": "Channel description (for create/update actions)"
            },
            {
              "name": "searchQuery",
              "required": false,
              "description": "Search term for finding channels (for search action)"
            }
          ]
        },
        {
          "name": "analyze-whatsapp-channel-performance",
          "description": "Generate a structured prompt for analyzing WhatsApp channel performance and content",
          "arguments": [
            {
              "name": "channelId",
              "required": true,
              "description": "WhatsApp channel ID to analyze"
            },
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (messages, subscribers, engagement, content)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (week, month, quarter)"
            },
            {
              "name": "messageLimit",
              "required": false,
              "description": "Number of recent messages to analyze (1-100)"
            }
          ]
        },
        {
          "name": "discover-whatsapp-channels",
          "description": "Generate a structured prompt for discovering and exploring WhatsApp channels",
          "arguments": [
            {
              "name": "category",
              "required": false,
              "description": "Channel category to explore (recommended, trending, popular, new)"
            },
            {
              "name": "searchKeywords",
              "required": false,
              "description": "Keywords to search for in channel discovery"
            },
            {
              "name": "countries",
              "required": false,
              "description": "Country codes to filter channels by location"
            }
          ]
        },
        {
          "name": "manage-whatsapp-campaigns",
          "description": "Generate a structured prompt for WhatsApp marketing campaign management",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Campaign management action (search, create, update, start, stop, delete)"
            },
            {
              "name": "campaignName",
              "required": false,
              "description": "Name of the campaign (required for create action)"
            },
            {
              "name": "campaignId",
              "required": false,
              "description": "Campaign ID (required for update, start, stop, delete actions)"
            },
            {
              "name": "message",
              "required": false,
              "description": "Campaign message content (required for create action)"
            },
            {
              "name": "template",
              "required": false,
              "description": "Approved template name, required on WhatsApp Cloud API numbers (for create action)"
            },
            {
              "name": "deliverySpeed",
              "required": false,
              "description": "Delivery pace: 1 is one message a minute, 0.5 about two, 0.3 about three, 0.2 about four"
            }
          ]
        },
        {
          "name": "analyze-campaign-performance",
          "description": "Generate a structured prompt for analyzing WhatsApp campaign performance and ROI",
          "arguments": [
            {
              "name": "campaignId",
              "required": false,
              "description": "Campaign ID to analyze (optional for general analysis)"
            },
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (delivery, engagement, conversion, roi)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (last week, month, quarter)"
            },
            {
              "name": "compareWith",
              "required": false,
              "description": "Campaign ID to compare performance with"
            }
          ]
        },
        {
          "name": "manage-campaign-contacts",
          "description": "Generate a structured prompt for managing WhatsApp campaign recipients and contact lists",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Contact management action (search, add, remove)"
            },
            {
              "name": "campaignId",
              "required": true,
              "description": "Campaign ID to manage contacts for"
            },
            {
              "name": "phoneNumbers",
              "required": false,
              "description": "Phone numbers to add/remove (comma-separated)"
            },
            {
              "name": "contactType",
              "required": false,
              "description": "Type of contacts to manage (user, group, channel)"
            }
          ]
        },
        {
          "name": "manage-whatsapp-team",
          "description": "Generate a structured prompt for WhatsApp team member management",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Team management action (search, create, update, delete, grant_access, revoke_access)"
            },
            {
              "name": "email",
              "required": false,
              "description": "Team member email address (required for create action)"
            },
            {
              "name": "name",
              "required": false,
              "description": "Team member full name (required for create action)"
            },
            {
              "name": "role",
              "required": false,
              "description": "Team member role (admin, supervisor, agent)"
            },
            {
              "name": "userId",
              "required": false,
              "description": "Team member ID (required for update, delete actions)"
            }
          ]
        },
        {
          "name": "manage-whatsapp-departments",
          "description": "Generate a structured prompt for WhatsApp department organization and management",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Department management action (list, create, update, delete)"
            },
            {
              "name": "departmentName",
              "required": false,
              "description": "Department name (required for create action)"
            },
            {
              "name": "departmentId",
              "required": false,
              "description": "Department ID (required for update, delete actions)"
            },
            {
              "name": "color",
              "required": false,
              "description": "Department color for visual identification"
            },
            {
              "name": "agents",
              "required": false,
              "description": "Agent IDs to include in department (comma-separated)"
            }
          ]
        },
        {
          "name": "analyze-team-performance",
          "description": "Generate a structured prompt for analyzing WhatsApp team performance and productivity",
          "arguments": [
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (workload, response_time, productivity, collaboration)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (week, month, quarter)"
            },
            {
              "name": "departmentId",
              "required": false,
              "description": "Focus analysis on specific department"
            },
            {
              "name": "agentId",
              "required": false,
              "description": "Focus analysis on specific team member"
            }
          ]
        },
        {
          "name": "search-whatsapp-files",
          "description": "Generate a structured prompt for searching and managing WhatsApp files and media",
          "arguments": [
            {
              "name": "fileType",
              "required": true,
              "description": "Type of files to search (outbound, chat, all)"
            },
            {
              "name": "mediaTypes",
              "required": false,
              "description": "Filter by media types (image, video, audio, document)"
            },
            {
              "name": "searchQuery",
              "required": false,
              "description": "Search term for filename or content"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Time period for file search (week, month, quarter)"
            },
            {
              "name": "sizeLimit",
              "required": false,
              "description": "File size limit for filtering (e.g., 1MB, 10MB)"
            }
          ]
        },
        {
          "name": "upload-whatsapp-file",
          "description": "Generate a structured prompt for uploading and managing files for WhatsApp messaging",
          "arguments": [
            {
              "name": "sourceUrl",
              "required": true,
              "description": "URL of the file to upload"
            },
            {
              "name": "filename",
              "required": false,
              "description": "Custom filename for the uploaded file"
            },
            {
              "name": "fileFormat",
              "required": false,
              "description": "File format (gif, ptt for voice, native)"
            },
            {
              "name": "permission",
              "required": false,
              "description": "File access permission (public, readonly, private)"
            },
            {
              "name": "tags",
              "required": false,
              "description": "Tags for file organization (comma-separated)"
            }
          ]
        },
        {
          "name": "analyze-whatsapp-file-usage",
          "description": "Generate a structured prompt for analyzing file usage patterns and storage optimization",
          "arguments": [
            {
              "name": "analysisType",
              "required": true,
              "description": "Type of analysis (usage, storage, performance, organization)"
            },
            {
              "name": "timeframe",
              "required": false,
              "description": "Analysis timeframe (week, month, quarter)"
            },
            {
              "name": "fileCategory",
              "required": false,
              "description": "Focus on specific file category (images, videos, documents)"
            }
          ]
        },
        {
          "name": "manage-whatsapp-labels",
          "description": "Generate a structured prompt for WhatsApp chat label management and organization",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Label management action (list, create, update, delete)"
            },
            {
              "name": "labelName",
              "required": false,
              "description": "Label name (required for create, update, delete actions)"
            },
            {
              "name": "color",
              "required": false,
              "description": "Label color from predefined palette (ruby, tomato, orange, etc.)"
            },
            {
              "name": "description",
              "required": false,
              "description": "Label description for organization purposes"
            },
            {
              "name": "scope",
              "required": false,
              "description": "Label scope (chat for platform labels, wa for WhatsApp Business)"
            }
          ]
        },
        {
          "name": "optimize-whatsapp-label-system",
          "description": "Generate a structured prompt for optimizing WhatsApp label organization and workflow efficiency",
          "arguments": [
            {
              "name": "organizationType",
              "required": true,
              "description": "Type of organization focus (workflow, priority, department, customer)"
            },
            {
              "name": "includeUsageStats",
              "required": false,
              "description": "Include label usage statistics in analysis (true/false)"
            },
            {
              "name": "colorScheme",
              "required": false,
              "description": "Preferred color scheme for organization (business, priority, department)"
            }
          ]
        },
        {
          "name": "apply-whatsapp-labels-strategically",
          "description": "Generate a structured prompt for strategically applying labels to WhatsApp chats for better organization",
          "arguments": [
            {
              "name": "applicationStrategy",
              "required": true,
              "description": "Label application strategy (bulk, selective, automated, manual)"
            },
            {
              "name": "criteria",
              "required": true,
              "description": "Criteria for label application (status, priority, content, timing)"
            },
            {
              "name": "targetChats",
              "required": false,
              "description": "Target chat types (unread, active, resolved, all)"
            },
            {
              "name": "labelNames",
              "required": false,
              "description": "Specific labels to apply (comma-separated)"
            }
          ]
        },
        {
          "name": "whatsapp_status_publishing",
          "description": "Create and publish WhatsApp status updates with text, images, or videos. Perfect for immediate content sharing and brand storytelling.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "content_type",
              "required": false,
              "description": "Type of status content: text, image, or video"
            },
            {
              "name": "message",
              "required": false,
              "description": "Text content for the status update"
            },
            {
              "name": "media_url",
              "required": false,
              "description": "URL for image or video content"
            }
          ]
        },
        {
          "name": "whatsapp_status_scheduling",
          "description": "Schedule WhatsApp status updates for future publishing with advanced timing options. Ideal for content planning and strategic posting.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "schedule_time",
              "required": false,
              "description": "When to publish the status (date/time or delay)"
            },
            {
              "name": "content_type",
              "required": false,
              "description": "Type of status content: text, image, or video"
            },
            {
              "name": "campaign_type",
              "required": false,
              "description": "Type of content campaign or series"
            }
          ]
        },
        {
          "name": "whatsapp_status_analytics",
          "description": "Analyze and retrieve WhatsApp status history with comprehensive filtering and insights. Perfect for content performance tracking.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "time_period",
              "required": false,
              "description": "Time range for status analysis (today, week, month, custom)"
            },
            {
              "name": "content_filter",
              "required": false,
              "description": "Filter by content type or search terms"
            },
            {
              "name": "analytics_type",
              "required": false,
              "description": "Type of analysis needed (performance, content, scheduling)"
            }
          ]
        },
        {
          "name": "whatsapp_queue_monitoring",
          "description": "Monitor WhatsApp message queue status, performance, and health metrics. Essential for delivery optimization and system monitoring.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "monitoring_type",
              "required": false,
              "description": "Type of monitoring: status, performance, capacity, or health"
            },
            {
              "name": "alert_threshold",
              "required": false,
              "description": "Alert threshold for queue capacity or performance issues"
            }
          ]
        },
        {
          "name": "whatsapp_queue_control",
          "description": "Control WhatsApp message queue processing with status management and delivery control. Critical for managing message flow and system operations.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "target_status",
              "required": false,
              "description": "Desired queue status: active, pause, reject, or freeze"
            },
            {
              "name": "operation_reason",
              "required": false,
              "description": "Reason for the queue operation (maintenance, overload, emergency)"
            },
            {
              "name": "force_delivery",
              "required": false,
              "description": "Whether to force delivery of existing messages"
            }
          ]
        },
        {
          "name": "whatsapp_queue_operations",
          "description": "Perform bulk operations on WhatsApp message queues including message deletion, filtering, and cleanup. Essential for queue maintenance and management.",
          "arguments": [
            {
              "name": "device",
              "required": false,
              "description": "WhatsApp device ID (24-character hex string)"
            },
            {
              "name": "operation_type",
              "required": false,
              "description": "Type of bulk operation: delete, filter, cleanup, or transfer"
            },
            {
              "name": "filter_criteria",
              "required": false,
              "description": "Criteria for filtering messages (date, recipient, status, content)"
            },
            {
              "name": "safety_confirm",
              "required": false,
              "description": "Confirmation for destructive operations"
            }
          ]
        },
        {
          "name": "phone_number_validation",
          "description": "Validate and normalize phone number formats according to E.164 international standards. Essential for data quality and contact management.",
          "arguments": [
            {
              "name": "validation_scope",
              "required": false,
              "description": "Scope of validation: single number, bulk list, or file import"
            },
            {
              "name": "country_context",
              "required": false,
              "description": "Default country for number parsing and validation"
            },
            {
              "name": "format_requirements",
              "required": false,
              "description": "Specific format requirements or standards needed"
            },
            {
              "name": "data_source",
              "required": false,
              "description": "Source of phone numbers (manual entry, CSV, database)"
            }
          ]
        },
        {
          "name": "whatsapp_number_verification",
          "description": "Verify if phone numbers have active WhatsApp accounts and can receive messages. Critical for WhatsApp marketing and communication strategies.",
          "arguments": [
            {
              "name": "verification_scope",
              "required": false,
              "description": "Scope of verification: single number, contact list, or campaign targets"
            },
            {
              "name": "business_purpose",
              "required": false,
              "description": "Business purpose: marketing, support, verification, or outreach"
            },
            {
              "name": "verification_depth",
              "required": false,
              "description": "Depth of verification: basic existence or detailed business info"
            },
            {
              "name": "rate_limits",
              "required": false,
              "description": "Rate limiting considerations for bulk verification"
            }
          ]
        },
        {
          "name": "number_management_optimization",
          "description": "Optimize phone number databases and contact management with advanced validation, verification, and data quality improvements.",
          "arguments": [
            {
              "name": "optimization_goal",
              "required": false,
              "description": "Primary goal: data quality, campaign efficiency, or compliance"
            },
            {
              "name": "data_volume",
              "required": false,
              "description": "Size of number database: small list, large database, or enterprise scale"
            },
            {
              "name": "quality_standards",
              "required": false,
              "description": "Quality standards required: basic validation, full verification, or premium quality"
            },
            {
              "name": "integration_needs",
              "required": false,
              "description": "Integration requirements: CRM, marketing tools, or custom systems"
            }
          ]
        },
        {
          "name": "search-whatsapp-templates",
          "description": "Search for available WhatsApp templates for a specific device",
          "arguments": [
            {
              "name": "device",
              "required": true,
              "description": "The device ID to search templates for (24 character hex string)"
            },
            {
              "name": "query",
              "required": false,
              "description": "Optional keyword to search in template names"
            }
          ]
        },
        {
          "name": "configure-template-message",
          "description": "Help configure a WhatsApp template message by explaining its variables",
          "arguments": [
            {
              "name": "templateName",
              "required": true,
              "description": "The name of the template to configure"
            },
            {
              "name": "language",
              "required": true,
              "description": "The language of the template"
            }
          ]
        },
        {
          "name": "create-whatsapp-template",
          "description": "Create a WhatsApp message template and submit it for review, asking for every detail it needs",
          "arguments": [
            {
              "name": "purpose",
              "required": false,
              "description": "What the template is for, e.g. \"remind customers of their appointment\""
            },
            {
              "name": "device",
              "required": false,
              "description": "The WhatsApp Business API device ID that will own the template (24 character hex string)"
            }
          ]
        },
        {
          "name": "manage-sales-pipeline",
          "description": "Generate a structured prompt for sales pipeline setup and maintenance",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Pipeline management action (list, get, create, update, delete, summary)"
            },
            {
              "name": "pipelineName",
              "required": false,
              "description": "Pipeline name (required for create and update actions)"
            },
            {
              "name": "pipelineId",
              "required": false,
              "description": "Pipeline ID (required for get, update, delete actions)"
            },
            {
              "name": "stages",
              "required": false,
              "description": "Comma-separated list of stage names (optional for create/update)"
            },
            {
              "name": "device",
              "required": false,
              "description": "Device identifier (optional)"
            }
          ]
        },
        {
          "name": "manage-sales-deals",
          "description": "Generate a structured prompt for sales deal lifecycle management",
          "arguments": [
            {
              "name": "action",
              "required": true,
              "description": "Deal management action (list, get, create, update, archive, move_stage, link_chat, events)"
            },
            {
              "name": "dealId",
              "required": false,
              "description": "Deal ID (required for get, update, archive, move_stage, link_chat, events)"
            },
            {
              "name": "pipeline",
              "required": false,
              "description": "Pipeline identifier (optional)"
            },
            {
              "name": "stage",
              "required": false,
              "description": "Stage name (optional for move_stage)"
            },
            {
              "name": "contactWid",
              "required": false,
              "description": "Contact WhatsApp ID (optional for create/link_chat)"
            },
            {
              "name": "amount",
              "required": false,
              "description": "Deal amount (optional for create/update)"
            }
          ]
        },
        {
          "name": "analyze-sales-funnel",
          "description": "Generate a structured prompt for sales funnel health analysis",
          "arguments": [
            {
              "name": "focus",
              "required": true,
              "description": "Analysis focus (conversion, stalled, workload, revenue)"
            },
            {
              "name": "pipelineId",
              "required": false,
              "description": "Pipeline ID (optional)"
            },
            {
              "name": "period",
              "required": false,
              "description": "Analysis period (optional)"
            }
          ]
        }
      ]
    },
    "instructions": null
  },
  "changes": {
    "total": 1,
    "latest": [
      {
        "observed_at": "2026-11-22T17:04:02.860Z",
        "from_sha": "61e58a91e9a440d546883054e2e15d4db7ea4868cd7a0537600e70436d98f594",
        "to_sha": "b18a6c1c89856c2378ed6f36545dec4c97bd9fa280a0586a938051d016323970",
        "summary": {
          "tool_changed": 1,
          "tool_removed": 6
        },
        "diff": [
          {
            "op": "removed",
            "kind": "tool",
            "name": "manage_whatsapp_web_forms",
            "path": "",
            "before": {
              "chars": 6538,
              "truncated": true
            }
          },
          {
            "op": "removed",
            "kind": "tool",
            "name": "send_whatsapp_web_form",
            "path": "",
            "before": {
              "chars": 3744,
              "truncated": true
            }
          },
          {
            "op": "removed",
            "kind": "tool",
            "name": "manage_whatsapp_web_form_links",
            "path": "",
            "before": {
              "chars": 3699,
              "truncated": true
            }
          },
          {
            "op": "removed",
            "kind": "tool",
            "name": "manage_whatsapp_web_form_submissions",
            "path": "",
            "before": {
              "chars": 3351,
              "truncated": true
            }
          },
          {
            "op": "removed",
            "kind": "tool",
            "name": "delete_whatsapp_web_form_submissions",
            "path": "",
            "before": {
              "chars": 2332,
              "truncated": true
            }
          },
          {
            "op": "removed",
            "kind": "tool",
            "name": "manage_whatsapp_web_form_appearance",
            "path": "",
            "before": {
              "chars": 3529,
              "truncated": true
            }
          },
          {
            "op": "changed",
            "kind": "tool",
            "name": "manage_whatsapp_campaigns",
            "path": "/inputSchema/properties/form/description",
            "after": "Only where web forms are enabled for the account: a published web form sent to every recipient, each with a link of their own minted when their message goes out. On numbers linked by QR the link replaces {{form.url}} in message, or is added at its end. On WhatsApp Cloud API numbers the template must have a form link button. Individual recipients only. null removes it (update)",
            "before": "A published web form (see manage_whatsapp_web_forms) sent to every recipient, each with a link of their own minted when their message goes out. On numbers linked by QR the link replaces {{form.url}} in message, or is added at its end. On WhatsApp Cloud API numbers the template must have a form link button (manage_whatsapp_web_form_appearance, link_templates). Individual recipients only. null removes it (update)"
          }
        ],
        "withheld": false
      }
    ]
  },
  "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."
}