{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "api.chatwithhal.com",
    "site": "chatwithhal.com",
    "addresses": [
      {
        "address": "172.67.200.189",
        "endpoints": 3,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "172.67.192.0/20",
          "country": "US"
        }
      },
      {
        "address": "104.21.50.43",
        "endpoints": 3,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.21.32.0/19",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3037::ac43:c8bd",
        "endpoints": 3,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3037::/48",
          "country": "US"
        }
      },
      {
        "address": "2606:4700:3037::6815:322b",
        "endpoints": 3,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "2606:4700:3037::/48",
          "country": "US"
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "172.67.200.189",
          "104.21.50.43",
          "2606:4700:3037::ac43:c8bd",
          "2606:4700:3037::6815:322b"
        ],
        "first_seen": "2026-11-22T08:11:02.541Z",
        "last_seen": "2026-11-22T08:11:02.541Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "@chatwithhal/mcp",
      "version": "1.0.0",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000; includeSubDomains",
      "access-control-allow-origin": "*"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 2,
      "sample": [
        {
          "id": "12407",
          "url": "https://mailmergepdf.com/mcp",
          "server_name": "com.mailmergepdf/site",
          "last_state": "listed",
          "last_checked_at": "2026-11-22T15:23:03.888Z"
        },
        {
          "id": "22098",
          "url": "https://game.bluffnet.gg/mcp/play",
          "server_name": "gg.bluffnet/bluffnet",
          "last_state": "auth_required",
          "last_checked_at": "2026-11-21T13:04:01.379Z"
        }
      ]
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "com.chatwithhal",
      "total": 0,
      "sample": []
    },
    "same_repository": null,
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "7902",
    "server_name": "com.chatwithhal/mcp",
    "url": "https://api.chatwithhal.com/mcp",
    "host": "api.chatwithhal.com",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-22T08:11:02.541Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "1417d232b45494dc595d748add4216f676c13382285d6ed33ca0041a27f0fb90",
    "first_listed_at": "2026-11-21T07:39:01.366Z",
    "created_at": "2026-11-21T05:30:05.166Z",
    "resolved_addresses": [
      "172.67.200.189",
      "104.21.50.43",
      "2606:4700:3037::ac43:c8bd",
      "2606:4700:3037::6815:322b"
    ]
  },
  "server": {
    "name": "com.chatwithhal/mcp",
    "title": "HAL",
    "description": "Customer conversations, help center, CRM, deals and email campaigns on HAL (chatwithhal.com).",
    "version": "1.0.0",
    "registry_status": "active",
    "repository_url": null,
    "website_url": "https://chatwithhal.com/docs/mcp",
    "published_at": "2026-10-30T13:10:20.419Z",
    "updated_at": "2026-10-30T13:10:20.419Z",
    "first_seen": "2026-11-21T05:30:04.148Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:04:14.558Z"
  },
  "operator": {
    "key": "chatwithhal.com",
    "name": "chatwithhal.com",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 2,
    "answered": 2,
    "answered_percent": 100,
    "avg_listing_latency_ms": 647,
    "first_check_in_window": "2026-11-21T07:39:01.366Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "1417d232b45494dc595d748add4216f676c13382285d6ed33ca0041a27f0fb90",
    "tools": 136,
    "resources": 0,
    "prompts": 0,
    "first_seen": "2026-11-21T07:39:02.000Z",
    "tool_names": [
      "list_projects",
      "list_conversations",
      "get_conversation",
      "get_conversation_image",
      "set_typing",
      "reply_to_conversation",
      "update_conversation",
      "generate_ai_response_suggestion",
      "list_article_groups",
      "create_article_group",
      "update_article_group",
      "list_articles",
      "find_relevant_articles",
      "get_article",
      "create_article",
      "update_article",
      "delete_contact",
      "list_contacts",
      "get_contact",
      "create_contact",
      "update_contact",
      "delete_company",
      "list_crm_stages",
      "list_companies",
      "list_companies_by_stage",
      "get_company",
      "link_contact_to_company",
      "create_company",
      "update_company",
      "merge_companies",
      "list_deals",
      "get_deal_pipeline",
      "get_deal",
      "create_deal",
      "update_deal",
      "set_deal_contact",
      "remove_deal_contact",
      "delete_deal",
      "get_email_capabilities_overview",
      "list_email_templates",
      "get_email_template",
      "create_email_template",
      "update_email_template",
      "delete_email_template",
      "preview_email_template",
      "validate_email_template",
      "send_test_email_template",
      "send_test_email_campaign",
      "list_email_suppressions",
      "suppress_email_recipient",
      "unsuppress_email_recipient",
      "get_email_unsubscribe_status",
      "list_email_campaigns",
      "get_email_campaign",
      "list_event_names",
      "list_custom_properties",
      "create_email_campaign",
      "update_email_campaign",
      "enable_email_campaign",
      "disable_email_campaign",
      "delete_email_campaign",
      "list_email_campaign_runs",
      "get_email_campaign_run",
      "list_email_categories",
      "update_email_categories",
      "list_email_images",
      "upload_email_image",
      "delete_email_image",
      "list_broadcasts",
      "get_broadcast",
      "create_broadcast",
      "update_broadcast",
      "delete_broadcast",
      "preview_broadcast_audience",
      "get_broadcast_audience_fields",
      "send_test_broadcast_email",
      "schedule_broadcast",
      "send_broadcast_now",
      "cancel_broadcast",
      "list_broadcast_recipients",
      "get_broadcast_readiness",
      "resume_broadcast",
      "select_broadcast_ab_winner",
      "get_email_deliverability",
      "update_email_postal_address",
      "reset_email_deliverability_health",
      "get_workflow_builder_reference",
      "list_workflows",
      "get_workflow",
      "validate_workflow",
      "create_workflow",
      "update_workflow",
      "delete_workflow",
      "set_workflow_enabled",
      "reorder_workflows",
      "list_workflow_executions",
      "get_workflow_execution",
      "get_workflow_email_defaults",
      "update_workflow_email_defaults",
      "send_test_workflow_email"
    ],
    "declared": {
      "tools": [
        {
          "name": "list_projects",
          "description": "List projects available to this MCP key. Call this first, then get_email_capabilities_overview for email features.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "List projects",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_conversations",
          "description": "List conversations with filters (status, spam, limit, offset). Each result says whether it is marked as spam.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "spam": {
                "enum": [
                  "all",
                  "exclude",
                  "only"
                ],
                "type": "string",
                "default": "all",
                "description": "Spam filter: \"exclude\" hides spam like the inbox, \"only\" lists spam to review"
              },
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Max results to return"
              },
              "offset": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Offset for pagination"
              },
              "status": {
                "enum": [
                  "open",
                  "resolved",
                  "all"
                ],
                "type": "string",
                "default": "open",
                "description": "Filter by status"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List conversations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_conversation",
          "description": "Get a conversation with its messages and attachment metadata. agents_typing lists teammates drafting a reply right now; if someone is, let them answer instead of replying over them. replied_to_email is set when the conversation started as a reply to a campaign, workflow or broadcast email. Call get_conversation_image with an image attachment ID to inspect its visual content. To incorporate HAL's own evidence-backed AI draft into your final answer, call generate_ai_response_suggestion next.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation ID"
              }
            }
          },
          "annotations": {
            "title": "Get conversation",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_conversation_image",
          "description": "Get an image attached to a conversation message as MCP image content so the AI client can inspect it. Images over 2 MB are resized and compressed before delivery. Use an attachment ID returned by get_conversation.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "attachment_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "attachment_id": {
                "type": "string",
                "description": "The image attachment ID returned by get_conversation"
              }
            }
          },
          "annotations": {
            "title": "Get conversation image",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_typing",
          "description": "Show the visitor and your teammates in the dashboard that a reply is being written. Call it right before you draft a reply the visitor will read, so a live agent sees the conversation is being handled. Do not call it for internal notes, for reading or summarizing, or when you are not going to reply. reply_to_conversation clears it; call again with is_typing false if you decide not to reply.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "is_typing": {
                "type": "boolean",
                "default": true,
                "description": "true while you draft the reply, false to clear it without replying"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation ID"
              },
              "duration_seconds": {
                "type": "integer",
                "default": 60,
                "maximum": 120,
                "minimum": 5,
                "description": "Clear the indicator after this many seconds if no reply is sent"
              }
            }
          },
          "annotations": {
            "title": "Set typing",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "reply_to_conversation",
          "description": "Send an agent message to a conversation. To show a help article to the visitor, write `[label](hal-article:<article id or slug>)` into the `content` of reply_to_conversation. The widget renders it as a clickable card at that spot, on its own line (it is not an inline link inside a sentence), so put it between sentences or paragraphs, e.g. \"Refunds take 5 days.\\n[Refund policy](hal-article:refund-policy)\\nAnything else?\". The label is the card title, so use the article title. Several cards in one reply are fine. Only published articles the visitor may see are accepted; each reference is checked and rewritten to the slug for the visitor's language. Find the right article with find_relevant_articles (matched to the conversation, or to your own query), or list_articles with published_only. To walk the visitor through a flow, pass `offer_guide_id` instead of writing guide markup. To send files, pass `attachments`; they are delivered with the message in the widget and in email replies.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "content": {
                "type": "string",
                "default": "",
                "description": "The message content. May contain article cards as `[label](hal-article:<article id or slug>)`, each on its own line where it belongs in the reply. May be empty when sending attachments."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "filename",
                    "mime_type",
                    "data_base64"
                  ],
                  "properties": {
                    "filename": {
                      "type": "string",
                      "pattern": "^[^\\x00-\\x1f\\x7f]+$",
                      "maxLength": 255,
                      "minLength": 1,
                      "description": "File name shown to the visitor, e.g. \"invoice.pdf\""
                    },
                    "mime_type": {
                      "type": "string",
                      "description": "image/jpeg, image/png, image/gif, image/webp, application/pdf, Word (.doc/.docx), Excel (.xls/.xlsx), application/xml, text/plain, text/csv, or application/zip"
                    },
                    "data_base64": {
                      "type": "string",
                      "maxLength": 14349194,
                      "description": "Base64-encoded file bytes, max 10MB decoded"
                    }
                  }
                },
                "maxItems": 5,
                "description": "Files to attach to the message (max 5)"
              },
              "is_internal": {
                "type": "boolean",
                "default": false,
                "description": "Whether this is an internal note (not visible to visitor)"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "offer_guide_id": {
                "type": "string",
                "description": "Offer a guide below the message. The visitor gets a button that walks them through it on the page. Use a manual, enabled guide with a title (see list_guides). Do not write the guide markup into `content` by hand."
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation ID"
              }
            }
          },
          "annotations": {
            "title": "Reply to conversation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "update_conversation",
          "description": "Update conversation status, assignment, snooze state, or spam. is_spam true does what \"Mark as spam\" does in the inbox: the conversation leaves the inbox, is marked read, and the same sender's next conversations in this project go straight to spam; is_spam false undoes it and lets the sender back in. The change is recorded in the conversation's activity as done via MCP. Use list_conversations with spam \"only\" to review spam.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "status": {
                "enum": [
                  "open",
                  "resolved"
                ],
                "type": "string",
                "description": "New status"
              },
              "is_spam": {
                "type": "boolean",
                "description": "true to mark the conversation as spam, false to unmark it"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "snoozed_until": {
                "anyOf": [
                  {
                    "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": "null"
                  }
                ],
                "description": "ISO 8601 time to snooze until (null to unsnooze)"
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation ID"
              },
              "assigned_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "User ID to assign (null to unassign)"
              }
            }
          },
          "annotations": {
            "title": "Update conversation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "generate_ai_response_suggestion",
          "description": "Generate an advisory-only HAL AI reply suggestion for the latest visitor message. Call this after get_conversation, then combine HAL's draft, evidence, and confidence with the conversation messages when composing your final answer. This tool never sends a message to the visitor, even when project auto-send or AI deflection is enabled.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation ID"
              }
            }
          },
          "annotations": {
            "title": "Generate ai response suggestion",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_article_groups",
          "description": "List all article groups",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List article groups",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_article_group",
          "description": "Create a new article group",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "slug"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Group name"
              },
              "slug": {
                "type": "string",
                "description": "URL-friendly slug"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "description": {
                "type": "string",
                "description": "Group description"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "show_in_helpdesk": {
                "type": "boolean",
                "description": "Whether to show this group in the helpdesk (defaults to true)"
              }
            }
          },
          "annotations": {
            "title": "Create article group",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_article_group",
          "description": "Update an article group",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "group_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New name"
              },
              "slug": {
                "type": "string",
                "description": "New slug"
              },
              "group_id": {
                "type": "string",
                "description": "The group ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "sort_order": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "New display order"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New description"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "show_in_helpdesk": {
                "type": "boolean",
                "description": "Whether to show this group in the helpdesk"
              }
            }
          },
          "annotations": {
            "title": "Update article group",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_articles",
          "description": "List articles, optionally filtered by group or to published ones. To show a help article to the visitor, write `[label](hal-article:<article id or slug>)` into the `content` of reply_to_conversation. The widget renders it as a clickable card at that spot, on its own line (it is not an inline link inside a sentence), so put it between sentences or paragraphs, e.g. \"Refunds take 5 days.\\n[Refund policy](hal-article:refund-policy)\\nAnything else?\". The label is the card title, so use the article title. Several cards in one reply are fine. Only published articles the visitor may see are accepted; each reference is checked and rewritten to the slug for the visitor's language. Find the right article with find_relevant_articles (matched to the conversation, or to your own query), or list_articles with published_only.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "group_id": {
                "type": "string",
                "description": "Filter by group ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "published_only": {
                "type": "boolean",
                "description": "Only published articles, the ones that can be shared with a visitor"
              }
            }
          },
          "annotations": {
            "title": "List articles",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "find_relevant_articles",
          "description": "Find published help articles that fit a conversation, in the visitor's language and limited to ones this visitor may see. Matches the visitor's latest message, or `query` when given. Returns up to 6, best match first; weaker results can be only loosely related, so check the title and excerpt before sharing one. Read-only; uses no AI quota. Each result has `insert`, the exact markup to put in the reply. To show a help article to the visitor, write `[label](hal-article:<article id or slug>)` into the `content` of reply_to_conversation. The widget renders it as a clickable card at that spot, on its own line (it is not an inline link inside a sentence), so put it between sentences or paragraphs, e.g. \"Refunds take 5 days.\\n[Refund policy](hal-article:refund-policy)\\nAnything else?\". The label is the card title, so use the article title. Several cards in one reply are fine. Only published articles the visitor may see are accepted; each reference is checked and rewritten to the slug for the visitor's language. Find the right article with find_relevant_articles (matched to the conversation, or to your own query), or list_articles with published_only.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversation_id"
            ],
            "properties": {
              "query": {
                "type": "string",
                "description": "What to look for, e.g. 'refund policy'. Defaults to the visitor's latest message."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "conversation_id": {
                "type": "string",
                "description": "The conversation to find articles for"
              }
            }
          },
          "annotations": {
            "title": "Find relevant articles",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_article",
          "description": "Get an article with translations",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "article_id"
            ],
            "properties": {
              "article_id": {
                "type": "string",
                "description": "The article ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get article",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_article",
          "description": "Create an article with an initial translation",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "slug",
              "title",
              "content"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "description": "URL-friendly slug"
              },
              "title": {
                "type": "string",
                "description": "Article title"
              },
              "locale": {
                "type": "string",
                "default": "en",
                "description": "Locale for the initial translation"
              },
              "content": {
                "type": "string",
                "description": "Article content (Markdown)"
              },
              "group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Group ID (null for ungrouped)"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "show_in_helpdesk": {
                "type": "boolean",
                "description": "Whether to show this article in the helpdesk (defaults to true)"
              }
            }
          },
          "annotations": {
            "title": "Create article",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_article",
          "description": "Update article properties or upsert a translation",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "article_id"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "description": "New slug"
              },
              "title": {
                "type": "string",
                "description": "Translation title (requires locale)"
              },
              "locale": {
                "type": "string",
                "description": "Locale to upsert translation for"
              },
              "content": {
                "type": "string",
                "description": "Translation content in Markdown (requires locale)"
              },
              "group_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New group ID (null for ungrouped)"
              },
              "article_id": {
                "type": "string",
                "description": "The article ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "sort_order": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "New display order"
              },
              "is_published": {
                "type": "boolean",
                "description": "Publish/unpublish"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "show_in_helpdesk": {
                "type": "boolean",
                "description": "Whether to show in the helpdesk"
              }
            }
          },
          "annotations": {
            "title": "Update article",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_contact",
          "description": "Permanently delete a contact. Without confirm: true it only returns a preview of what would be removed. Deletes the contact with its deal links, company links and tracked email threads; its conversations stay, with their visitors made anonymous. Cannot be undone.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contact_id"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "true to delete. Omit to get a preview and change nothing."
              },
              "contact_id": {
                "type": "string",
                "description": "The contact ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_contacts",
          "description": "List contacts with optional search",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Max results"
              },
              "offset": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Offset for pagination"
              },
              "search": {
                "type": "string",
                "description": "Search by name or email"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List contacts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_contact",
          "description": "Get a contact with full details, recent activity and the deals they are on",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contact_id"
            ],
            "properties": {
              "contact_id": {
                "type": "string",
                "description": "The contact ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get contact",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_contact",
          "description": "Create a new contact",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "name": {
                "type": "string",
                "description": "Contact name"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags"
              },
              "email": {
                "type": "string",
                "description": "Contact email"
              },
              "notes": {
                "type": "string",
                "description": "Notes"
              },
              "phone": {
                "type": "string",
                "description": "Contact phone"
              },
              "metadata": {
                "type": "object",
                "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object on write.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ]
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Create contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_contact",
          "description": "Update a contact",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contact_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New name"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "New tags"
              },
              "email": {
                "type": "string",
                "description": "New email"
              },
              "notes": {
                "type": "string",
                "description": "New notes"
              },
              "phone": {
                "type": "string",
                "description": "New phone"
              },
              "metadata": {
                "anyOf": [
                  {
                    "type": "object",
                    "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object on write.",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object when set. Pass null or {} to clear."
              },
              "contact_id": {
                "type": "string",
                "description": "The contact ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Update contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_company",
          "description": "Permanently delete a company. Without confirm: true it only returns a preview of what would be removed. Deletes the company with its deals and contact links; its contacts stay. Cannot be undone.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "company_id"
            ],
            "properties": {
              "confirm": {
                "type": "boolean",
                "description": "true to delete. Omit to get a preview and change nothing."
              },
              "company_id": {
                "type": "string",
                "description": "The company ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete company",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_crm_stages",
          "description": "List CRM pipeline stages",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List crm stages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_companies",
          "description": "List companies with optional search and stage filter. Includes companies with no linked contacts. Paginated.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 100,
                "minimum": 1,
                "description": "Max results"
              },
              "offset": {
                "type": "number",
                "default": 0,
                "minimum": 0,
                "description": "Offset for pagination"
              },
              "search": {
                "type": "string",
                "description": "Search by name or notes"
              },
              "stage_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Filter by CRM stage ID. Pass null for unstaged companies only."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List companies",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_companies_by_stage",
          "description": "Read-only CRM board: list ALL companies grouped by pipeline stage, including companies with no linked contacts and unstaged companies. Returns per-stage deal totals so agents can reconcile Won totals with company rows. Company stage and deal value mirror the company primary deal; use list_deals to see every deal, including expansions and renewals.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "stage_id": {
                "type": "string",
                "description": "Optional: only include companies in this stage. Omits unstaged when set."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "stage_name": {
                "type": "string",
                "description": "Optional: filter by stage name (case-insensitive, e.g. \"Won\"). Omits unstaged when set. Do not combine with stage_id."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "include_unstaged": {
                "type": "boolean",
                "default": true,
                "description": "Include companies with no stage. Default true. Ignored when stage_id or stage_name is set."
              }
            }
          },
          "annotations": {
            "title": "List companies by stage",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_company",
          "description": "Get a company with contacts, details and its deals. The company stage and deal_value mirror its primary deal.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string",
                "description": "The company ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get company",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "link_contact_to_company",
          "description": "Link an existing contact to an existing company. The operation is idempotent and both records must belong to the selected project.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contact_id",
              "company_id"
            ],
            "properties": {
              "company_id": {
                "type": "string",
                "description": "The company ID"
              },
              "contact_id": {
                "type": "string",
                "description": "The contact ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Link contact to company",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "create_company",
          "description": "Create a new company",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Company name"
              },
              "notes": {
                "type": "string",
                "description": "Notes"
              },
              "domain": {
                "type": "string",
                "description": "Company domain"
              },
              "industry": {
                "type": "string",
                "description": "Industry"
              },
              "metadata": {
                "type": "object",
                "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object on write.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ]
                }
              },
              "stage_id": {
                "type": "string",
                "description": "CRM stage ID"
              },
              "deal_value": {
                "type": "number",
                "description": "Deal value"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Create company",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_company",
          "description": "Update a company",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "company_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New name"
              },
              "notes": {
                "type": "string",
                "description": "New notes"
              },
              "domain": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New domain"
              },
              "industry": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New industry"
              },
              "metadata": {
                "anyOf": [
                  {
                    "type": "object",
                    "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object on write.",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Flat custom metadata (max 50 keys, 10KB). Values: string, number, boolean, or null. Replaces entire object when set. Pass null or {} to clear."
              },
              "stage_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New stage ID"
              },
              "company_id": {
                "type": "string",
                "description": "The company ID"
              },
              "deal_value": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "New deal value"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Update company",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "merge_companies",
          "description": "Merge a duplicate company into a keeper. Contacts, tracked events, and CRM timeline move to the keeper; the source company is deleted. Use when the same org has a HAL-generated row and a later source-system (e.g. Apollo) id row. Refuses to merge companies that already have different external ids.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "keeper_company_id",
              "source_company_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "keeper_company_id": {
                "type": "string",
                "description": "Company to keep. Prefer the older row when hydrating a source-system id."
              },
              "source_company_id": {
                "type": "string",
                "description": "Duplicate company to absorb and delete"
              }
            }
          },
          "annotations": {
            "title": "Merge companies",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_deals",
          "description": "List deals (sales opportunities). A company can have several deals: new business, expansion, renewal. Each deal has a stage, amount, expected close date, owner, next step and contacts. Filter by company, contact, stage, owner or status.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "default": 50,
                "maximum": 200,
                "minimum": 1
              },
              "offset": {
                "type": "number",
                "default": 0,
                "minimum": 0
              },
              "search": {
                "type": "string",
                "description": "Search deal and company names"
              },
              "status": {
                "enum": [
                  "open",
                  "won",
                  "lost"
                ],
                "type": "string"
              },
              "stage_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Pass null for deals with no stage"
              },
              "company_id": {
                "type": "string"
              },
              "contact_id": {
                "type": "string",
                "description": "Deals this contact takes part in"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "owner_user_id": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "List deals",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_deal_pipeline",
          "description": "Summarize the sales pipeline: per stage the number of deals, total and probability-weighted amount, plus open/won/lost totals, win rate and open deals whose expected close date has passed. Use list_deals for the deals themselves.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get deal pipeline",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_deal",
          "description": "Get a deal with its company, stage, contacts and stage/amount history",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deal_id"
            ],
            "properties": {
              "deal_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get deal",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_deal",
          "description": "Create a deal for a company. The company's own stage and value follow its primary deal (its newest open new-business deal).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "company_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Deal name. Defaults to the company name."
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal amount in the project's sales currency and value unit"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Where the deal came from, e.g. inbound, outbound, referral"
              },
              "contacts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "contact_id"
                  ],
                  "properties": {
                    "role": {
                      "anyOf": [
                        {
                          "enum": [
                            "decision_maker",
                            "champion",
                            "influencer",
                            "user",
                            "billing"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "contact_id": {
                      "type": "string"
                    }
                  }
                },
                "description": "People involved in the deal"
              },
              "stage_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "CRM stage ID (see list_crm_stages). A 100% stage means won, 0% means lost."
              },
              "deal_type": {
                "enum": [
                  "new_business",
                  "expansion",
                  "renewal"
                ],
                "type": "string",
                "description": "new_business, expansion or renewal"
              },
              "next_step": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The next action to move the deal"
              },
              "company_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "lost_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the deal was lost. Kept only while the deal is in a lost stage."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "owner_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "User who owns the deal"
              },
              "next_step_due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO 8601 date, e.g. 2026-12-31. Pass null to clear."
              },
              "expected_close_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO 8601 date, e.g. 2026-12-31. Pass null to clear."
              }
            }
          },
          "annotations": {
            "title": "Create deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_deal",
          "description": "Update a deal. Moving it to a 100% stage marks it won and a 0% stage marks it lost (pass lost_reason); moving it back to an open stage reopens it.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deal_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Deal name. Defaults to the company name."
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal amount in the project's sales currency and value unit"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Where the deal came from, e.g. inbound, outbound, referral"
              },
              "deal_id": {
                "type": "string"
              },
              "stage_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "CRM stage ID (see list_crm_stages). A 100% stage means won, 0% means lost."
              },
              "deal_type": {
                "enum": [
                  "new_business",
                  "expansion",
                  "renewal"
                ],
                "type": "string",
                "description": "new_business, expansion or renewal"
              },
              "next_step": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The next action to move the deal"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "lost_reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why the deal was lost. Kept only while the deal is in a lost stage."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "owner_user_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "User who owns the deal"
              },
              "next_step_due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO 8601 date, e.g. 2026-12-31. Pass null to clear."
              },
              "expected_close_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO 8601 date, e.g. 2026-12-31. Pass null to clear."
              }
            }
          },
          "annotations": {
            "title": "Update deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "set_deal_contact",
          "description": "Add a contact to a deal, or change their role on it",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deal_id",
              "contact_id"
            ],
            "properties": {
              "role": {
                "anyOf": [
                  {
                    "enum": [
                      "decision_maker",
                      "champion",
                      "influencer",
                      "user",
                      "billing"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "default": null
              },
              "deal_id": {
                "type": "string"
              },
              "contact_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Set deal contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "remove_deal_contact",
          "description": "Remove a contact from a deal",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deal_id",
              "contact_id"
            ],
            "properties": {
              "deal_id": {
                "type": "string"
              },
              "contact_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Remove deal contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_deal",
          "description": "Delete a deal. A company with no deals left drops out of the pipeline.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "deal_id"
            ],
            "properties": {
              "deal_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_email_capabilities_overview",
          "description": "Orientation for HAL email features: campaigns vs workflows vs broadcasts, templates vs project defaults vs inline design, sender domains, images, test sending, track_event, and unsubscribe/suppression. Call this before creating any campaign, workflow, broadcast, or template.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "annotations": {
            "title": "Get email capabilities overview",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_email_templates",
          "description": "List reusable workflow email templates for a project.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email templates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_email_template",
          "description": "Get a reusable workflow email template.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "template_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get email template",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_email_template",
          "description": "New to HAL email? Call get_email_capabilities_overview first. Create a reusable workflow email template.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "subject"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              },
              "preheader": {
                "type": "string",
                "description": "Email preheader"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                },
                "description": "Structured email document"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Create email template",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_email_template",
          "description": "Update a reusable workflow email template.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "template_id"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "subject": {
                "type": "string"
              },
              "preheader": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                }
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update email template",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_email_template",
          "description": "Delete a reusable workflow email template. Existing campaigns keep their embedded copy.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "template_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete email template",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "preview_email_template",
          "description": "Render an email template preview as subject, preheader, HTML, and plain text.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              },
              "preheader": {
                "type": "string",
                "description": "Email preheader"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "workflow_name": {
                "type": "string"
              },
              "sample_context": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": "string"
                  },
                  "visitor_name": {
                    "type": "string"
                  },
                  "company_stage": {
                    "type": "string"
                  },
                  "visitor_email": {
                    "type": "string"
                  },
                  "visitor_user_id": {
                    "type": "string"
                  },
                  "browser_language": {
                    "type": "string"
                  },
                  "company_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "contact_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "visitor_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "company_contact_count": {
                    "type": "number"
                  }
                }
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                },
                "description": "Structured email document"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Preview email template",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_email_template",
          "description": "Validate an email template and return AI-client-friendly errors.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              },
              "preheader": {
                "type": "string",
                "description": "Email preheader"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                },
                "description": "Structured email document"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Validate email template",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "send_test_email_template",
          "description": "Send a workflow email template test to an account user email address only.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "to_email"
            ],
            "properties": {
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              },
              "to_email": {
                "type": "string",
                "description": "Recipient email. Must belong to a user on this account."
              },
              "preheader": {
                "type": "string",
                "description": "Email preheader"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "workflow_name": {
                "type": "string"
              },
              "sample_context": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": "string"
                  },
                  "visitor_name": {
                    "type": "string"
                  },
                  "company_stage": {
                    "type": "string"
                  },
                  "visitor_email": {
                    "type": "string"
                  },
                  "visitor_user_id": {
                    "type": "string"
                  },
                  "browser_language": {
                    "type": "string"
                  },
                  "company_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "contact_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "visitor_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "company_contact_count": {
                    "type": "number"
                  }
                }
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                },
                "description": "Structured email document"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Send test email template",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_test_email_campaign",
          "description": "Send a test email for an existing email campaign to an account user email address only.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id",
              "to_email"
            ],
            "properties": {
              "to_email": {
                "type": "string",
                "description": "Recipient email. Must belong to a user on this account."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "sample_context": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": "string"
                  },
                  "visitor_name": {
                    "type": "string"
                  },
                  "company_stage": {
                    "type": "string"
                  },
                  "visitor_email": {
                    "type": "string"
                  },
                  "visitor_user_id": {
                    "type": "string"
                  },
                  "browser_language": {
                    "type": "string"
                  },
                  "company_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "contact_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "visitor_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "company_contact_count": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "annotations": {
            "title": "Send test email campaign",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_email_suppressions",
          "description": "List email addresses suppressed for lifecycle email campaigns in a project.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "default": 25,
                "maximum": 100,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "reason": {
                "enum": [
                  "manual",
                  "unsubscribe",
                  "bounce",
                  "complaint"
                ],
                "type": "string",
                "default": "manual"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email suppressions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "suppress_email_recipient",
          "description": "Suppress an email address so lifecycle email campaigns skip it. Defaults to category \"all\" (blocks everything); pass a specific category key (see list_email_categories) to block only that category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "email"
            ],
            "properties": {
              "note": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "reason": {
                "enum": [
                  "manual",
                  "unsubscribe",
                  "bounce",
                  "complaint"
                ],
                "type": "string",
                "default": "manual"
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories), or \"all\" for every category"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Suppress email recipient",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "unsuppress_email_recipient",
          "description": "Remove an email address from the lifecycle email suppression list. Omit category to lift every suppression on the address (bounce/complaint rows are never removed); pass category to lift only that one.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories), or \"all\" for every category"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Unsuppress email recipient",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_email_unsubscribe_status",
          "description": "Check whether an email address is currently suppressed for lifecycle email campaigns, for a given category (default \"all\").",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "email"
            ],
            "properties": {
              "email": {
                "type": "string"
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories), or \"all\" for every category"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get email unsubscribe status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_email_campaigns",
          "description": "List email campaigns backed by visitor workflows.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email campaigns",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_email_campaign",
          "description": "Get email campaign details.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get email campaign",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_event_names",
          "description": "List tracked lifecycle event names seen in a project.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 100,
                "minimum": 1
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List event names",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_custom_properties",
          "description": "List visitor custom properties and sampled metadata keys available for campaign predicates and conditions.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "company_sample_limit": {
                "type": "integer",
                "default": 100,
                "maximum": 250,
                "minimum": 1
              }
            }
          },
          "annotations": {
            "title": "List custom properties",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_email_campaign",
          "description": "New to HAL email? Call get_email_capabilities_overview first. Create an email campaign using campaign language instead of workflow graph internals.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "trigger"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean",
                "default": false
              },
              "trigger": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "enum": [
                      "first_seen",
                      "event",
                      "property_match",
                      "page_visit",
                      "no_event_after"
                    ],
                    "type": "string"
                  },
                  "scope": {
                    "enum": [
                      "visitor",
                      "contact",
                      "company",
                      "custom_key"
                    ],
                    "type": "string"
                  },
                  "pattern": {
                    "type": "string",
                    "description": "URL pattern for page_visit campaigns"
                  },
                  "operator": {
                    "enum": [
                      "and",
                      "or"
                    ],
                    "type": "string",
                    "description": "Predicate join for property_match"
                  },
                  "custom_key": {
                    "type": "string"
                  },
                  "event_name": {
                    "type": "string",
                    "description": "Lifecycle event name for event campaigns"
                  },
                  "match_type": {
                    "enum": [
                      "contains",
                      "starts_with",
                      "exact"
                    ],
                    "type": "string"
                  },
                  "predicates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "field",
                        "value_type",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "source": {
                          "enum": [
                            "builtin",
                            "custom",
                            "visitor",
                            "contact",
                            "company",
                            "event"
                          ],
                          "type": "string",
                          "default": "custom"
                        },
                        "operator": {
                          "enum": [
                            "is_true",
                            "is_false",
                            "exists",
                            "not_exists",
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "greater_than",
                            "greater_than_or_equal",
                            "less_than",
                            "less_than_or_equal"
                          ],
                          "type": "string",
                          "description": "Condition operator"
                        },
                        "value_type": {
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "enum"
                          ],
                          "type": "string"
                        },
                        "custom_property_id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "anchor_event": {
                    "type": "string",
                    "description": "Anchor lifecycle event for no_event_after campaigns"
                  },
                  "missing_event": {
                    "type": "string",
                    "description": "Missing lifecycle event for no_event_after campaigns"
                  },
                  "within_seconds": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "exclusiveMinimum": 0
                  }
                }
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time",
                  "every_30_days",
                  "every_60_days",
                  "every_90_days"
                ],
                "type": "string",
                "default": "once_ever"
              },
              "conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "field",
                    "operator"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "description": "Built-in campaign condition field or metadata field prefix"
                    },
                    "value": {
                      "type": "string",
                      "description": "Condition value for operators that need one"
                    },
                    "operator": {
                      "enum": [
                        "is_true",
                        "is_false",
                        "exists",
                        "not_exists",
                        "equals",
                        "not_equals",
                        "contains",
                        "not_contains",
                        "starts_with",
                        "greater_than",
                        "greater_than_or_equal",
                        "less_than",
                        "less_than_or_equal"
                      ],
                      "type": "string",
                      "description": "Condition operator"
                    }
                  }
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "template_id": {
                "type": "string"
              },
              "email_design": {
                "type": "object",
                "required": [
                  "subject"
                ],
                "properties": {
                  "theme": {
                    "type": "object",
                    "properties": {
                      "dark": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Defaults to false (light only, no dark overrides emitted)"
                          },
                          "link_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "text_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "border_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "heading_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "primary_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "canvas_background": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "content_background": {
                            "type": "string",
                            "description": "Hex color"
                          }
                        },
                        "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                      },
                      "shadow": {
                        "enum": [
                          "none",
                          "sm",
                          "md"
                        ],
                        "type": "string"
                      },
                      "spacing": {
                        "enum": [
                          "compact",
                          "regular",
                          "spacious"
                        ],
                        "type": "string",
                        "description": "Scales block margins and card padding. Defaults to \"regular\"."
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "font_family": {
                        "enum": [
                          "system",
                          "serif",
                          "mono",
                          "georgia",
                          "helvetica"
                        ],
                        "type": "string"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_style": {
                        "enum": [
                          "none",
                          "subtle",
                          "strong"
                        ],
                        "type": "string"
                      },
                      "button_style": {
                        "enum": [
                          "filled",
                          "outline"
                        ],
                        "type": "string",
                        "description": "Defaults to \"filled\"."
                      },
                      "button_radius": {
                        "enum": [
                          "square",
                          "rounded",
                          "pill"
                        ],
                        "type": "string",
                        "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                      },
                      "content_width": {
                        "enum": [
                          "narrow",
                          "regular",
                          "wide"
                        ],
                        "type": "string"
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_scale": {
                        "enum": [
                          "regular",
                          "large"
                        ],
                        "type": "string",
                        "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "button_border_width": {
                        "enum": [
                          "regular",
                          "thin"
                        ],
                        "type": "string",
                        "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                      }
                    }
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "description": "Shortcut for template_document.blocks"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Email subject"
                  },
                  "preheader": {
                    "type": "string",
                    "description": "Email preheader"
                  },
                  "template_document": {
                    "type": "object",
                    "required": [
                      "blocks"
                    ],
                    "properties": {
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        }
                      },
                      "version": {
                        "type": "number",
                        "const": 1,
                        "default": 1
                      }
                    },
                    "description": "Structured email document"
                  }
                }
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "delay_seconds": {
                "type": "number",
                "default": 0,
                "minimum": 0
              },
              "email_category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "Defaults to \"marketing\" if omitted"
              },
              "skip_unengaged": {
                "type": "boolean",
                "description": "Skip contacts who received 5+ emails in the last 180 days without opening, clicking or replying to any (the sunset rule broadcasts use). Ignored for categories people cannot unsubscribe from. Default false."
              },
              "frequency_scope": {
                "enum": [
                  "visitor",
                  "contact",
                  "company",
                  "custom_key"
                ],
                "type": "string",
                "default": "visitor"
              },
              "next_campaign_id": {
                "type": "string",
                "description": "Optional campaign id to trigger after this campaign email is sent"
              },
              "custom_frequency_key": {
                "type": "string"
              },
              "reevaluate_conditions_at_send": {
                "type": "boolean",
                "default": false
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Create email campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_email_campaign",
          "description": "Update an email campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "trigger": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "enum": [
                      "first_seen",
                      "event",
                      "property_match",
                      "page_visit",
                      "no_event_after"
                    ],
                    "type": "string"
                  },
                  "scope": {
                    "enum": [
                      "visitor",
                      "contact",
                      "company",
                      "custom_key"
                    ],
                    "type": "string"
                  },
                  "pattern": {
                    "type": "string",
                    "description": "URL pattern for page_visit campaigns"
                  },
                  "operator": {
                    "enum": [
                      "and",
                      "or"
                    ],
                    "type": "string",
                    "description": "Predicate join for property_match"
                  },
                  "custom_key": {
                    "type": "string"
                  },
                  "event_name": {
                    "type": "string",
                    "description": "Lifecycle event name for event campaigns"
                  },
                  "match_type": {
                    "enum": [
                      "contains",
                      "starts_with",
                      "exact"
                    ],
                    "type": "string"
                  },
                  "predicates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "field",
                        "value_type",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "source": {
                          "enum": [
                            "builtin",
                            "custom",
                            "visitor",
                            "contact",
                            "company",
                            "event"
                          ],
                          "type": "string",
                          "default": "custom"
                        },
                        "operator": {
                          "enum": [
                            "is_true",
                            "is_false",
                            "exists",
                            "not_exists",
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "greater_than",
                            "greater_than_or_equal",
                            "less_than",
                            "less_than_or_equal"
                          ],
                          "type": "string",
                          "description": "Condition operator"
                        },
                        "value_type": {
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "enum"
                          ],
                          "type": "string"
                        },
                        "custom_property_id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "anchor_event": {
                    "type": "string",
                    "description": "Anchor lifecycle event for no_event_after campaigns"
                  },
                  "missing_event": {
                    "type": "string",
                    "description": "Missing lifecycle event for no_event_after campaigns"
                  },
                  "within_seconds": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "exclusiveMinimum": 0
                  }
                }
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time",
                  "every_30_days",
                  "every_60_days",
                  "every_90_days"
                ],
                "type": "string",
                "default": "once_ever"
              },
              "conditions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "field",
                    "operator"
                  ],
                  "properties": {
                    "field": {
                      "type": "string",
                      "description": "Built-in campaign condition field or metadata field prefix"
                    },
                    "value": {
                      "type": "string",
                      "description": "Condition value for operators that need one"
                    },
                    "operator": {
                      "enum": [
                        "is_true",
                        "is_false",
                        "exists",
                        "not_exists",
                        "equals",
                        "not_equals",
                        "contains",
                        "not_contains",
                        "starts_with",
                        "greater_than",
                        "greater_than_or_equal",
                        "less_than",
                        "less_than_or_equal"
                      ],
                      "type": "string",
                      "description": "Condition operator"
                    }
                  }
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "template_id": {
                "type": "string"
              },
              "email_design": {
                "type": "object",
                "required": [
                  "subject"
                ],
                "properties": {
                  "theme": {
                    "type": "object",
                    "properties": {
                      "dark": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "description": "Defaults to false (light only, no dark overrides emitted)"
                          },
                          "link_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "text_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "border_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "heading_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "primary_color": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "canvas_background": {
                            "type": "string",
                            "description": "Hex color"
                          },
                          "content_background": {
                            "type": "string",
                            "description": "Hex color"
                          }
                        },
                        "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                      },
                      "shadow": {
                        "enum": [
                          "none",
                          "sm",
                          "md"
                        ],
                        "type": "string"
                      },
                      "spacing": {
                        "enum": [
                          "compact",
                          "regular",
                          "spacious"
                        ],
                        "type": "string",
                        "description": "Scales block margins and card padding. Defaults to \"regular\"."
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "font_family": {
                        "enum": [
                          "system",
                          "serif",
                          "mono",
                          "georgia",
                          "helvetica"
                        ],
                        "type": "string"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_style": {
                        "enum": [
                          "none",
                          "subtle",
                          "strong"
                        ],
                        "type": "string"
                      },
                      "button_style": {
                        "enum": [
                          "filled",
                          "outline"
                        ],
                        "type": "string",
                        "description": "Defaults to \"filled\"."
                      },
                      "button_radius": {
                        "enum": [
                          "square",
                          "rounded",
                          "pill"
                        ],
                        "type": "string",
                        "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                      },
                      "content_width": {
                        "enum": [
                          "narrow",
                          "regular",
                          "wide"
                        ],
                        "type": "string"
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_scale": {
                        "enum": [
                          "regular",
                          "large"
                        ],
                        "type": "string",
                        "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "button_border_width": {
                        "enum": [
                          "regular",
                          "thin"
                        ],
                        "type": "string",
                        "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                      }
                    }
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    },
                    "description": "Shortcut for template_document.blocks"
                  },
                  "subject": {
                    "type": "string",
                    "description": "Email subject"
                  },
                  "preheader": {
                    "type": "string",
                    "description": "Email preheader"
                  },
                  "template_document": {
                    "type": "object",
                    "required": [
                      "blocks"
                    ],
                    "properties": {
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        }
                      },
                      "version": {
                        "type": "number",
                        "const": 1,
                        "default": 1
                      }
                    },
                    "description": "Structured email document"
                  }
                }
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "delay_seconds": {
                "type": "number",
                "minimum": 0
              },
              "email_category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories), or \"all\" for every category"
              },
              "skip_unengaged": {
                "type": "boolean",
                "description": "Skip contacts who received 5+ emails in the last 180 days without opening, clicking or replying to any (the sunset rule broadcasts use). Ignored for categories people cannot unsubscribe from. Default false."
              },
              "frequency_scope": {
                "enum": [
                  "visitor",
                  "contact",
                  "company",
                  "custom_key"
                ],
                "type": "string"
              },
              "next_campaign_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Campaign id to trigger after this campaign email is sent, or null to clear"
              },
              "custom_frequency_key": {
                "type": "string"
              },
              "reevaluate_conditions_at_send": {
                "type": "boolean"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update email campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "enable_email_campaign",
          "description": "Enable an email campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Enable email campaign",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "disable_email_campaign",
          "description": "Disable an email campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Disable email campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_email_campaign",
          "description": "Delete an email campaign. Refuses if another workflow in the project still chains into it via trigger_campaign or next_campaign_id.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete email campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_email_campaign_runs",
          "description": "List email campaign runs with delivery, open, and click data.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "default": 25,
                "maximum": 100,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email campaign runs",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_email_campaign_run",
          "description": "Get one email campaign run with clicked URLs.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaign_id",
              "run_id"
            ],
            "properties": {
              "run_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "campaign_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get email campaign run",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_email_categories",
          "description": "List a project's email categories used for per-category unsubscribe/preferences (marketing, product updates, transactional, ...). A project with no customized categories returns the built-in defaults.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email categories",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_email_categories",
          "description": "Replace the full set of email categories for a project (upserts by key, removes any key not included). Refused with the referencing suppressions/broadcasts/workflows if a key still in use would be removed.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "categories"
            ],
            "properties": {
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "key",
                    "label",
                    "unsubscribable"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                      "description": "Stable slug; used on suppressions, broadcasts, and send_email nodes"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 60,
                      "minLength": 1
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "unsubscribable": {
                      "type": "boolean",
                      "description": "false for transactional-style categories that always send"
                    }
                  }
                },
                "maxItems": 20,
                "minItems": 1
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Update email categories",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_email_images",
          "description": "List images in a project’s email image library, newest first. Use these for lifecycle/workflow email `image` blocks.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List email images",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "upload_email_image",
          "description": "Upload an image to a project's email image library so it can be used in lifecycle/workflow email `image` blocks (email_block_types.image.url must be an absolute URL — external hosting is no longer required). Provide exactly one of data_base64 (with mime_type) or source_url. Use email_url in email image blocks (image.url).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "alt": {
                "type": "string",
                "description": "Alt text for the image"
              },
              "filename": {
                "type": "string",
                "description": "Original filename for the data_base64 path, used to derive alt text when alt is omitted"
              },
              "mime_type": {
                "type": "string",
                "description": "Required with data_base64: image/jpeg, image/png, image/gif, or image/webp"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "source_url": {
                "type": "string",
                "description": "https/http URL to fetch the image from"
              },
              "data_base64": {
                "type": "string",
                "description": "Base64-encoded image bytes, max 5MB decoded"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Upload email image",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_email_image",
          "description": "Delete an image from a project’s email image library. Remove it from any email templates first, or the image block will break.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "image_id"
            ],
            "properties": {
              "image_id": {
                "type": "string",
                "description": "The email image ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete email image",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_broadcasts",
          "description": "List one-off email broadcasts for a project.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "draft",
                  "scheduled",
                  "sending",
                  "paused",
                  "sent",
                  "cancelled",
                  "failed"
                ],
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List broadcasts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_broadcast",
          "description": "Get a single email broadcast, including delivery/open/click counts. With an A/B test, `ab_test` has its settings, `phase` (testing, waiting, winner_sending, done, skipped, cancelled), `ends_at` (automatic winner pick), the `winner`, and `results` (test-group sent/opens/clicks/rates per variant plus a confidence score).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get broadcast",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_broadcast",
          "description": "New to HAL email? Call get_email_capabilities_overview first. Create a draft (or scheduled, if scheduled_at is set) one-off email broadcast. Does not send anything.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "subject"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "ab_test": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Turn the automatic A/B test on or off"
                  },
                  "variant_b": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "subject"
                        ],
                        "properties": {
                          "theme": {
                            "type": "object",
                            "properties": {
                              "dark": {
                                "type": "object",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean",
                                    "description": "Defaults to false (light only, no dark overrides emitted)"
                                  },
                                  "link_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "text_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "border_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "heading_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "primary_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "canvas_background": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "content_background": {
                                    "type": "string",
                                    "description": "Hex color"
                                  }
                                },
                                "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                              },
                              "shadow": {
                                "enum": [
                                  "none",
                                  "sm",
                                  "md"
                                ],
                                "type": "string"
                              },
                              "spacing": {
                                "enum": [
                                  "compact",
                                  "regular",
                                  "spacious"
                                ],
                                "type": "string",
                                "description": "Scales block margins and card padding. Defaults to \"regular\"."
                              },
                              "link_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "text_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "font_family": {
                                "enum": [
                                  "system",
                                  "serif",
                                  "mono",
                                  "georgia",
                                  "helvetica"
                                ],
                                "type": "string"
                              },
                              "border_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "border_style": {
                                "enum": [
                                  "none",
                                  "subtle",
                                  "strong"
                                ],
                                "type": "string"
                              },
                              "button_style": {
                                "enum": [
                                  "filled",
                                  "outline"
                                ],
                                "type": "string",
                                "description": "Defaults to \"filled\"."
                              },
                              "button_radius": {
                                "enum": [
                                  "square",
                                  "rounded",
                                  "pill"
                                ],
                                "type": "string",
                                "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                              },
                              "content_width": {
                                "enum": [
                                  "narrow",
                                  "regular",
                                  "wide"
                                ],
                                "type": "string"
                              },
                              "corner_radius": {
                                "enum": [
                                  "none",
                                  "sm",
                                  "md",
                                  "lg"
                                ],
                                "type": "string"
                              },
                              "heading_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "heading_scale": {
                                "enum": [
                                  "regular",
                                  "large"
                                ],
                                "type": "string",
                                "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                              },
                              "primary_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "canvas_background": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "content_background": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "button_border_width": {
                                "enum": [
                                  "regular",
                                  "thin"
                                ],
                                "type": "string",
                                "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                              }
                            }
                          },
                          "blocks": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema0"
                            }
                          },
                          "subject": {
                            "type": "string",
                            "description": "Variant B subject"
                          },
                          "preheader": {
                            "type": "string"
                          },
                          "template_document": {
                            "type": "object",
                            "required": [
                              "blocks"
                            ],
                            "properties": {
                              "blocks": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/definitions/__schema0"
                                }
                              },
                              "version": {
                                "type": "number",
                                "const": 1,
                                "default": 1
                              }
                            }
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Variant B email, or null to remove it (the test must be disabled). Omit template_document/blocks for a subject-line test: variant A's current design is copied into B when this is saved, so after changing A's design, send variant_b again to copy the new one."
                  },
                  "test_percent": {
                    "type": "integer",
                    "maximum": 50,
                    "minimum": 10,
                    "description": "Share of the audience in the test group, split evenly between A and B (default 20)"
                  },
                  "winner_metric": {
                    "enum": [
                      "open_rate",
                      "click_rate"
                    ],
                    "type": "string",
                    "description": "How the winner is picked (default open_rate)"
                  },
                  "duration_hours": {
                    "type": "integer",
                    "maximum": 72,
                    "minimum": 1,
                    "description": "Hours to wait after the test group is sent before picking the winner (default 4)"
                  }
                },
                "description": "Optional automatic A/B test: a random test group gets variant A (the main email) or B; after duration_hours the variant with the better winner_metric is sent to everyone else. Needs track_engagement on and at least 10 recipients."
              },
              "subject": {
                "type": "string",
                "description": "Email subject"
              },
              "audience": {
                "type": "object",
                "required": [
                  "operator",
                  "predicates"
                ],
                "properties": {
                  "operator": {
                    "enum": [
                      "and",
                      "or"
                    ],
                    "type": "string"
                  },
                  "predicates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "field",
                        "value_type",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "source": {
                          "enum": [
                            "contact",
                            "company",
                            "contact_builtin"
                          ],
                          "type": "string"
                        },
                        "operator": {
                          "enum": [
                            "is_true",
                            "is_false",
                            "exists",
                            "not_exists",
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "greater_than",
                            "greater_than_or_equal",
                            "less_than",
                            "less_than_or_equal"
                          ],
                          "type": "string"
                        },
                        "value_type": {
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "enum"
                          ],
                          "type": "string"
                        },
                        "custom_property_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "description": "Defaults to all contacts with an email"
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories); defaults to \"marketing\""
              },
              "preheader": {
                "type": "string",
                "description": "Email preheader"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "scheduled_at": {
                "type": "string",
                "description": "ISO datetime to schedule the send"
              },
              "skip_unengaged": {
                "type": "boolean",
                "description": "Leave out contacts who got 5+ emails in the last 180 days without opening or clicking any (default true)"
              },
              "track_engagement": {
                "type": "boolean",
                "description": "Open pixel + click tracking (default true)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                },
                "description": "Structured email document"
              },
              "skip_role_addresses": {
                "type": "boolean",
                "description": "Leave out shared role mailboxes like info@ or admin@ (default false)"
              },
              "skip_recently_emailed": {
                "type": "boolean",
                "description": "Frequency cap: leave out contacts who got a broadcast in the last 24h (default true)"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Create broadcast",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_broadcast",
          "description": "Update a draft or scheduled broadcast (name, email content, audience, schedule, list-hygiene or tracking options, A/B test).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                }
              },
              "ab_test": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "description": "Turn the automatic A/B test on or off"
                  },
                  "variant_b": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "subject"
                        ],
                        "properties": {
                          "theme": {
                            "type": "object",
                            "properties": {
                              "dark": {
                                "type": "object",
                                "properties": {
                                  "enabled": {
                                    "type": "boolean",
                                    "description": "Defaults to false (light only, no dark overrides emitted)"
                                  },
                                  "link_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "text_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "border_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "heading_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "primary_color": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "canvas_background": {
                                    "type": "string",
                                    "description": "Hex color"
                                  },
                                  "content_background": {
                                    "type": "string",
                                    "description": "Hex color"
                                  }
                                },
                                "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                              },
                              "shadow": {
                                "enum": [
                                  "none",
                                  "sm",
                                  "md"
                                ],
                                "type": "string"
                              },
                              "spacing": {
                                "enum": [
                                  "compact",
                                  "regular",
                                  "spacious"
                                ],
                                "type": "string",
                                "description": "Scales block margins and card padding. Defaults to \"regular\"."
                              },
                              "link_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "text_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "font_family": {
                                "enum": [
                                  "system",
                                  "serif",
                                  "mono",
                                  "georgia",
                                  "helvetica"
                                ],
                                "type": "string"
                              },
                              "border_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "border_style": {
                                "enum": [
                                  "none",
                                  "subtle",
                                  "strong"
                                ],
                                "type": "string"
                              },
                              "button_style": {
                                "enum": [
                                  "filled",
                                  "outline"
                                ],
                                "type": "string",
                                "description": "Defaults to \"filled\"."
                              },
                              "button_radius": {
                                "enum": [
                                  "square",
                                  "rounded",
                                  "pill"
                                ],
                                "type": "string",
                                "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                              },
                              "content_width": {
                                "enum": [
                                  "narrow",
                                  "regular",
                                  "wide"
                                ],
                                "type": "string"
                              },
                              "corner_radius": {
                                "enum": [
                                  "none",
                                  "sm",
                                  "md",
                                  "lg"
                                ],
                                "type": "string"
                              },
                              "heading_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "heading_scale": {
                                "enum": [
                                  "regular",
                                  "large"
                                ],
                                "type": "string",
                                "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                              },
                              "primary_color": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "canvas_background": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "content_background": {
                                "type": "string",
                                "description": "Hex color"
                              },
                              "button_border_width": {
                                "enum": [
                                  "regular",
                                  "thin"
                                ],
                                "type": "string",
                                "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                              }
                            }
                          },
                          "blocks": {
                            "type": "array",
                            "items": {
                              "$ref": "#/definitions/__schema0"
                            }
                          },
                          "subject": {
                            "type": "string",
                            "description": "Variant B subject"
                          },
                          "preheader": {
                            "type": "string"
                          },
                          "template_document": {
                            "type": "object",
                            "required": [
                              "blocks"
                            ],
                            "properties": {
                              "blocks": {
                                "type": "array",
                                "items": {
                                  "$ref": "#/definitions/__schema0"
                                }
                              },
                              "version": {
                                "type": "number",
                                "const": 1,
                                "default": 1
                              }
                            }
                          }
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Variant B email, or null to remove it (the test must be disabled). Omit template_document/blocks for a subject-line test: variant A's current design is copied into B when this is saved, so after changing A's design, send variant_b again to copy the new one."
                  },
                  "test_percent": {
                    "type": "integer",
                    "maximum": 50,
                    "minimum": 10,
                    "description": "Share of the audience in the test group, split evenly between A and B (default 20)"
                  },
                  "winner_metric": {
                    "enum": [
                      "open_rate",
                      "click_rate"
                    ],
                    "type": "string",
                    "description": "How the winner is picked (default open_rate)"
                  },
                  "duration_hours": {
                    "type": "integer",
                    "maximum": 72,
                    "minimum": 1,
                    "description": "Hours to wait after the test group is sent before picking the winner (default 4)"
                  }
                },
                "description": "Optional automatic A/B test: a random test group gets variant A (the main email) or B; after duration_hours the variant with the better winner_metric is sent to everyone else. Needs track_engagement on and at least 10 recipients."
              },
              "subject": {
                "type": "string"
              },
              "audience": {
                "type": "object",
                "required": [
                  "operator",
                  "predicates"
                ],
                "properties": {
                  "operator": {
                    "enum": [
                      "and",
                      "or"
                    ],
                    "type": "string"
                  },
                  "predicates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "field",
                        "value_type",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "source": {
                          "enum": [
                            "contact",
                            "company",
                            "contact_builtin"
                          ],
                          "type": "string"
                        },
                        "operator": {
                          "enum": [
                            "is_true",
                            "is_false",
                            "exists",
                            "not_exists",
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "greater_than",
                            "greater_than_or_equal",
                            "less_than",
                            "less_than_or_equal"
                          ],
                          "type": "string"
                        },
                        "value_type": {
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "enum"
                          ],
                          "type": "string"
                        },
                        "custom_property_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "EmailCategory key (see list_email_categories); defaults to \"marketing\""
              },
              "preheader": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "scheduled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "ISO datetime, or null to unschedule"
              },
              "skip_unengaged": {
                "type": "boolean",
                "description": "Leave out contacts who got 5+ emails in the last 180 days without opening or clicking any (default true)"
              },
              "track_engagement": {
                "type": "boolean",
                "description": "Open pixel + click tracking (default true)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                }
              },
              "skip_role_addresses": {
                "type": "boolean",
                "description": "Leave out shared role mailboxes like info@ or admin@ (default false)"
              },
              "skip_recently_emailed": {
                "type": "boolean",
                "description": "Frequency cap: leave out contacts who got a broadcast in the last 24h (default true)"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update broadcast",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_broadcast",
          "description": "Delete a broadcast. Refused while it is actively sending.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete broadcast",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "preview_broadcast_audience",
          "description": "Preview who a broadcast (or a candidate audience) would reach: match count, suppressed count, contacts left out by list hygiene (invalid/disposable/role addresses, unengaged, recently emailed) per reason, and a sample.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "audience": {
                "type": "object",
                "required": [
                  "operator",
                  "predicates"
                ],
                "properties": {
                  "operator": {
                    "enum": [
                      "and",
                      "or"
                    ],
                    "type": "string"
                  },
                  "predicates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "field",
                        "value_type",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        },
                        "source": {
                          "enum": [
                            "contact",
                            "company",
                            "contact_builtin"
                          ],
                          "type": "string"
                        },
                        "operator": {
                          "enum": [
                            "is_true",
                            "is_false",
                            "exists",
                            "not_exists",
                            "equals",
                            "not_equals",
                            "contains",
                            "not_contains",
                            "starts_with",
                            "greater_than",
                            "greater_than_or_equal",
                            "less_than",
                            "less_than_or_equal"
                          ],
                          "type": "string"
                        },
                        "value_type": {
                          "enum": [
                            "string",
                            "number",
                            "boolean",
                            "enum"
                          ],
                          "type": "string"
                        },
                        "custom_property_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "description": "Override audience to preview before saving"
              },
              "category": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                "description": "Only used with audience (no broadcast_id); defaults to \"marketing\""
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string",
                "description": "Preview the audience already saved on this broadcast"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "skip_unengaged": {
                "type": "boolean",
                "description": "Leave out contacts who got 5+ emails in the last 180 days without opening or clicking any (default true)"
              },
              "skip_role_addresses": {
                "type": "boolean",
                "description": "Leave out shared role mailboxes like info@ or admin@ (default false)"
              },
              "skip_recently_emailed": {
                "type": "boolean",
                "description": "Frequency cap: leave out contacts who got a broadcast in the last 24h (default true)"
              }
            }
          },
          "annotations": {
            "title": "Preview broadcast audience",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_broadcast_audience_fields",
          "description": "List the fields available for building a broadcast audience (contact/company builtins, sampled metadata keys, valid operators per type).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get broadcast audience fields",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "send_test_broadcast_email",
          "description": "Send a test of a broadcast email to an account user email address only (never to real contacts).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id",
              "to_email"
            ],
            "properties": {
              "variant": {
                "enum": [
                  "a",
                  "b"
                ],
                "type": "string",
                "description": "A/B test variant to send (default a, the main email)"
              },
              "to_email": {
                "type": "string",
                "description": "Recipient email. Must belong to a user on this account."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "sample_contact_id": {
                "type": "string",
                "description": "Contact to source sample merge fields from"
              }
            }
          },
          "annotations": {
            "title": "Send test broadcast email",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "schedule_broadcast",
          "description": "Schedule a draft (or reschedule a scheduled) broadcast to send at a future time.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id",
              "scheduled_at"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "scheduled_at": {
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "Schedule broadcast",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "send_broadcast_now",
          "description": "IMMEDIATELY sends this broadcast to its whole live audience - a real, irreversible email blast to real contacts, not a test. You MUST call preview_broadcast_audience first and pass its exact `count` as confirm_recipient_count; a mismatch is refused. Call get_broadcast_readiness first too: sends with blocking deliverability checks are refused. Only call this after the user has explicitly confirmed they want to send to that many recipients right now.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id",
              "confirm_recipient_count"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "confirm_recipient_count": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Must exactly equal the current preview_broadcast_audience count"
              }
            }
          },
          "annotations": {
            "title": "Send broadcast now",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "cancel_broadcast",
          "description": "Cancel a scheduled, in-progress, or paused broadcast. Recipients not yet sent to are marked cancelled.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Cancel broadcast",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_broadcast_recipients",
          "description": "List the per-recipient delivery status for a broadcast.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 200,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "pending",
                  "held",
                  "sending",
                  "sent",
                  "failed",
                  "skipped",
                  "cancelled"
                ],
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List broadcast recipients",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_broadcast_readiness",
          "description": "Deliverability checklist for a broadcast before sending: sender authentication (custom domain, DMARC, MAIL FROM/SPF), postal address, project bounce/complaint health, warm-up capacity (how many days the send will be spread over), and content lint (size, image-heavy, subject, spam phrases, link shorteners). `error` checks block sending; share warnings with the user.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get broadcast readiness",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "resume_broadcast",
          "description": "Resume a paused broadcast. Broadcasts auto-pause when their bounce or spam-complaint rate is too high, or when a scheduled send hits a blocking deliverability check; `pause_reason` says why. Only resume after the user understands the reason and has addressed it (e.g. removed bad addresses). The remaining recipients are sent to, and it pauses again if rates stay high.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Resume broadcast",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "select_broadcast_ab_winner",
          "description": "End a broadcast's A/B test early and send the winner to the rest of the audience now, instead of waiting for the automatic pick. `ab_test.results` on get_broadcast shows each variant's open/click rates. Pass `variant` to choose it; omit it to send the current leader. This sends real email to the remaining recipients: confirm with the user first.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "broadcast_id"
            ],
            "properties": {
              "variant": {
                "enum": [
                  "a",
                  "b"
                ],
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "broadcast_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Select broadcast ab winner",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_email_deliverability",
          "description": "Project email reporting. Always returns: health (last 30 days across every campaign, workflow and broadcast: sent, sent_last_24h, delivered, hard bounces (bounced), soft bounces, complaints and their rates, plus the status that blocks broadcasts, and reset_at when a list-cleanup reset restarted the window), sources (the same window broken down per workflow/broadcast with delivered, hard/soft bounces, unique opens, clicks and replies), warm-up progress (only broadcasts count toward it), and the footer postal address. Pass workflow_id or broadcast_id (optionally with days; omitted = all time) to also get stats for that one campaign. Opens and clicks exclude automatic ones from security scanners and Apple Mail Privacy Protection, which are reported as automatic_opens/automatic_clicks. Replies count recipients who answered the email (auto-replies are ignored). Delivered counts only cover emails sent after delivery tracking was enabled.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "days": {
                "type": "integer",
                "maximum": 365,
                "minimum": 1,
                "description": "Trailing window for the workflow_id/broadcast_id stats; omitted = all time"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string",
                "description": "Campaign/workflow to report on"
              },
              "broadcast_id": {
                "type": "string",
                "description": "Broadcast to report on"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get email deliverability",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_email_postal_address",
          "description": "Set the physical mailing address shown in the footer of every marketing/lifecycle email (required by CAN-SPAM). Pass null or an empty string to remove it. Confirm the exact address with the user first.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postal_address"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "postal_address": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 300
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update email postal address",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "reset_email_deliverability_health",
          "description": "Start a fresh 30-day health window for a project that is blocked from sending broadcasts by old bounces or complaints. ONLY use this after the bounced and complained addresses have been suppressed (list_email_suppressions / suppress_email_recipient) so the same list cannot bounce again. HAL enforces this: the reset is refused, and nothing changes, if any recipient that bounced or complained in the current window is not suppressed (by a project-wide or platform-wide suppression), and a project can be reset at most once per 30 days. Once it succeeds, sends before the reset stop counting toward the project's bounce and complaint rate, and any new bounces after it count normally and can block the project again. This only resets HAL's own project health window; it does not change the Amazon SES account reputation or review status. Per-broadcast auto-pause is not affected. Cannot be undone and is logged: get explicit user confirmation, then pass confirm: true and a reason describing the cleanup (3-500 characters). Returns the updated health (including reset_at).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "reason",
              "confirm"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "description": "What was cleaned up, e.g. \"Suppressed all 312 hard-bounced addresses from the March 2026 import\" (3-500 characters)"
              },
              "confirm": {
                "type": "boolean",
                "const": true,
                "description": "Must be true: confirms the bounced/complained addresses were suppressed"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Reset email deliverability health",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_workflow_builder_reference",
          "description": "New to HAL email? Call get_email_capabilities_overview first. Static reference for building visitor workflows through create_workflow/update_workflow/validate_workflow: trigger shapes, node types, graph rules, condition/predicate operators, email block types, and variable syntax.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "annotations": {
            "title": "Get workflow builder reference",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_workflows",
          "description": "List visitor workflows for a project (trigger + branching graph automations), ordered by priority.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_type": {
                "enum": [
                  "first_seen",
                  "first_message",
                  "page_visit",
                  "api_trigger",
                  "email_capture",
                  "nps_response",
                  "csat_response"
                ],
                "type": "string"
              }
            }
          },
          "annotations": {
            "title": "List workflows",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_workflow",
          "description": "Get a visitor workflow including its full node/edge graph definition.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get workflow",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_workflow",
          "description": "Validate a visitor workflow definition without saving it. Same input as create_workflow.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "trigger_type",
              "definition"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean",
                "default": false
              },
              "priority": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time",
                  "every_30_days",
                  "every_60_days",
                  "every_90_days"
                ],
                "type": "string"
              },
              "definition": {
                "type": "object",
                "required": [
                  "nodes"
                ],
                "properties": {
                  "edges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "target"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "target": {
                          "type": "string"
                        },
                        "sourceHandle": {
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "type": "string"
                        }
                      }
                    },
                    "default": []
                  },
                  "nodes": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "trigger_mode": {
                                  "enum": [
                                    "event",
                                    "property"
                                  ],
                                  "type": "string"
                                },
                                "trigger_type": {
                                  "enum": [
                                    "first_seen",
                                    "first_message",
                                    "page_visit",
                                    "api_trigger",
                                    "email_capture",
                                    "nps_response",
                                    "csat_response"
                                  ],
                                  "type": "string"
                                },
                                "trigger_config": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "description": "Ignored on write: the trigger node data is always overwritten with the top-level trigger_mode/trigger_type/trigger_config so they stay in sync.",
                              "additionalProperties": {}
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "field",
                                "operator"
                              ],
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "Condition field. Call get_workflow_builder_reference for the full list and operator rules."
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Required unless operator is exists/not_exists/is_true/is_false"
                                },
                                "operator": {
                                  "enum": [
                                    "is_true",
                                    "is_false",
                                    "exists",
                                    "not_exists",
                                    "equals",
                                    "not_equals",
                                    "contains",
                                    "not_contains",
                                    "starts_with",
                                    "greater_than",
                                    "greater_than_or_equal",
                                    "less_than",
                                    "less_than_or_equal"
                                  ],
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "condition"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "messages",
                                "display_mode"
                              ],
                              "properties": {
                                "messages": {
                                  "type": "object",
                                  "description": "Locale code -> message text, e.g. {\"en\": \"Hi there!\"}. At least one non-empty message is required.",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "display_mode": {
                                  "enum": [
                                    "bubble",
                                    "open_widget"
                                  ],
                                  "type": "string"
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_widget_message"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "properties": {
                                "body": {
                                  "type": "string",
                                  "description": "Legacy plain-text email body. Only relevant for round-tripping a \"default\" template_variant node from get_workflow; new emails should use blocks instead."
                                },
                                "theme": {
                                  "type": "object",
                                  "properties": {
                                    "dark": {
                                      "type": "object",
                                      "properties": {
                                        "enabled": {
                                          "type": "boolean",
                                          "description": "Defaults to false (light only, no dark overrides emitted)"
                                        },
                                        "link_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "text_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "border_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "heading_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "primary_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "canvas_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "content_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        }
                                      },
                                      "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                                    },
                                    "shadow": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md"
                                      ],
                                      "type": "string"
                                    },
                                    "spacing": {
                                      "enum": [
                                        "compact",
                                        "regular",
                                        "spacious"
                                      ],
                                      "type": "string",
                                      "description": "Scales block margins and card padding. Defaults to \"regular\"."
                                    },
                                    "link_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "text_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "font_family": {
                                      "enum": [
                                        "system",
                                        "serif",
                                        "mono",
                                        "georgia",
                                        "helvetica"
                                      ],
                                      "type": "string"
                                    },
                                    "border_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "border_style": {
                                      "enum": [
                                        "none",
                                        "subtle",
                                        "strong"
                                      ],
                                      "type": "string"
                                    },
                                    "button_style": {
                                      "enum": [
                                        "filled",
                                        "outline"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"filled\"."
                                    },
                                    "button_radius": {
                                      "enum": [
                                        "square",
                                        "rounded",
                                        "pill"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                                    },
                                    "content_width": {
                                      "enum": [
                                        "narrow",
                                        "regular",
                                        "wide"
                                      ],
                                      "type": "string"
                                    },
                                    "corner_radius": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md",
                                        "lg"
                                      ],
                                      "type": "string"
                                    },
                                    "heading_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "heading_scale": {
                                      "enum": [
                                        "regular",
                                        "large"
                                      ],
                                      "type": "string",
                                      "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                                    },
                                    "primary_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "canvas_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "content_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "button_border_width": {
                                      "enum": [
                                        "regular",
                                        "thin"
                                      ],
                                      "type": "string",
                                      "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                                    }
                                  }
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/definitions/__schema0"
                                  },
                                  "description": "Shortcut for template_document.blocks"
                                },
                                "subject": {
                                  "type": "string"
                                },
                                "preheader": {
                                  "type": "string"
                                },
                                "template_id": {
                                  "type": "string",
                                  "description": "Copy a reusable email template (see list_email_templates). subject/preheader/theme override the copied values. If template_document/blocks are also given, the template is not read and template_id is kept only as provenance."
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                },
                                "template_name": {
                                  "type": "string"
                                },
                                "email_category": {
                                  "type": "string",
                                  "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                                  "description": "EmailCategory key (see list_email_categories) this email sends under, e.g. \"marketing\" or \"transactional\". Invalid/omitted is treated as \"marketing\" at send time."
                                },
                                "skip_unengaged": {
                                  "type": "boolean",
                                  "description": "Skip contacts who received 5+ emails in the last 180 days without opening, clicking or replying to any (the sunset rule broadcasts use). Ignored for categories people cannot unsubscribe from. Default false."
                                },
                                "next_campaign_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Workflow id (containing a send_email node) to trigger after this email sends"
                                },
                                "template_variant": {
                                  "enum": [
                                    "default",
                                    "custom_v1"
                                  ],
                                  "type": "string",
                                  "description": "Usually omit this. \"default\" round-trips a legacy plain-text email node (body, no blocks) unchanged; new emails should use blocks/template_document instead."
                                },
                                "template_document": {
                                  "type": "object",
                                  "required": [
                                    "blocks"
                                  ],
                                  "properties": {
                                    "blocks": {
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    },
                                    "version": {
                                      "type": "number",
                                      "const": 1,
                                      "default": 1
                                    }
                                  },
                                  "description": "Structured email document"
                                },
                                "reevaluate_conditions_at_send": {
                                  "type": "boolean",
                                  "default": false
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_email"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "target_workflow_id"
                              ],
                              "properties": {
                                "target_workflow_id": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger_campaign"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "label": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "end"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      ]
                    },
                    "minItems": 1,
                    "description": "Node ids are required; choose short readable ids like \"trigger\" or \"check-plan\"."
                  }
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_mode": {
                "enum": [
                  "event",
                  "property"
                ],
                "type": "string",
                "default": "event"
              },
              "trigger_type": {
                "enum": [
                  "first_seen",
                  "first_message",
                  "page_visit",
                  "api_trigger",
                  "email_capture",
                  "nps_response",
                  "csat_response"
                ],
                "type": "string"
              },
              "trigger_config": {
                "type": "object",
                "description": "Shape depends on trigger_type; call get_workflow_builder_reference first.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Validate workflow",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_workflow",
          "description": "New to HAL email? Call get_email_capabilities_overview first. Create a visitor workflow: a trigger plus a branching graph of condition/send_widget_message/send_email/trigger_campaign/end nodes. Call get_workflow_builder_reference first.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "trigger_type",
              "definition"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean",
                "default": false
              },
              "priority": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time",
                  "every_30_days",
                  "every_60_days",
                  "every_90_days"
                ],
                "type": "string"
              },
              "definition": {
                "type": "object",
                "required": [
                  "nodes"
                ],
                "properties": {
                  "edges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "target"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "target": {
                          "type": "string"
                        },
                        "sourceHandle": {
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "type": "string"
                        }
                      }
                    },
                    "default": []
                  },
                  "nodes": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "trigger_mode": {
                                  "enum": [
                                    "event",
                                    "property"
                                  ],
                                  "type": "string"
                                },
                                "trigger_type": {
                                  "enum": [
                                    "first_seen",
                                    "first_message",
                                    "page_visit",
                                    "api_trigger",
                                    "email_capture",
                                    "nps_response",
                                    "csat_response"
                                  ],
                                  "type": "string"
                                },
                                "trigger_config": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "description": "Ignored on write: the trigger node data is always overwritten with the top-level trigger_mode/trigger_type/trigger_config so they stay in sync.",
                              "additionalProperties": {}
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "field",
                                "operator"
                              ],
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "Condition field. Call get_workflow_builder_reference for the full list and operator rules."
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Required unless operator is exists/not_exists/is_true/is_false"
                                },
                                "operator": {
                                  "enum": [
                                    "is_true",
                                    "is_false",
                                    "exists",
                                    "not_exists",
                                    "equals",
                                    "not_equals",
                                    "contains",
                                    "not_contains",
                                    "starts_with",
                                    "greater_than",
                                    "greater_than_or_equal",
                                    "less_than",
                                    "less_than_or_equal"
                                  ],
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "condition"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "messages",
                                "display_mode"
                              ],
                              "properties": {
                                "messages": {
                                  "type": "object",
                                  "description": "Locale code -> message text, e.g. {\"en\": \"Hi there!\"}. At least one non-empty message is required.",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "display_mode": {
                                  "enum": [
                                    "bubble",
                                    "open_widget"
                                  ],
                                  "type": "string"
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_widget_message"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "properties": {
                                "body": {
                                  "type": "string",
                                  "description": "Legacy plain-text email body. Only relevant for round-tripping a \"default\" template_variant node from get_workflow; new emails should use blocks instead."
                                },
                                "theme": {
                                  "type": "object",
                                  "properties": {
                                    "dark": {
                                      "type": "object",
                                      "properties": {
                                        "enabled": {
                                          "type": "boolean",
                                          "description": "Defaults to false (light only, no dark overrides emitted)"
                                        },
                                        "link_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "text_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "border_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "heading_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "primary_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "canvas_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "content_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        }
                                      },
                                      "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                                    },
                                    "shadow": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md"
                                      ],
                                      "type": "string"
                                    },
                                    "spacing": {
                                      "enum": [
                                        "compact",
                                        "regular",
                                        "spacious"
                                      ],
                                      "type": "string",
                                      "description": "Scales block margins and card padding. Defaults to \"regular\"."
                                    },
                                    "link_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "text_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "font_family": {
                                      "enum": [
                                        "system",
                                        "serif",
                                        "mono",
                                        "georgia",
                                        "helvetica"
                                      ],
                                      "type": "string"
                                    },
                                    "border_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "border_style": {
                                      "enum": [
                                        "none",
                                        "subtle",
                                        "strong"
                                      ],
                                      "type": "string"
                                    },
                                    "button_style": {
                                      "enum": [
                                        "filled",
                                        "outline"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"filled\"."
                                    },
                                    "button_radius": {
                                      "enum": [
                                        "square",
                                        "rounded",
                                        "pill"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                                    },
                                    "content_width": {
                                      "enum": [
                                        "narrow",
                                        "regular",
                                        "wide"
                                      ],
                                      "type": "string"
                                    },
                                    "corner_radius": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md",
                                        "lg"
                                      ],
                                      "type": "string"
                                    },
                                    "heading_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "heading_scale": {
                                      "enum": [
                                        "regular",
                                        "large"
                                      ],
                                      "type": "string",
                                      "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                                    },
                                    "primary_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "canvas_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "content_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "button_border_width": {
                                      "enum": [
                                        "regular",
                                        "thin"
                                      ],
                                      "type": "string",
                                      "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                                    }
                                  }
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/definitions/__schema0"
                                  },
                                  "description": "Shortcut for template_document.blocks"
                                },
                                "subject": {
                                  "type": "string"
                                },
                                "preheader": {
                                  "type": "string"
                                },
                                "template_id": {
                                  "type": "string",
                                  "description": "Copy a reusable email template (see list_email_templates). subject/preheader/theme override the copied values. If template_document/blocks are also given, the template is not read and template_id is kept only as provenance."
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                },
                                "template_name": {
                                  "type": "string"
                                },
                                "email_category": {
                                  "type": "string",
                                  "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                                  "description": "EmailCategory key (see list_email_categories) this email sends under, e.g. \"marketing\" or \"transactional\". Invalid/omitted is treated as \"marketing\" at send time."
                                },
                                "skip_unengaged": {
                                  "type": "boolean",
                                  "description": "Skip contacts who received 5+ emails in the last 180 days without opening, clicking or replying to any (the sunset rule broadcasts use). Ignored for categories people cannot unsubscribe from. Default false."
                                },
                                "next_campaign_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Workflow id (containing a send_email node) to trigger after this email sends"
                                },
                                "template_variant": {
                                  "enum": [
                                    "default",
                                    "custom_v1"
                                  ],
                                  "type": "string",
                                  "description": "Usually omit this. \"default\" round-trips a legacy plain-text email node (body, no blocks) unchanged; new emails should use blocks/template_document instead."
                                },
                                "template_document": {
                                  "type": "object",
                                  "required": [
                                    "blocks"
                                  ],
                                  "properties": {
                                    "blocks": {
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    },
                                    "version": {
                                      "type": "number",
                                      "const": 1,
                                      "default": 1
                                    }
                                  },
                                  "description": "Structured email document"
                                },
                                "reevaluate_conditions_at_send": {
                                  "type": "boolean",
                                  "default": false
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_email"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "target_workflow_id"
                              ],
                              "properties": {
                                "target_workflow_id": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger_campaign"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "label": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "end"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      ]
                    },
                    "minItems": 1,
                    "description": "Node ids are required; choose short readable ids like \"trigger\" or \"check-plan\"."
                  }
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_mode": {
                "enum": [
                  "event",
                  "property"
                ],
                "type": "string",
                "default": "event"
              },
              "trigger_type": {
                "enum": [
                  "first_seen",
                  "first_message",
                  "page_visit",
                  "api_trigger",
                  "email_capture",
                  "nps_response",
                  "csat_response"
                ],
                "type": "string"
              },
              "trigger_config": {
                "type": "object",
                "description": "Shape depends on trigger_type; call get_workflow_builder_reference first.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Create workflow",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_workflow",
          "description": "Update a visitor workflow. Partial: only provided fields change. If trigger fields change without a new definition, the existing trigger node is synced in place.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "enabled": {
                "type": "boolean"
              },
              "priority": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time",
                  "every_30_days",
                  "every_60_days",
                  "every_90_days"
                ],
                "type": "string"
              },
              "definition": {
                "type": "object",
                "required": [
                  "nodes"
                ],
                "properties": {
                  "edges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "source",
                        "target"
                      ],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "source": {
                          "type": "string"
                        },
                        "target": {
                          "type": "string"
                        },
                        "sourceHandle": {
                          "enum": [
                            "yes",
                            "no"
                          ],
                          "type": "string"
                        }
                      }
                    },
                    "default": []
                  },
                  "nodes": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "trigger_mode": {
                                  "enum": [
                                    "event",
                                    "property"
                                  ],
                                  "type": "string"
                                },
                                "trigger_type": {
                                  "enum": [
                                    "first_seen",
                                    "first_message",
                                    "page_visit",
                                    "api_trigger",
                                    "email_capture",
                                    "nps_response",
                                    "csat_response"
                                  ],
                                  "type": "string"
                                },
                                "trigger_config": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {}
                                }
                              },
                              "description": "Ignored on write: the trigger node data is always overwritten with the top-level trigger_mode/trigger_type/trigger_config so they stay in sync.",
                              "additionalProperties": {}
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "field",
                                "operator"
                              ],
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "Condition field. Call get_workflow_builder_reference for the full list and operator rules."
                                },
                                "value": {
                                  "type": "string",
                                  "description": "Required unless operator is exists/not_exists/is_true/is_false"
                                },
                                "operator": {
                                  "enum": [
                                    "is_true",
                                    "is_false",
                                    "exists",
                                    "not_exists",
                                    "equals",
                                    "not_equals",
                                    "contains",
                                    "not_contains",
                                    "starts_with",
                                    "greater_than",
                                    "greater_than_or_equal",
                                    "less_than",
                                    "less_than_or_equal"
                                  ],
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "condition"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "messages",
                                "display_mode"
                              ],
                              "properties": {
                                "messages": {
                                  "type": "object",
                                  "description": "Locale code -> message text, e.g. {\"en\": \"Hi there!\"}. At least one non-empty message is required.",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string"
                                  }
                                },
                                "display_mode": {
                                  "enum": [
                                    "bubble",
                                    "open_widget"
                                  ],
                                  "type": "string"
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_widget_message"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "properties": {
                                "body": {
                                  "type": "string",
                                  "description": "Legacy plain-text email body. Only relevant for round-tripping a \"default\" template_variant node from get_workflow; new emails should use blocks instead."
                                },
                                "theme": {
                                  "type": "object",
                                  "properties": {
                                    "dark": {
                                      "type": "object",
                                      "properties": {
                                        "enabled": {
                                          "type": "boolean",
                                          "description": "Defaults to false (light only, no dark overrides emitted)"
                                        },
                                        "link_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "text_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "border_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "heading_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "primary_color": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "canvas_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        },
                                        "content_background": {
                                          "type": "string",
                                          "description": "Hex color"
                                        }
                                      },
                                      "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                                    },
                                    "shadow": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md"
                                      ],
                                      "type": "string"
                                    },
                                    "spacing": {
                                      "enum": [
                                        "compact",
                                        "regular",
                                        "spacious"
                                      ],
                                      "type": "string",
                                      "description": "Scales block margins and card padding. Defaults to \"regular\"."
                                    },
                                    "link_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "text_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "font_family": {
                                      "enum": [
                                        "system",
                                        "serif",
                                        "mono",
                                        "georgia",
                                        "helvetica"
                                      ],
                                      "type": "string"
                                    },
                                    "border_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "border_style": {
                                      "enum": [
                                        "none",
                                        "subtle",
                                        "strong"
                                      ],
                                      "type": "string"
                                    },
                                    "button_style": {
                                      "enum": [
                                        "filled",
                                        "outline"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"filled\"."
                                    },
                                    "button_radius": {
                                      "enum": [
                                        "square",
                                        "rounded",
                                        "pill"
                                      ],
                                      "type": "string",
                                      "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                                    },
                                    "content_width": {
                                      "enum": [
                                        "narrow",
                                        "regular",
                                        "wide"
                                      ],
                                      "type": "string"
                                    },
                                    "corner_radius": {
                                      "enum": [
                                        "none",
                                        "sm",
                                        "md",
                                        "lg"
                                      ],
                                      "type": "string"
                                    },
                                    "heading_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "heading_scale": {
                                      "enum": [
                                        "regular",
                                        "large"
                                      ],
                                      "type": "string",
                                      "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                                    },
                                    "primary_color": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "canvas_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "content_background": {
                                      "type": "string",
                                      "description": "Hex color"
                                    },
                                    "button_border_width": {
                                      "enum": [
                                        "regular",
                                        "thin"
                                      ],
                                      "type": "string",
                                      "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                                    }
                                  }
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/definitions/__schema0"
                                  },
                                  "description": "Shortcut for template_document.blocks"
                                },
                                "subject": {
                                  "type": "string"
                                },
                                "preheader": {
                                  "type": "string"
                                },
                                "template_id": {
                                  "type": "string",
                                  "description": "Copy a reusable email template (see list_email_templates). subject/preheader/theme override the copied values. If template_document/blocks are also given, the template is not read and template_id is kept only as provenance."
                                },
                                "delay_seconds": {
                                  "type": "number",
                                  "default": 0,
                                  "minimum": 0
                                },
                                "template_name": {
                                  "type": "string"
                                },
                                "email_category": {
                                  "type": "string",
                                  "pattern": "^[a-z0-9][a-z0-9_-]{0,30}$",
                                  "description": "EmailCategory key (see list_email_categories) this email sends under, e.g. \"marketing\" or \"transactional\". Invalid/omitted is treated as \"marketing\" at send time."
                                },
                                "skip_unengaged": {
                                  "type": "boolean",
                                  "description": "Skip contacts who received 5+ emails in the last 180 days without opening, clicking or replying to any (the sunset rule broadcasts use). Ignored for categories people cannot unsubscribe from. Default false."
                                },
                                "next_campaign_id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Workflow id (containing a send_email node) to trigger after this email sends"
                                },
                                "template_variant": {
                                  "enum": [
                                    "default",
                                    "custom_v1"
                                  ],
                                  "type": "string",
                                  "description": "Usually omit this. \"default\" round-trips a legacy plain-text email node (body, no blocks) unchanged; new emails should use blocks/template_document instead."
                                },
                                "template_document": {
                                  "type": "object",
                                  "required": [
                                    "blocks"
                                  ],
                                  "properties": {
                                    "blocks": {
                                      "type": "array",
                                      "items": {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    },
                                    "version": {
                                      "type": "number",
                                      "const": 1,
                                      "default": 1
                                    }
                                  },
                                  "description": "Structured email document"
                                },
                                "reevaluate_conditions_at_send": {
                                  "type": "boolean",
                                  "default": false
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "send_email"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type",
                            "data"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "required": [
                                "target_workflow_id"
                              ],
                              "properties": {
                                "target_workflow_id": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "trigger_campaign"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        },
                        {
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "data": {
                              "type": "object",
                              "default": {},
                              "properties": {
                                "label": {
                                  "type": "string"
                                }
                              }
                            },
                            "type": {
                              "type": "string",
                              "const": "end"
                            },
                            "position": {
                              "type": "object",
                              "required": [
                                "x",
                                "y"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number"
                                },
                                "y": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      ]
                    },
                    "minItems": 1,
                    "description": "Node ids are required; choose short readable ids like \"trigger\" or \"check-plan\"."
                  }
                }
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_mode": {
                "enum": [
                  "event",
                  "property"
                ],
                "type": "string"
              },
              "trigger_type": {
                "enum": [
                  "first_seen",
                  "first_message",
                  "page_visit",
                  "api_trigger",
                  "email_capture",
                  "nps_response",
                  "csat_response"
                ],
                "type": "string"
              },
              "trigger_config": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update workflow",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_workflow",
          "description": "Delete a visitor workflow. Refuses if another workflow in the project still chains into it via trigger_campaign or next_campaign_id.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete workflow",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "set_workflow_enabled",
          "description": "Enable or disable a visitor workflow.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Set workflow enabled",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "reorder_workflows",
          "description": "Reorder visitor workflows by priority; the first id in the list gets the highest priority.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_ids"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "workflow_ids": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1
              }
            }
          },
          "annotations": {
            "title": "Reorder workflows",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_workflow_executions",
          "description": "List execution history for a visitor workflow.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 25,
                "maximum": 100,
                "minimum": 1
              },
              "cursor": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List workflow executions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_workflow_execution",
          "description": "Get one visitor workflow execution.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id",
              "execution_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "execution_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get workflow execution",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_workflow_email_defaults",
          "description": "Get the project default email design used to seed new send_email nodes.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get workflow email defaults",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_workflow_email_defaults",
          "description": "Update the project default email design (subject/preheader/theme/template_document) used to seed new send_email nodes. Merges into the project config without touching other settings.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "theme": {
                "type": "object",
                "properties": {
                  "dark": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "description": "Defaults to false (light only, no dark overrides emitted)"
                      },
                      "link_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "border_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "primary_color": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "canvas_background": {
                        "type": "string",
                        "description": "Hex color"
                      },
                      "content_background": {
                        "type": "string",
                        "description": "Hex color"
                      }
                    },
                    "description": "Dark-mode color overrides, applied via @media (prefers-color-scheme: dark) and Outlook.com [data-ogsc]/[data-ogsb] selectors."
                  },
                  "shadow": {
                    "enum": [
                      "none",
                      "sm",
                      "md"
                    ],
                    "type": "string"
                  },
                  "spacing": {
                    "enum": [
                      "compact",
                      "regular",
                      "spacious"
                    ],
                    "type": "string",
                    "description": "Scales block margins and card padding. Defaults to \"regular\"."
                  },
                  "link_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "text_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "font_family": {
                    "enum": [
                      "system",
                      "serif",
                      "mono",
                      "georgia",
                      "helvetica"
                    ],
                    "type": "string"
                  },
                  "border_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "border_style": {
                    "enum": [
                      "none",
                      "subtle",
                      "strong"
                    ],
                    "type": "string"
                  },
                  "button_style": {
                    "enum": [
                      "filled",
                      "outline"
                    ],
                    "type": "string",
                    "description": "Defaults to \"filled\"."
                  },
                  "button_radius": {
                    "enum": [
                      "square",
                      "rounded",
                      "pill"
                    ],
                    "type": "string",
                    "description": "Defaults to \"rounded\", which tracks corner_radius. \"square\" is 0px, \"pill\" is 999px."
                  },
                  "content_width": {
                    "enum": [
                      "narrow",
                      "regular",
                      "wide"
                    ],
                    "type": "string"
                  },
                  "corner_radius": {
                    "enum": [
                      "none",
                      "sm",
                      "md",
                      "lg"
                    ],
                    "type": "string"
                  },
                  "heading_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "heading_scale": {
                    "enum": [
                      "regular",
                      "large"
                    ],
                    "type": "string",
                    "description": "\"large\" renders h1/h2 at 34/26px instead of 28/22px."
                  },
                  "primary_color": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "canvas_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "content_background": {
                    "type": "string",
                    "description": "Hex color"
                  },
                  "button_border_width": {
                    "enum": [
                      "regular",
                      "thin"
                    ],
                    "type": "string",
                    "description": "Outline button border thickness. Defaults to \"regular\" (2px); \"thin\" is 1px."
                  }
                }
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Shortcut for template_document.blocks"
              },
              "subject": {
                "type": "string"
              },
              "preheader": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "template_document": {
                "type": "object",
                "required": [
                  "blocks"
                ],
                "properties": {
                  "blocks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/definitions/__schema0"
                    }
                  },
                  "version": {
                    "type": "number",
                    "const": 1,
                    "default": 1
                  }
                }
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "level"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "level": {
                        "anyOf": [
                          {
                            "type": "number",
                            "const": 1
                          },
                          {
                            "type": "number",
                            "const": 2
                          }
                        ],
                        "description": "Heading level"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "color": {
                        "type": "string",
                        "description": "Hex color override for this block only"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text",
                      "url"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "url": {
                        "type": "string",
                        "description": "https, http, or mailto URL"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "text": {
                        "type": "string",
                        "description": "Button label"
                      },
                      "type": {
                        "type": "string",
                        "const": "button"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "full_width": {
                        "type": "boolean",
                        "description": "Stretch the button to the full column width"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "size"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "size": {
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Vertical spacer size"
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "url",
                      "alt"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "alt": {
                        "type": "string",
                        "description": "Alt text; required"
                      },
                      "url": {
                        "type": "string",
                        "description": "https or http image URL. Call upload_email_image first to host an image and get an absolute URL."
                      },
                      "href": {
                        "type": "string",
                        "description": "Optional https, http, or mailto URL the image links to when clicked"
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "footer_note"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "style",
                      "items"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "align": {
                        "enum": [
                          "left",
                          "center",
                          "right"
                        ],
                        "type": "string",
                        "description": "Defaults to \"left\"."
                      },
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                        },
                        "maxItems": 50,
                        "minItems": 1
                      },
                      "style": {
                        "enum": [
                          "bullet",
                          "number"
                        ],
                        "type": "string"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "text"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "text": {
                        "type": "string",
                        "description": "Supports **bold**, *italic*, [label](url) inline formatting"
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "attribution": {
                        "type": "string",
                        "description": "Optional \"— attribution\" line under the quote"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". Consecutive blocks are grouped into a row when their widths sum to a full row: half+half, third+third+third, third+two-thirds, or two-thirds+third. Any other combination (e.g. two unpaired two-thirds blocks) falls back to full width."
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "blocks"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique within the document"
                      },
                      "type": {
                        "type": "string",
                        "const": "section"
                      },
                      "blocks": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/__schema0"
                        },
                        "minItems": 1,
                        "description": "Child blocks. Sections cannot contain another section."
                      },
                      "padding": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"md\""
                      },
                      "background": {
                        "type": "string",
                        "description": "Hex color; defaults to transparent"
                      },
                      "full_bleed": {
                        "type": "boolean",
                        "description": "Break out of the card's horizontal padding so the background spans edge to edge"
                      },
                      "text_color": {
                        "type": "string",
                        "description": "Hex color; overrides paragraph/list/quote text color for children"
                      },
                      "layout_width": {
                        "enum": [
                          "full",
                          "half",
                          "third",
                          "two-thirds"
                        ],
                        "type": "string",
                        "description": "Defaults to \"full\". A fractional width lets sibling sections group into a column row - e.g. three sections each with layout_width \"third\" render as a three-column row of intact cards (icon+heading+text stays together per card) instead of stacking icons, then headings, then text on mobile. full_bleed is ignored on a fractional-width section since escaping the card padding makes no sense for a block sitting inside a column cell."
                      },
                      "corner_radius": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Defaults to \"none\""
                      },
                      "heading_color": {
                        "type": "string",
                        "description": "Hex color; overrides heading color for children"
                      },
                      "spacing_after": {
                        "enum": [
                          "none",
                          "sm",
                          "md",
                          "lg"
                        ],
                        "type": "string",
                        "description": "Overrides this block's bottom margin (0/8/18/32px, scaled by theme.spacing). Defaults to the block type's own margin."
                      }
                    }
                  }
                ]
              }
            }
          },
          "annotations": {
            "title": "Update workflow email defaults",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "send_test_workflow_email",
          "description": "Send a real test email for one send_email node in a workflow to an account user email address only.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "workflow_id",
              "to_email"
            ],
            "properties": {
              "node_id": {
                "type": "string",
                "description": "Required if the workflow has more than one send_email node"
              },
              "to_email": {
                "type": "string",
                "description": "Recipient email. Must belong to a user on this account."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "workflow_id": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "sample_context": {
                "type": "object",
                "properties": {
                  "company_id": {
                    "type": "string"
                  },
                  "company_name": {
                    "type": "string"
                  },
                  "visitor_name": {
                    "type": "string"
                  },
                  "company_stage": {
                    "type": "string"
                  },
                  "visitor_email": {
                    "type": "string"
                  },
                  "visitor_user_id": {
                    "type": "string"
                  },
                  "browser_language": {
                    "type": "string"
                  },
                  "company_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "contact_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "visitor_metadata": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": [
                        "string",
                        "number",
                        "boolean",
                        "null"
                      ]
                    }
                  },
                  "company_contact_count": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "annotations": {
            "title": "Send test workflow email",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_test_email_recipients",
          "description": "List account user emails allowed as workflow/email test recipients.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "annotations": {
            "title": "List test email recipients",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "track_event",
          "description": "Track a lifecycle event exactly like the public track-event API. THIS CAN SEND REAL EMAILS: matching enabled api_trigger workflows fire immediately for real contacts. Use dry_run to preview matches without tracking or sending anything. Workflows only fire for events that resolve to a visitor (via user_id or email); company-only events never trigger workflows.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              "email": {
                "type": "string"
              },
              "value": {
                "type": [
                  "string",
                  "number",
                  "boolean",
                  "null"
                ]
              },
              "entity": {
                "enum": [
                  "visitor",
                  "company"
                ],
                "type": "string"
              },
              "dry_run": {
                "type": "boolean",
                "default": false,
                "description": "If true, does not track anything or send emails; only reports which enabled api_trigger workflows would match"
              },
              "user_id": {
                "type": "string"
              },
              "metadata": {
                "type": "object",
                "description": "Contact properties. Only fills properties the contact does not have yet (missing, null or empty), unless overwrite_metadata is true.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": [
                    "string",
                    "number",
                    "boolean",
                    "null"
                  ]
                }
              },
              "event_key": {
                "type": "string",
                "maxLength": 255,
                "description": "Idempotency key; a repeat call with the same key returns the original event"
              },
              "company_id": {
                "type": "string"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "occurred_at": {
                "type": "string",
                "description": "ISO timestamp; defaults to now"
              },
              "contact_name": {
                "type": "string"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "overwrite_metadata": {
                "type": "boolean",
                "description": "Replace existing contact properties with the metadata values"
              }
            }
          },
          "annotations": {
            "title": "Track event",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_automations",
          "description": "List all automations for this project",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List automations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_automation",
          "description": "Get automation details",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "automation_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "automation_id": {
                "type": "string",
                "description": "The automation ID"
              }
            }
          },
          "annotations": {
            "title": "Get automation",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_automation",
          "description": "Create a new automation",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "trigger_type",
              "messages"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Automation name"
              },
              "enabled": {
                "type": "boolean",
                "default": true,
                "description": "Whether enabled"
              },
              "messages": {
                "type": "object",
                "description": "Messages by locale (e.g. {\"en\": \"Hello!\"})",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time"
                ],
                "type": "string",
                "default": "once_ever",
                "description": "How often to fire"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_type": {
                "enum": [
                  "page_visit",
                  "first_message",
                  "api_trigger",
                  "email_capture"
                ],
                "type": "string",
                "description": "Trigger type"
              },
              "delay_seconds": {
                "type": "number",
                "default": 0,
                "description": "Delay before showing"
              },
              "trigger_config": {
                "type": "object",
                "description": "Trigger configuration",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            }
          },
          "annotations": {
            "title": "Create automation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_automation",
          "description": "Update an automation",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "automation_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New name"
              },
              "enabled": {
                "type": "boolean",
                "description": "Enable/disable"
              },
              "messages": {
                "type": "object",
                "description": "New messages by locale",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time"
                ],
                "type": "string",
                "description": "New frequency"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_type": {
                "enum": [
                  "page_visit",
                  "first_message",
                  "api_trigger",
                  "email_capture"
                ],
                "type": "string",
                "description": "New trigger type"
              },
              "automation_id": {
                "type": "string",
                "description": "The automation ID"
              },
              "delay_seconds": {
                "type": "number",
                "description": "New delay"
              },
              "trigger_config": {
                "type": "object",
                "description": "New trigger configuration",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            }
          },
          "annotations": {
            "title": "Update automation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "toggle_automation",
          "description": "Enable or disable an automation",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "automation_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether to enable or disable"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "automation_id": {
                "type": "string",
                "description": "The automation ID"
              }
            }
          },
          "annotations": {
            "title": "Toggle automation",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_guides",
          "description": "List all guides for this project",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List guides",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_guide",
          "description": "Get guide details",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id"
            ],
            "properties": {
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get guide",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_guide",
          "description": "Create a new guide",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "trigger_type",
              "steps"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Guide name (internal label, not shown to visitors). A slug for host-page calls is generated from it and returned."
              },
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "title",
                    "content"
                  ],
                  "properties": {
                    "type": {
                      "enum": [
                        "popup",
                        "tooltip"
                      ],
                      "type": "string",
                      "description": "Step type"
                    },
                    "title": {
                      "type": "object",
                      "description": "Title by locale",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "advance": {
                      "type": "object",
                      "required": [
                        "on"
                      ],
                      "properties": {
                        "on": {
                          "enum": [
                            "next",
                            "click",
                            "navigate",
                            "element"
                          ],
                          "type": "string",
                          "description": "What advances past this step. Default: next (the visitor presses the button)."
                        },
                        "pattern": {
                          "type": "string",
                          "description": "URL pattern to wait for. Required for on=\"navigate\". Matched like a route trigger (see match_type)."
                        },
                        "selector": {
                          "type": "string",
                          "description": "CSS selector to wait for. Required for on=\"click\" and on=\"element\"."
                        },
                        "match_type": {
                          "enum": [
                            "contains",
                            "starts_with",
                            "exact"
                          ],
                          "type": "string",
                          "description": "How `pattern` is matched. Default: contains."
                        },
                        "timeout_ms": {
                          "type": "number",
                          "description": "Give up waiting after this long and let the Next button take over. The Next button stays available the whole time — a waiting step never traps the visitor."
                        }
                      },
                      "description": "What advances past this step. Omit for Next-button only."
                    },
                    "content": {
                      "type": "object",
                      "description": "Content by locale. Supports a safe inline subset: **bold**, `code`, [text](url), and \\n line breaks.",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "position": {
                      "enum": [
                        "top",
                        "bottom",
                        "left",
                        "right"
                      ],
                      "type": "string",
                      "description": "Tooltip position — a preference; the widget flips and clamps to stay on screen."
                    },
                    "selector": {
                      "type": "string",
                      "description": "CSS selector for tooltip target"
                    },
                    "article_id": {
                      "type": "string",
                      "description": "Help-centre article this step links to, so a guide can hand off to the docs natively."
                    }
                  }
                },
                "description": "Guide steps"
              },
              "title": {
                "type": "object",
                "description": "Guide title by locale, e.g. {\"en\":\"Change your plan\"}. Shown to visitors.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "enabled": {
                "type": "boolean",
                "default": true,
                "description": "Whether enabled"
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time"
                ],
                "type": "string",
                "default": "once_ever",
                "description": "How often to show"
              },
              "start_url": {
                "type": "string",
                "description": "Where this guide runs, as a same-origin path template against the visitor's stored properties, e.g. \"{{app_base_path}}/documents/add/invoice\". When a visitor starts the guide from elsewhere, the widget navigates there first (via the host router when available). Same-origin paths only; missing properties fail closed to popup mode."
              },
              "conditions": {
                "type": "object",
                "required": [
                  "rules"
                ],
                "properties": {
                  "match": {
                    "enum": [
                      "all",
                      "any"
                    ],
                    "type": "string",
                    "description": "How rules combine. Default: all."
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "field",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "description": "One of: properties.<key> (host-supplied via set/identify), visitor.first_seen_at, contact.created_at, guide.completed:<guide_id>, event.count:<event_name>"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": [
                                  "string",
                                  "number"
                                ]
                              }
                            }
                          ],
                          "description": "Comparison value. Required for equals/not_equals/gt/lt/in/not_in; omitted for exists/not_exists. Dates compare as dates (ISO strings)."
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "not_equals",
                            "exists",
                            "not_exists",
                            "gt",
                            "lt",
                            "in",
                            "not_in"
                          ],
                          "type": "string",
                          "description": "Comparison. `not_exists` is the only operator that passes on an absent field."
                        }
                      }
                    },
                    "description": "Audience rules. Fail-closed: a rule referencing something absent excludes the visitor."
                  }
                },
                "description": "Audience conditions, evaluated server-side: an ineligible visitor receives nothing at all. guide.completed:<id> and event.count:<name> enable completion-style targeting (e.g. not_exists on guide.completed:<onboarding-id>)."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "description": {
                "type": "object",
                "description": "One-line description by locale. Shown under the title.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_type": {
                "enum": [
                  "manual",
                  "route",
                  "event"
                ],
                "type": "string",
                "description": "Trigger type"
              },
              "delay_seconds": {
                "type": "number",
                "default": 0,
                "description": "Delay before showing"
              },
              "trigger_config": {
                "type": "object",
                "description": "Trigger configuration",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "show_in_suggestions": {
                "type": "boolean",
                "description": "Offer this guide to a visitor typing a matching question. Requires `title`. Independent of trigger_type: a route guide may fire on arrival and still be offered in chat."
              }
            }
          },
          "annotations": {
            "title": "Create guide",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_guide",
          "description": "Update a guide",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New name. The slug does NOT change — host-page calls keep working across renames."
              },
              "steps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "type",
                    "title",
                    "content"
                  ],
                  "properties": {
                    "type": {
                      "enum": [
                        "popup",
                        "tooltip"
                      ],
                      "type": "string",
                      "description": "Step type"
                    },
                    "title": {
                      "type": "object",
                      "description": "Title by locale",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "advance": {
                      "type": "object",
                      "required": [
                        "on"
                      ],
                      "properties": {
                        "on": {
                          "enum": [
                            "next",
                            "click",
                            "navigate",
                            "element"
                          ],
                          "type": "string",
                          "description": "What advances past this step. Default: next (the visitor presses the button)."
                        },
                        "pattern": {
                          "type": "string",
                          "description": "URL pattern to wait for. Required for on=\"navigate\". Matched like a route trigger (see match_type)."
                        },
                        "selector": {
                          "type": "string",
                          "description": "CSS selector to wait for. Required for on=\"click\" and on=\"element\"."
                        },
                        "match_type": {
                          "enum": [
                            "contains",
                            "starts_with",
                            "exact"
                          ],
                          "type": "string",
                          "description": "How `pattern` is matched. Default: contains."
                        },
                        "timeout_ms": {
                          "type": "number",
                          "description": "Give up waiting after this long and let the Next button take over. The Next button stays available the whole time — a waiting step never traps the visitor."
                        }
                      },
                      "description": "What advances past this step. Omit for Next-button only."
                    },
                    "content": {
                      "type": "object",
                      "description": "Content by locale. Supports a safe inline subset: **bold**, `code`, [text](url), and \\n line breaks.",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "position": {
                      "enum": [
                        "top",
                        "bottom",
                        "left",
                        "right"
                      ],
                      "type": "string",
                      "description": "Tooltip position — a preference; the widget flips and clamps to stay on screen."
                    },
                    "selector": {
                      "type": "string",
                      "description": "CSS selector for tooltip target"
                    },
                    "article_id": {
                      "type": "string",
                      "description": "Help-centre article this step links to, so a guide can hand off to the docs natively."
                    }
                  }
                },
                "description": "New steps"
              },
              "title": {
                "type": "object",
                "description": "Guide title by locale. Shown to visitors.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "enabled": {
                "type": "boolean",
                "description": "Enable/disable"
              },
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "frequency": {
                "enum": [
                  "once_ever",
                  "once_per_session",
                  "every_time"
                ],
                "type": "string",
                "description": "New frequency"
              },
              "start_url": {
                "type": "string",
                "description": "Where this guide runs — same-origin path template, e.g. \"{{app_base_path}}/documents/add/invoice\". Empty string clears it."
              },
              "conditions": {
                "type": "object",
                "required": [
                  "rules"
                ],
                "properties": {
                  "match": {
                    "enum": [
                      "all",
                      "any"
                    ],
                    "type": "string",
                    "description": "How rules combine. Default: all."
                  },
                  "rules": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "field",
                        "operator"
                      ],
                      "properties": {
                        "field": {
                          "type": "string",
                          "description": "One of: properties.<key> (host-supplied via set/identify), visitor.first_seen_at, contact.created_at, guide.completed:<guide_id>, event.count:<event_name>"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": [
                                  "string",
                                  "number"
                                ]
                              }
                            }
                          ],
                          "description": "Comparison value. Required for equals/not_equals/gt/lt/in/not_in; omitted for exists/not_exists. Dates compare as dates (ISO strings)."
                        },
                        "operator": {
                          "enum": [
                            "equals",
                            "not_equals",
                            "exists",
                            "not_exists",
                            "gt",
                            "lt",
                            "in",
                            "not_in"
                          ],
                          "type": "string",
                          "description": "Comparison. `not_exists` is the only operator that passes on an absent field."
                        }
                      }
                    },
                    "description": "Audience rules. Fail-closed: a rule referencing something absent excludes the visitor."
                  }
                },
                "description": "Audience conditions, evaluated server-side before the guide is sent. Pass an empty rules array to clear."
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "description": {
                "type": "object",
                "description": "One-line description by locale.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "trigger_type": {
                "enum": [
                  "manual",
                  "route",
                  "event"
                ],
                "type": "string",
                "description": "New trigger type"
              },
              "delay_seconds": {
                "type": "number",
                "description": "New delay"
              },
              "trigger_config": {
                "type": "object",
                "description": "New trigger config",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "show_in_suggestions": {
                "type": "boolean",
                "description": "Offer this guide to a visitor typing a matching question. Independent of trigger_type."
              }
            }
          },
          "annotations": {
            "title": "Update guide",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "toggle_guide",
          "description": "Enable or disable a guide",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id",
              "enabled"
            ],
            "properties": {
              "enabled": {
                "type": "boolean",
                "description": "Whether to enable or disable"
              },
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Toggle guide",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_guide",
          "description": "Permanently delete a guide and its execution history",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id"
            ],
            "properties": {
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete guide",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_guide_stats",
          "description": "Per-guide analytics: triggers, completions, completion rate, per-step drop-off, selector misses",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id"
            ],
            "properties": {
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "since_days": {
                "type": "number",
                "description": "Count only executions from the last N days. Omit for all time."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get guide stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_guide_health",
          "description": "Which guides had steps fail to anchor recently — the signal that a selector rotted in the target app",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "since_days": {
                "type": "number",
                "default": 7,
                "description": "Look at misses from the last N days. Default: 7."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get guide health",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_guide",
          "description": "Validate a guide's start location and step selectors against the live pages the developer is logged into. Results are recorded by the widget's authoring mode (?hal_guide_debug=1 on any page where the widget runs); this tool returns the newest snapshot per page, so a guide that spans pages reports each of them.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "guide_id"
            ],
            "properties": {
              "guide_id": {
                "type": "string",
                "description": "The guide ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Validate guide",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "tag_message",
          "description": "Add tags to a message. Merges with existing tags (deduplicates). If Damper integration is enabled and a tag matches tags_to_sync, pushes the conversation to Damper as feedback.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "message_id",
              "tags"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags to add to the message"
              },
              "message_id": {
                "type": "string",
                "description": "The message ID to tag"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Tag message",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "untag_message",
          "description": "Remove specific tags from a message",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "message_id",
              "tags"
            ],
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tags to remove"
              },
              "message_id": {
                "type": "string",
                "description": "The message ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Untag message",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "list_message_tags",
          "description": "List all tags defined for this project",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List message tags",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_message_tags_stats",
          "description": "Get all project tags with their usage counts",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get message tags stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_teams",
          "description": "List all teams for this project with member and conversation counts",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List teams",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_team",
          "description": "Get a team with its members",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "team_id"
            ],
            "properties": {
              "team_id": {
                "type": "string",
                "description": "The team ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get team",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_macros",
          "description": "List shared macros (available to all team members)",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List macros",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_macro",
          "description": "Get a single shared macro by ID",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "macro_id"
            ],
            "properties": {
              "macro_id": {
                "type": "string",
                "description": "The macro ID"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get macro",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_webhooks",
          "description": "List all webhooks for this project",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "List webhooks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_webhook",
          "description": "Create a new webhook",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "url",
              "events"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The webhook URL to receive events"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Event types to subscribe to (e.g. conversation.created, message.created)"
              },
              "secret": {
                "type": "string",
                "description": "Optional HMAC secret for signature verification"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Create webhook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_webhook",
          "description": "Update an existing webhook",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "webhook_id"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "New webhook URL"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "New event types"
              },
              "secret": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New secret (null to remove)"
              },
              "enabled": {
                "type": "boolean",
                "description": "Enable or disable the webhook"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "webhook_id": {
                "type": "string",
                "description": "The webhook ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Update webhook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_webhook",
          "description": "Delete a webhook",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "webhook_id"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "webhook_id": {
                "type": "string",
                "description": "The webhook ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Delete webhook",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_statistics",
          "description": "Get project statistics including responsiveness, conversation volume, and per-agent metrics. Defaults to last 30 days.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "end_date": {
                "type": "string",
                "description": "End date (ISO 8601, e.g. 2025-01-31)"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "start_date": {
                "type": "string",
                "description": "Start date (ISO 8601, e.g. 2025-01-01)"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get statistics",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_sender_domain",
          "description": "Get the custom sender domain (Starter plan and above) configured for this project, including DNS records, verification status, and any Reply-To override (`sender_domain.reply_to`, alongside the top-level `reply_to` this project's emails actually use).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Get sender domain",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "configure_sender_domain",
          "description": "Configure a custom sender domain for visitor-facing email on this project (Starter plan and above). Returns DNS records (DKIM CNAMEs, and MX/TXT if a mail-from subdomain is set) that the user must add themselves at their DNS provider before the domain can verify. Reply-To stays on the HAL inbound address so inbound routing keeps working, unless a Reply-To override is set afterwards with update_sender_identity.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "domain",
              "local_part"
            ],
            "properties": {
              "domain": {
                "type": "string",
                "description": "The domain to send from, e.g. mail.yourcompany.com"
              },
              "local_part": {
                "type": "string",
                "description": "The local part of the From address, e.g. \"support\""
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "sender_name": {
                "type": "string",
                "description": "Display name to use in From. Defaults to the project name."
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "mail_from_subdomain": {
                "type": "string",
                "description": "Optional custom MAIL FROM subdomain label, e.g. \"bounce\""
              }
            }
          },
          "annotations": {
            "title": "Configure sender domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "check_sender_domain",
          "description": "Re-check the project's custom sender domain verification status against Amazon SES.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Check sender domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_sender_identity",
          "description": "Update the local part, display sender name, and/or Reply-To override of the configured sender domain, without changing the domain itself. By default, Reply-To stays on the HAL inbound address so inbound routing/threading keep working. Setting `reply_to` overrides that with the given address - it must already forward into the project's HAL inbound address, or replies will be lost. Pass an empty string or omit `reply_to` as `null` to clear an existing override and revert to the HAL address.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "reply_to": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Reply-To override, a single bare email address (e.g. support@yourcompany.com) that already forwards into the HAL inbound address. Pass an empty string or null to clear the override."
              },
              "local_part": {
                "type": "string",
                "description": "New local part of the From address"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "sender_name": {
                "type": "string",
                "description": "New display name to use in From"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Update sender identity",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "remove_sender_domain",
          "description": "Remove the project's custom sender domain. Visitor-facing email reverts to the default Hal address.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Remove sender domain",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "import_conversation",
          "description": "Import a single historical conversation silently (no webhooks, no notifications). Use for migrating data from other chat platforms.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "visitor",
              "messages"
            ],
            "properties": {
              "visitor": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Visitor display name"
                  },
                  "email": {
                    "type": "string",
                    "description": "Visitor email (used for matching existing visitors)"
                  },
                  "user_id": {
                    "type": "string",
                    "description": "Authenticated user ID from source system"
                  },
                  "external_id": {
                    "type": "string",
                    "description": "External ID from source system"
                  }
                },
                "description": "Visitor info — matched by email first, then user_id, then external_id, or creates new"
              },
              "messages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "role",
                    "content"
                  ],
                  "properties": {
                    "role": {
                      "enum": [
                        "visitor",
                        "agent",
                        "system"
                      ],
                      "type": "string",
                      "description": "Who sent the message"
                    },
                    "content": {
                      "type": "string",
                      "description": "Message content"
                    },
                    "created_at": {
                      "type": "string",
                      "description": "ISO 8601 timestamp (messages auto-spaced 1s apart if omitted)"
                    },
                    "is_internal": {
                      "type": "boolean",
                      "default": false,
                      "description": "Whether this is an internal note (not visible to visitor)"
                    },
                    "sender_name": {
                      "type": "string",
                      "description": "Display name of the sender"
                    },
                    "sender_email": {
                      "type": "string",
                      "description": "Email of the sender"
                    }
                  }
                },
                "maxItems": 1000,
                "minItems": 1,
                "description": "Messages to import (1-1000, ordered chronologically)"
              },
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "conversation": {
                "type": "object",
                "properties": {
                  "status": {
                    "enum": [
                      "open",
                      "resolved"
                    ],
                    "type": "string",
                    "default": "resolved",
                    "description": "Conversation status (default: resolved)"
                  },
                  "created_at": {
                    "type": "string",
                    "description": "ISO 8601 timestamp for when the conversation was created"
                  },
                  "external_id": {
                    "type": "string",
                    "description": "External ID from source system (stored for reference)"
                  }
                },
                "description": "Conversation metadata (defaults to resolved status)"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              }
            }
          },
          "annotations": {
            "title": "Import conversation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "import_conversations",
          "description": "Import multiple historical conversations in batch (max 100). Each conversation is imported independently — one failure does not affect others. Silent: no webhooks, no notifications.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversations"
            ],
            "properties": {
              "project_id": {
                "type": "string",
                "description": "Target project ID"
              },
              "project_slug": {
                "type": "string",
                "description": "Target project slug (helpdesk slug)"
              },
              "conversations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "visitor",
                    "messages"
                  ],
                  "properties": {
                    "visitor": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Visitor display name"
                        },
                        "email": {
                          "type": "string",
                          "description": "Visitor email (used for matching existing visitors)"
                        },
                        "user_id": {
                          "type": "string",
                          "description": "Authenticated user ID from source system"
                        },
                        "external_id": {
                          "type": "string",
                          "description": "External ID from source system"
                        }
                      },
                      "description": "Visitor info"
                    },
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "role",
                          "content"
                        ],
                        "properties": {
                          "role": {
                            "enum": [
                              "visitor",
                              "agent",
                              "system"
                            ],
                            "type": "string",
                            "description": "Who sent the message"
                          },
                          "content": {
                            "type": "string",
                            "description": "Message content"
                          },
                          "created_at": {
                            "type": "string",
                            "description": "ISO 8601 timestamp (messages auto-spaced 1s apart if omitted)"
                          },
                          "is_internal": {
                            "type": "boolean",
                            "default": false,
                            "description": "Whether this is an internal note (not visible to visitor)"
                          },
                          "sender_name": {
                            "type": "string",
                            "description": "Display name of the sender"
                          },
                          "sender_email": {
                            "type": "string",
                            "description": "Email of the sender"
                          }
                        }
                      },
                      "maxItems": 1000,
                      "minItems": 1,
                      "description": "Messages (1-1000)"
                    },
                    "conversation": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "enum": [
                            "open",
                            "resolved"
                          ],
                          "type": "string",
                          "default": "resolved",
                          "description": "Conversation status (default: resolved)"
                        },
                        "created_at": {
                          "type": "string",
                          "description": "ISO 8601 timestamp for when the conversation was created"
                        },
                        "external_id": {
                          "type": "string",
                          "description": "External ID from source system (stored for reference)"
                        }
                      },
                      "description": "Conversation metadata"
                    }
                  }
                },
                "maxItems": 100,
                "minItems": 1,
                "description": "Conversations to import (1-100)"
              }
            }
          },
          "annotations": {
            "title": "Import conversations",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": []
    },
    "instructions": "Start with list_projects; every other tool takes a project. To answer a conversation: get_conversation, then find_relevant_articles for help articles that fit it (generate_ai_response_suggestion drafts a whole answer and uses AI quota), then set_typing right before you write the reply, then reply_to_conversation. Skip set_typing for internal notes. If get_conversation shows agents_typing, a teammate is already replying. To show a help article to the visitor, write `[label](hal-article:<article id or slug>)` into the `content` of reply_to_conversation. The widget renders it as a clickable card at that spot, on its own line (it is not an inline link inside a sentence), so put it between sentences or paragraphs, e.g. \"Refunds take 5 days.\\n[Refund policy](hal-article:refund-policy)\\nAnything else?\". The label is the card title, so use the article title. Several cards in one reply are fine. Only published articles the visitor may see are accepted; each reference is checked and rewritten to the slug for the visitor's language. Find the right article with find_relevant_articles (matched to the conversation, or to your own query), or list_articles with published_only."
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}