{
  "server": {
    "url": "https://mcp.groupilot.com/mcp",
    "stdio": "npx -y @groupilot/mcp"
  },
  "tools": [
    {
      "name": "get_account",
      "title": "Account overview",
      "description": "The connected WhatsApp account: number status, billing state, limits and the scopes of this key. Call it first to know what you can do.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "list_notifications",
      "title": "List notifications",
      "description": "Recent account notifications: send failures, disconnections, full communities. Use it to explain a problem to the user.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "limit": {
            "default": 20,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "offset": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          },
          "unread_only": {}
        },
        "required": [
          "limit",
          "offset",
          "unread_only"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_events",
      "title": "List events",
      "description": "The account's events (a webinar, a challenge…), each with its WhatsApp communities and smart link. Filter by status.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "draft",
                  "active",
                  "paused",
                  "archived"
                ]
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "active",
                    "paused",
                    "archived"
                  ]
                }
              }
            ]
          }
        },
        "additionalProperties": false
      }
    },
    {
      "name": "get_event",
      "title": "Get an event",
      "description": "One event with its linked sequence, recurrence, smart link and where the link currently sends people.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "create_event",
      "title": "Create an event",
      "description": "Creates an event (punctual or recurring) with its WhatsApp community settings. Communities are created automatically before each occurrence. Ask the user for the name, the date/time (or weekly days) and the time zone before calling.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "slug": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "type": {
            "type": "string",
            "enum": [
              "punctual",
              "recurring"
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "recurrence": {
            "type": "object",
            "properties": {
              "days": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "sun",
                    "mon",
                    "tue",
                    "wed",
                    "thu",
                    "fri",
                    "sat"
                  ]
                }
              },
              "time": {
                "type": "string",
                "pattern": "^\\d{2}:\\d{2}$"
              },
              "excluded_dates": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                }
              }
            },
            "required": [
              "days",
              "time"
            ],
            "additionalProperties": false
          },
          "link_fallback_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "rotation_delay_hours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 168
          },
          "community": {
            "type": "object",
            "properties": {
              "name_template": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "days_before": {
                "type": "integer",
                "minimum": 1,
                "maximum": 90
              },
              "overflow_switch_at": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 980
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "modify_groups_policy": {
                "type": "string",
                "enum": [
                  "anyone",
                  "admins"
                ]
              },
              "member_add_mode": {
                "type": "string",
                "enum": [
                  "anyone",
                  "admins"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "name",
          "slug",
          "type"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_event",
      "title": "Update an event",
      "description": "Changes an event's settings (display name, link fallback, community names, policies…). The slug (smart link) and the time zone are locked once created; renaming keeps the link and the existing communities as they are. `apply_to_existing_communities` pushes community name/description changes to live WhatsApp communities.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "type": {
                "type": "string",
                "enum": [
                  "punctual",
                  "recurring"
                ]
              },
              "link_fallback_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotation_delay_hours": {
                "type": "integer",
                "minimum": 0,
                "maximum": 168
              },
              "community": {
                "type": "object",
                "properties": {
                  "name_template": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "days_before": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 90
                  },
                  "overflow_switch_at": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 980
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "modify_groups_policy": {
                    "type": "string",
                    "enum": [
                      "anyone",
                      "admins"
                    ]
                  },
                  "member_add_mode": {
                    "type": "string",
                    "enum": [
                      "anyone",
                      "admins"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "apply_to_existing_communities": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "event_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "pause_event",
      "title": "Pause an event",
      "description": "Stops every scheduled message of the event until resumed; messages whose time passes during the pause are not sent later. Confirm with the user before calling. There is no delete: pausing is the way to stop.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "resume_event",
      "title": "Resume an event",
      "description": "Resumes a paused event: future messages go out again (elapsed ones were canceled).",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "link_sequence",
      "title": "Link a sequence to an event",
      "description": "Attaches a message sequence to an event (or detaches it with sequence_id null). Pending messages of upcoming occurrences are recomputed.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "sequence_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "event_id",
          "sequence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_recurrence",
      "title": "Get the recurrence of an event",
      "description": "The weekly rule of a recurring event (days, time, time zone) and its smart link.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_recurrence",
      "title": "Change the recurrence of an event",
      "description": "Changes the weekly days/time of a recurring event. Use `dry_run: true` first to see which occurrences would be added or canceled, then apply.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "recurrence": {
                "type": "object",
                "properties": {
                  "days": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "sun",
                        "mon",
                        "tue",
                        "wed",
                        "thu",
                        "fri",
                        "sat"
                      ]
                    }
                  },
                  "time": {
                    "type": "string",
                    "pattern": "^\\d{2}:\\d{2}$"
                  },
                  "excluded_dates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    }
                  }
                },
                "required": [
                  "days",
                  "time"
                ],
                "additionalProperties": false
              },
              "regenerate_window_weeks": {
                "default": 4,
                "type": "integer",
                "minimum": 1,
                "maximum": 52
              },
              "dry_run": {
                "default": false,
                "type": "boolean"
              }
            },
            "required": [
              "recurrence",
              "regenerate_window_weeks",
              "dry_run"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "event_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_occurrences",
      "title": "List occurrences of an event",
      "description": "The dated sessions of an event (upcoming or past), each with its WhatsApp communities and their invite links.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "filter": {
            "default": "upcoming",
            "type": "string",
            "enum": [
              "upcoming",
              "past",
              "attention"
            ]
          },
          "page": {
            "default": 1,
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "event_id",
          "filter",
          "page"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_occurrence",
      "title": "Get an occurrence",
      "description": "One dated session with its communities, invite links, member counts and provisioning state.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "occurrence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "occurrence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "create_occurrence",
      "title": "Add an occurrence",
      "description": "Adds a dated session to an event (local date-time in the event's time zone). Its community and messages are created automatically.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "scheduled_at_local": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$"
          }
        },
        "required": [
          "event_id",
          "scheduled_at_local"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "retry_provisioning",
      "title": "Retry the community creation of an occurrence",
      "description": "When an occurrence's WhatsApp community failed to be created, asks for a new attempt.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "occurrence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "occurrence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_communities",
      "title": "List WhatsApp communities",
      "description": "Every community of the number: the ones Groupilot created (with their event) and the external ones. Their `whatsapp_id` is what broadcasts target.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_community",
      "title": "Get a community",
      "description": "One Groupilot community with its links, member count and settings.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "community_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "community_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_community",
      "title": "Update a community",
      "description": "Renames a community, changes its description or who may post. Applied on WhatsApp right away.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "community_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "modify_groups_policy": {
                "type": "string",
                "enum": [
                  "anyone",
                  "admins"
                ]
              },
              "member_add_mode": {
                "type": "string",
                "enum": [
                  "anyone",
                  "admins"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "community_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_sequences",
      "title": "List sequences",
      "description": "The message sequences of the account (name, message count, linked events).",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_sequence",
      "title": "Get a sequence with its messages",
      "description": "A sequence and its ordered steps (timing relative to the live, type, text, media, poll, or the `community_update` payload of a step that renames / re-describes the community).",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "sequence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "sync_sequence",
      "title": "Create or update a whole sequence by your own id",
      "description": "The recommended way to write a sequence: send the complete sequence (name + ordered messages, each with an `external_id`). Groupilot creates it or updates it, matching messages by external_id and removing the missing ones. Pending messages of linked events are resynchronised unless `apply_to_pending_jobs` is false. Timing format: `J-2 10:00` (2 days before the live at 10:00), `J0 19:45`, `J+1 09:00`, or whole hours relative to the live time (`H-1`, `H+2`; minutes are not allowed in `H` timings, use a fixed `J0 HH:MM` time instead). A step of type `community_update` posts nothing: it changes the community name and/or description at its time (`community_update: { name_template, description_template, restore_name, restore_description }`, variables `{community_name}`, `{community_description}`, `{event_name}`, `{date}`, `{time}`, `{J+4:date}`...); typical pair: `🔴 EN LIVE · {community_name}` at the live time (`J0 20:00` for a 20:00 live) and `restore_name: true` at a fixed time after the live (`J0 22:00`). Always use fixed `J0 HH:MM` times for these steps. WhatsApp shows a system line at each change, so keep these steps rare. A text message with `link_preview: false` is sent without the preview card of its link (default `true`). At most 200 messages per sequence. The texts, poll questions and options, and community update templates of one call add up to at most 3 MiB (3,145,728 bytes, counted in UTF-8); a larger payload is refused with `400 validation_error` (field `messages`) before anything is written: split the content across several sequences or shorten the texts. Send the JSON as UTF-8: a request body above 4 MiB is refused with HTTP `413` (escaping every non-ASCII character as `\\uXXXX` can double the size of texts written in non-Latin scripts). The sync is refused with a `conflict` error, before anything is written, when the linked events' upcoming occurrences times the messages would exceed 20,000 scheduled sends: link fewer events, or pass `apply_to_pending_jobs: false` and resync event by event with `resync_sequence`. Use the `generate_sequence` prompt to draft one.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "messages": {
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "external_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "timing": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^(J[+-]?\\d{1,2} \\d{2}:\\d{2}|H[+-]\\d{1,3})$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "image",
                    "video",
                    "voice",
                    "document",
                    "poll",
                    "community_update"
                  ]
                },
                "text": {
                  "type": "string",
                  "maxLength": 10000
                },
                "media_url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 2000,
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "poll": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "question": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 255
                        },
                        "options": {
                          "minItems": 2,
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 100
                          }
                        },
                        "select_count": {
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 0
                            },
                            {
                              "type": "number",
                              "const": 1
                            }
                          ]
                        }
                      },
                      "required": [
                        "question",
                        "options",
                        "select_count"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ghost_mention": {
                  "type": "boolean"
                },
                "link_preview": {
                  "type": "boolean"
                },
                "community_update": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name_template": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 200
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "description_template": {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "restore_name": {
                          "type": "boolean"
                        },
                        "restore_description": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "external_id",
                "type"
              ],
              "additionalProperties": false
            }
          },
          "apply_to_pending_jobs": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "external_id",
          "name",
          "messages",
          "apply_to_pending_jobs"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "create_sequence",
      "title": "Create an empty sequence",
      "description": "Creates a sequence with a name; add messages with add_message (prefer sync_sequence for a full sequence).",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "rename_sequence",
      "title": "Rename a sequence",
      "description": "Changes the name of a sequence.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "sequence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "delete_sequence",
      "title": "Delete a sequence",
      "description": "Deletes a sequence. Refused while an active or paused event uses it unless `force` is true (the events are then unlinked and their pending messages canceled). Confirm with the user.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "force": {
            "default": false,
            "type": "boolean"
          }
        },
        "required": [
          "sequence_id",
          "force"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "add_message",
      "title": "Add a message to a sequence",
      "description": "Appends one step (text, image, video, audio, document, poll, or `community_update` to rename / re-describe the community at that time; then pass `community_update` with `name_template` / `description_template` or `restore_name` / `restore_description`, no text or media) with its timing. On a text message, `link_preview: false` sends it without the preview card of its link (default `true`). At most 200 messages per sequence. Pending sends of linked events are resynchronised unless `resync` is false.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "timing": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(J[+-]?\\d{1,2} \\d{2}:\\d{2}|H[+-]\\d{1,3})$"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "voice",
              "document",
              "poll",
              "community_update"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 10000
          },
          "media_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "poll": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "options": {
                    "minItems": 2,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "select_count": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1
                      }
                    ]
                  }
                },
                "required": [
                  "question",
                  "options",
                  "select_count"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "ghost_mention": {
            "type": "boolean"
          },
          "link_preview": {
            "type": "boolean"
          },
          "community_update": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "name_template": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description_template": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "restore_name": {
                    "type": "boolean"
                  },
                  "restore_description": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "resync": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "sequence_id",
          "type",
          "resync"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_message",
      "title": "Change a message of a sequence",
      "description": "Changes the text, timing, media, poll, link preview (`link_preview`, text messages only) or `community_update` payload of one step. Switching a step to `community_update` needs its payload in the same call and drops text, media, poll and ghost mention.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "message_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "external_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "timing": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^(J[+-]?\\d{1,2} \\d{2}:\\d{2}|H[+-]\\d{1,3})$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "type": {
                "type": "string",
                "enum": [
                  "text",
                  "image",
                  "video",
                  "voice",
                  "document",
                  "poll",
                  "community_update"
                ]
              },
              "text": {
                "type": "string",
                "maxLength": 10000
              },
              "media_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "poll": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "question": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      "options": {
                        "minItems": 2,
                        "maxItems": 12,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        }
                      },
                      "select_count": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 0
                          },
                          {
                            "type": "number",
                            "const": 1
                          }
                        ]
                      }
                    },
                    "required": [
                      "question",
                      "options",
                      "select_count"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "ghost_mention": {
                "type": "boolean"
              },
              "link_preview": {
                "type": "boolean"
              },
              "community_update": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name_template": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 200
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "description_template": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "restore_name": {
                        "type": "boolean"
                      },
                      "restore_description": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resync": {
                "default": true,
                "type": "boolean"
              }
            },
            "required": [
              "resync"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "sequence_id",
          "message_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "delete_message",
      "title": "Remove a message from a sequence",
      "description": "Removes one message; its pending sends are canceled when `resync` is true (default).",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "message_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "resync": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "sequence_id",
          "message_id",
          "resync"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "reorder_messages",
      "title": "Reorder the messages of a sequence",
      "description": "Sets the display order of the messages (all ids, in order).",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "ids": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "resync": {
            "default": true,
            "type": "boolean"
          }
        },
        "required": [
          "sequence_id",
          "ids",
          "resync"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "preview_resync",
      "title": "Preview a resynchronisation",
      "description": "What applying the sequence again to its linked events would change (messages added, updated, canceled), per event, without changing anything.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "sequence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "resync_sequence",
      "title": "Resynchronise the pending sends with the sequence",
      "description": "Applies the sequence to the pending messages of its linked events (or only `event_ids`). Sent, in-progress and hand-edited messages are left alone. Refused with a `conflict` error, before anything changes, above 20,000 scheduled sends in one call: pass fewer `event_ids`.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "sequence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "event_ids": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        },
        "required": [
          "sequence_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "import_media",
      "title": "Import a media file from a URL",
      "description": "Downloads a public HTTPS file (image, video, audio, document; 40 MB max) into the account's media library and returns the `media_url` to use in messages.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "voice",
              "document"
            ]
          },
          "url": {
            "type": "string",
            "maxLength": 2000,
            "format": "uri"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "required": [
          "kind",
          "url"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_jobs",
      "title": "List the scheduled messages of an event",
      "description": "The messages planned, sent or failed for an event, with filters (status, occurrence, dates) and a cursor.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "scheduled",
                  "billing_paused",
                  "overdue",
                  "sent",
                  "partial",
                  "failed",
                  "canceled"
                ]
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "scheduled",
                    "billing_paused",
                    "overdue",
                    "sent",
                    "partial",
                    "failed",
                    "canceled"
                  ]
                }
              }
            ]
          },
          "occurrence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "community_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "content_type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "voice",
              "document",
              "poll",
              "community_update"
            ]
          },
          "from": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "to": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "order": {
            "default": "asc",
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "required": [
          "event_id",
          "limit",
          "order"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_job",
      "title": "Get a scheduled message",
      "description": "One scheduled message with its effective content, status, retries and what can still be done with it.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "job_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_job_deliveries",
      "title": "List the per-community outcomes of a message",
      "description": "For one scheduled message, each community it was sent to and the result.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "limit": {
            "default": 100,
            "type": "integer",
            "minimum": 1,
            "maximum": 500
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        },
        "required": [
          "job_id",
          "limit"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "send_adhoc_message",
      "title": "Schedule a one-off message",
      "description": "Plans one extra message to the communities of an occurrence at `send_at` (at least 60 s ahead; 30 per day). This sends a WhatsApp message to real people: confirm the text, the occurrence and the time with the user first.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "occurrence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "send_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "voice",
              "poll"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 10000
          },
          "media_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "poll": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "options": {
                    "minItems": 2,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "select_count": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1
                      }
                    ]
                  }
                },
                "required": [
                  "question",
                  "options",
                  "select_count"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "type": "string",
            "maxLength": 60
          }
        },
        "required": [
          "event_id",
          "occurrence_id",
          "send_at",
          "type"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "override_job",
      "title": "Edit a pending message",
      "description": "Changes the text or media of one pending message (not a poll, not a community update step: error `community_update_not_editable`, not already attempted) for this occurrence only, without touching the sequence.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 10000
              },
              "media_url": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2000,
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "job_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "cancel_job",
      "title": "Cancel a pending message",
      "description": "Cancels one pending scheduled message for good. Confirm with the user.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "job_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "retry_job",
      "title": "Retry a failed message",
      "description": "Re-queues a failed or partially sent message (`mode`: failed, partial, overdue, force_now). Only communities that certainly did not receive it are retried.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "failed",
              "partial",
              "overdue",
              "force_now"
            ]
          }
        },
        "required": [
          "job_id",
          "mode"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_broadcasts",
      "title": "List broadcasts",
      "description": "Broadcasts sent or scheduled to chosen communities, with their counters.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "get_broadcast",
      "title": "Get a broadcast",
      "description": "One broadcast with its status and counters.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "broadcast_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "broadcast_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_broadcast_recipients",
      "title": "List the recipients of a broadcast",
      "description": "The communities targeted by a broadcast and the outcome for each.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "broadcast_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "page": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 10000
          }
        },
        "required": [
          "broadcast_id",
          "page"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "create_broadcast",
      "title": "Send or schedule a broadcast",
      "description": "Sends one message (text, media or poll; never a community update) to up to 200 communities now or at a date (8 per day). Targets are `whatsapp_id`s from list_communities. This reaches real people: show the user the exact text and targets and get a yes before calling.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "community_whatsapp_ids": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video",
              "voice",
              "document",
              "poll"
            ]
          },
          "text": {
            "type": "string",
            "maxLength": 10000
          },
          "media_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "poll": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "question": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "options": {
                    "minItems": 2,
                    "maxItems": 12,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    }
                  },
                  "select_count": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1
                      }
                    ]
                  }
                },
                "required": [
                  "question",
                  "options",
                  "select_count"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "scheduled_at_local": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2})?$"
          }
        },
        "required": [
          "community_whatsapp_ids",
          "type"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "cancel_broadcast",
      "title": "Cancel a scheduled broadcast",
      "description": "Cancels a broadcast that has not started sending.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "broadcast_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "broadcast_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_webhooks",
      "title": "List webhook endpoints",
      "description": "The account's webhook endpoints. Event types: member.joined (Someone joined a WhatsApp community of one of your events.); job.sent (A scheduled message was sent (all or part of its communities).); job.failed (A scheduled message failed for good (no more automatic retry).); community.created (A WhatsApp community was created for an occurrence.); community.full (A community reached its switch threshold; the next one takes over.); channel.disconnected (The WhatsApp number went offline and needs a new QR scan.); event.paused (An event was paused (through the API).); broadcast.completed (A broadcast finished (completed, failed or requires review).).",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "name": "create_webhook",
      "title": "Create a webhook endpoint",
      "description": "Registers an HTTPS URL to receive events (5 max). Returns the signing secret ONCE: give it to the user to store, never repeat it later.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 12,
            "maxLength": 2048,
            "pattern": "^https:\\/\\/\\S+$"
          },
          "events": {
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "member.joined",
                "job.sent",
                "job.failed",
                "community.created",
                "community.full",
                "channel.disconnected",
                "event.paused",
                "broadcast.completed"
              ]
            }
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          }
        },
        "required": [
          "url",
          "events"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "update_webhook",
      "title": "Change a webhook endpoint",
      "description": "Changes the URL, events or description; `enabled: false` pauses deliveries.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "changes": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "minLength": 12,
                "maxLength": 2048,
                "pattern": "^https:\\/\\/\\S+$"
              },
              "events": {
                "minItems": 1,
                "maxItems": 8,
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "member.joined",
                    "job.sent",
                    "job.failed",
                    "community.created",
                    "community.full",
                    "channel.disconnected",
                    "event.paused",
                    "broadcast.completed"
                  ]
                }
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "enabled": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "webhook_id",
          "changes"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "delete_webhook",
      "title": "Delete a webhook endpoint",
      "description": "Deletes an endpoint and its delivery history. Confirm with the user.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "webhook_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "rotate_webhook_secret",
      "title": "Rotate a webhook signing secret",
      "description": "Issues a new signing secret (shown once); the old one stops working immediately.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "webhook_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "test_webhook",
      "title": "Send a test delivery to a webhook",
      "description": "Posts a `webhook.test` envelope now and reports the first attempt (HTTP status).",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "webhook_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "list_webhook_deliveries",
      "title": "List the deliveries of a webhook",
      "description": "Recent deliveries of one endpoint with status, attempts and HTTP results (30 days).",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "limit": {
            "default": 50,
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "before": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "webhook_id",
          "limit"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_webhook",
      "title": "Get a webhook endpoint",
      "description": "One endpoint with its events and state.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "webhook_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "webhook_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_member_webhook",
      "title": "Get the member-join webhook of an event",
      "description": "The per-event webhook called when someone joins a community (legacy feature; prefer account webhooks with `member.joined`).",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_member_webhook",
      "title": "Set the member-join webhook of an event",
      "description": "Sets (or clears with null) the per-event member-join webhook URL. Returns the signing secret once when created.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "event_id",
          "url"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "rotate_member_webhook_secret",
      "title": "Rotate the member-join webhook secret",
      "description": "New signing secret for the per-event webhook, shown once.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "test_member_webhook",
      "title": "Test the member-join webhook",
      "description": "Sends a test delivery to the per-event webhook.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "get_backup_admin",
      "title": "Get the backup administrator of an event",
      "description": "Sensitive. The backup administrator (a second phone number added as admin of each community so the user keeps control if the main number is lost), with the state per community. Phone numbers are masked.",
      "scopes": [
        "read"
      ],
      "kind": "read",
      "read_only": true,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "set_backup_admin_default",
      "title": "Set the default backup administrator",
      "description": "Sensitive. Saves the default backup phone number of an event (E.164, must already be a saved WhatsApp contact of the main number). Does not change communities by itself: use preview_backup_admin then confirm_backup_admin.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "phone_e164": {
            "type": "string",
            "pattern": "^\\+[1-9][0-9]{7,14}$"
          },
          "expected_revision": {
            "default": null,
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "consent_confirmed": {
            "type": "boolean",
            "const": true
          },
          "contact_requirements_confirmed": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "event_id",
          "phone_e164",
          "expected_revision",
          "consent_confirmed",
          "contact_requirements_confirmed"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "preview_backup_admin",
      "title": "Preview a backup administrator change",
      "description": "Sensitive. Computes what `apply`, `retry`, `stop`, `enable_rule` or `stop_rule` would do on the chosen communities and returns a preview id valid a few minutes. Nothing changes yet.",
      "scopes": [
        "write"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": false,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "action": {
            "type": "string",
            "enum": [
              "apply",
              "retry",
              "stop",
              "enable_rule",
              "stop_rule"
            ]
          },
          "community_ids": {
            "maxItems": 250,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "target": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "manual_phone",
                  "event_default"
                ]
              },
              "phone_e164": {
                "type": "string",
                "pattern": "^\\+[1-9][0-9]{7,14}$"
              }
            },
            "required": [
              "source"
            ],
            "additionalProperties": false
          },
          "start_occurrence_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "required": [
          "event_id",
          "action"
        ],
        "additionalProperties": false
      }
    },
    {
      "name": "confirm_backup_admin",
      "title": "Confirm a backup administrator change",
      "description": "Sensitive, irreversible on WhatsApp: applies a previewed change (adds or removes an administrator in real communities). Show the preview to the user and get an explicit yes before calling.",
      "scopes": [
        "send"
      ],
      "kind": "write",
      "read_only": false,
      "destructive": true,
      "input_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "preview_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "consent_confirmed": {
            "type": "boolean",
            "const": true
          },
          "contact_requirements_confirmed": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "event_id",
          "preview_id",
          "consent_confirmed",
          "contact_requirements_confirmed"
        ],
        "additionalProperties": false
      }
    }
  ],
  "prompts": [
    {
      "name": "generate_sequence",
      "args": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "event_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Name of the webinar / live, as the audience knows it."
          },
          "live_day_time": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "When the live happens, e.g. 'Tuesday 20:00 Paris time' or 'every Sunday 18:00'."
          },
          "offer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 600,
            "description": "What is sold or promised at the end of the live (offer, price, deadline, bonus)."
          },
          "tone": {
            "description": "Voice: e.g. 'warm and direct, tutoiement', 'professional'. Defaults to the brand voice.",
            "type": "string",
            "maxLength": 120
          },
          "language": {
            "description": "ISO language of the messages (default: fr).",
            "type": "string",
            "maxLength": 10
          }
        },
        "required": [
          "event_name",
          "live_day_time",
          "offer"
        ],
        "additionalProperties": false
      }
    }
  ],
  "resources": [
    {
      "uri": "groupilot://docs/llms.txt",
      "mimeType": "text/plain"
    }
  ]
}