{
  "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.favcrm.io",
    "site": "favcrm.io",
    "addresses": [
      {
        "address": "104.18.10.118",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "prefix": "104.18.0.0/20",
          "country": "US",
          "name": "CLOUDFLARENET - Cloudflare, Inc."
        }
      },
      {
        "address": "104.18.11.118",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "name": "CLOUDFLARENET - Cloudflare, Inc.",
          "prefix": "104.18.0.0/20",
          "country": "US"
        }
      },
      {
        "address": "2606:4700::6812:b76",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "prefix": "2606:4700::/44",
          "country": "US",
          "name": "CLOUDFLARENET - Cloudflare, Inc."
        }
      },
      {
        "address": "2606:4700::6812:a76",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": {
          "asn": 13335,
          "prefix": "2606:4700::/44",
          "country": "US",
          "name": "CLOUDFLARENET - Cloudflare, Inc."
        }
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "104.18.10.118",
          "104.18.11.118",
          "2606:4700::6812:b76",
          "2606:4700::6812:a76"
        ],
        "first_seen": "2026-11-23T18:15:04.323Z",
        "last_seen": "2026-11-23T18:15:04.323Z",
        "checks": 1
      },
      {
        "addresses": [
          "104.18.10.118",
          "104.18.11.118",
          "2606:4700::6812:a76",
          "2606:4700::6812:b76"
        ],
        "first_seen": "2026-11-22T18:14:03.678Z",
        "last_seen": "2026-11-22T18:14:03.678Z",
        "checks": 1
      },
      {
        "addresses": [
          "104.18.11.118",
          "104.18.10.118",
          "2606:4700::6812:a76",
          "2606:4700::6812:b76"
        ],
        "first_seen": "2026-11-21T13:28:02.633Z",
        "last_seen": "2026-11-21T13:28:02.633Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "favcrm",
      "version": "1.0.0",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare",
      "strict-transport-security": "max-age=31536000",
      "access-control-allow-origin": "*"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "io.favcrm",
      "total": 0,
      "sample": []
    },
    "same_repository": {
      "repository_url": "https://github.com/favcrm/mcp",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "23024",
    "server_name": "io.favcrm/favcrm",
    "url": "https://api.favcrm.io/mcp",
    "host": "api.favcrm.io",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T18:15:04.323Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "bfcee9db991d26633c7b17c37b27d41e63036ddda5659bf0df90387f10abf5d0",
    "first_listed_at": "2026-11-21T13:28:02.633Z",
    "created_at": "2026-11-21T07:55:06.640Z",
    "resolved_addresses": [
      "104.18.10.118",
      "104.18.11.118",
      "2606:4700::6812:b76",
      "2606:4700::6812:a76"
    ]
  },
  "server": {
    "name": "io.favcrm/favcrm",
    "title": "FavCRM",
    "description": "Agentic CRM for service businesses — bookings, customers, WhatsApp, loyalty, invoicing.",
    "version": "1.0.0",
    "registry_status": "active",
    "repository_url": "https://github.com/favcrm/mcp",
    "website_url": "https://favcrm.io",
    "published_at": "2026-06-08T02:14:20.464Z",
    "updated_at": "2026-06-08T02:14:20.464Z",
    "first_seen": "2026-11-21T07:55:05.965Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [
      "calls-models",
      "controls-browser",
      "runs-agents",
      "sends-messages",
      "takes-payment"
    ],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-23T18:15:07.828Z"
  },
  "operator": {
    "key": "favcrm.io",
    "name": "favcrm.io",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 3,
    "answered_percent": 100,
    "avg_listing_latency_ms": 1509,
    "first_check_in_window": "2026-11-21T13:28:02.633Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "bfcee9db991d26633c7b17c37b27d41e63036ddda5659bf0df90387f10abf5d0",
    "tools": 244,
    "resources": 5,
    "prompts": 37,
    "first_seen": "2026-11-23T18:15:06.615Z",
    "tool_names": [
      "search_members",
      "get_member_profile",
      "preview_customer_import",
      "commit_customer_import",
      "create_account",
      "update_account",
      "delete_account",
      "list_tags",
      "create_tag",
      "update_tag",
      "delete_tag",
      "attach_tags",
      "detach_tags",
      "list_tiers",
      "get_membership_tier",
      "issue_rewards",
      "enrol_membership",
      "get_loyalty_balance",
      "earn_loyalty_points",
      "get_dashboard_stats",
      "list_bookings",
      "get_booking_detail",
      "get_booking_stats",
      "get_available_slots",
      "list_services",
      "get_service_detail",
      "get_service_tier_pricing",
      "set_service_tier_pricing",
      "copy_service_tier_pricing",
      "create_service",
      "update_service",
      "create_service_schedule",
      "list_service_schedules",
      "update_service_schedule",
      "assign_staff_to_service",
      "link_resource_to_service",
      "list_service_categories",
      "create_service_category",
      "create_resource",
      "set_resource_availability",
      "set_staff_availability",
      "get_booking_settings",
      "update_booking_settings",
      "list_tickets",
      "get_ticket_stats",
      "create_ticket",
      "update_ticket_status",
      "list_surveys",
      "create_survey",
      "get_survey",
      "update_survey",
      "archive_survey",
      "get_survey_stats",
      "get_survey_responses",
      "list_survey_invitations",
      "create_survey_invitation",
      "list_survey_workflows",
      "upsert_survey_workflow",
      "list_deals",
      "get_deal",
      "create_deal",
      "update_deal",
      "delete_deal",
      "update_deal_stage",
      "mark_deal_won",
      "mark_deal_lost",
      "convert_lead",
      "list_contacts",
      "get_contact",
      "create_contact",
      "update_contact",
      "set_primary_contact",
      "delete_contact",
      "list_custom_fields",
      "get_custom_field",
      "create_custom_field",
      "update_custom_field",
      "delete_custom_field",
      "get_custom_field_values",
      "set_custom_field_values",
      "list_tasks",
      "get_task",
      "create_task",
      "update_task",
      "delete_task",
      "search_crm",
      "list_invoices",
      "get_invoice",
      "create_invoice",
      "record_invoice_payment",
      "mark_invoice_sent",
      "void_invoice",
      "delete_invoice",
      "restore_invoice",
      "get_invoice_stats",
      "list_event_registrations",
      "get_event_campaign_exclusions",
      "list_events",
      "create_event",
      "check_in_event_attendee"
    ],
    "declared": {
      "tools": [
        {
          "name": "search_members",
          "description": "Search and filter members/accounts by text, date, tier, tags or history. OAuth filters require the related read permission; activity history filters are unavailable to OAuth.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "sort": {
                "type": "string",
                "description": "Sort column: name, email, or createdAt"
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "order": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order"
              },
              "search": {
                "type": "string",
                "description": "Name, email, or phone to search"
              },
              "source": {
                "enum": [
                  "walk_in",
                  "online",
                  "pos",
                  "whatsapp",
                  "referral",
                  "import",
                  "api",
                  "shopify",
                  "woocommerce",
                  "email"
                ],
                "type": "string",
                "description": "Filter by account source"
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Filter by tag IDs"
              },
              "tierId": {
                "type": "string",
                "description": "Filter by membership tier ID"
              },
              "lifeStage": {
                "enum": [
                  "lead",
                  "active",
                  "churned",
                  "vip",
                  "prospect"
                ],
                "type": "string",
                "description": "Filter by life stage"
              },
              "hasBooking": {
                "type": "boolean",
                "description": "Filter to members with/without any booking"
              },
              "createdAfter": {
                "type": "string",
                "description": "ISO date — accounts created after this date"
              },
              "inactiveDays": {
                "type": "number",
                "description": "Members with no activity in the last N days"
              },
              "createdBefore": {
                "type": "string",
                "description": "ISO date — accounts created before this date"
              },
              "hasMembership": {
                "type": "boolean",
                "description": "Filter to members with active membership"
              },
              "lastBookingAfter": {
                "type": "string",
                "description": "ISO date — members who have a booking after this date"
              },
              "membershipStatus": {
                "enum": [
                  "active",
                  "expired",
                  "suspended"
                ],
                "type": "string",
                "description": "Filter by membership status"
              },
              "lastActivityAfter": {
                "type": "string",
                "description": "ISO date — members with activity after this date"
              },
              "lastBookingBefore": {
                "type": "string",
                "description": "ISO date — members whose last booking is before this date (or have no bookings)"
              },
              "lastActivityBefore": {
                "type": "string",
                "description": "ISO date — members with no activity since this date"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Search Members",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_member_profile",
          "description": "Get detailed profile for a specific member/account by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "accountId": {
                "type": "string",
                "description": "The account ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Member Profile",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "preview_customer_import",
          "description": "Preview a bulk customer import (max 2000 rows). Matches existing accounts by phone/email and shows create vs update actions plus points/stamps/credit deltas. Use commit_customer_import with the returned sessionId to apply.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "rows"
            ],
            "properties": {
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "rowNumber"
                  ],
                  "properties": {
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Display name"
                    },
                    "tags": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Comma-separated tag names"
                    },
                    "type": {
                      "anyOf": [
                        {
                          "enum": [
                            "individual",
                            "business",
                            "household"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Internal notes"
                    },
                    "phone": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "credit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Target wallet stored value / 儲值 (HKD)"
                    },
                    "gender": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "points": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Target loyalty points (分數)"
                    },
                    "source": {
                      "anyOf": [
                        {
                          "enum": [
                            "walk_in",
                            "online",
                            "pos",
                            "whatsapp",
                            "referral",
                            "import",
                            "api",
                            "shopify",
                            "woocommerce",
                            "email"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stamps": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "firstName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lifeStage": {
                      "anyOf": [
                        {
                          "enum": [
                            "lead",
                            "active",
                            "churned",
                            "vip",
                            "prospect"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rowNumber": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "description": "1-based row number from the source file (for error reporting)",
                      "exclusiveMinimum": 0
                    },
                    "expiryDate": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Membership expiry YYYY-MM-DD"
                    },
                    "memberCode": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Merchant member code (e.g. LIZLAB-00144)"
                    },
                    "referredBy": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Referrer account UUID, member code, phone, or email"
                    },
                    "dateOfBirth": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "YYYY-MM-DD"
                    },
                    "customFields": {
                      "anyOf": [
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Account custom fields keyed by fieldName"
                    },
                    "membershipTier": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Tier name or ID"
                    }
                  }
                },
                "maxItems": 2000,
                "minItems": 1
              },
              "filename": {
                "type": "string",
                "maxLength": 255,
                "description": "Original filename for audit"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Preview Customer Import",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "commit_customer_import",
          "description": "Commit a previewed customer import. Pass the same rows and sessionId returned by preview_customer_import. Creates/updates accounts and applies points, stamps, and credit deltas.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "sessionId",
              "rows"
            ],
            "properties": {
              "rows": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "rowNumber"
                  ],
                  "properties": {
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Display name"
                    },
                    "tags": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Comma-separated tag names"
                    },
                    "type": {
                      "anyOf": [
                        {
                          "enum": [
                            "individual",
                            "business",
                            "household"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "email": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "notes": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Internal notes"
                    },
                    "phone": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "credit": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Target wallet stored value / 儲值 (HKD)"
                    },
                    "gender": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "points": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Target loyalty points (分數)"
                    },
                    "source": {
                      "anyOf": [
                        {
                          "enum": [
                            "walk_in",
                            "online",
                            "pos",
                            "whatsapp",
                            "referral",
                            "import",
                            "api",
                            "shopify",
                            "woocommerce",
                            "email"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "stamps": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lastName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "firstName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "lifeStage": {
                      "anyOf": [
                        {
                          "enum": [
                            "lead",
                            "active",
                            "churned",
                            "vip",
                            "prospect"
                          ],
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rowNumber": {
                      "type": "integer",
                      "maximum": 9007199254740991,
                      "description": "1-based row number from the source file (for error reporting)",
                      "exclusiveMinimum": 0
                    },
                    "expiryDate": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Membership expiry YYYY-MM-DD"
                    },
                    "memberCode": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Merchant member code (e.g. LIZLAB-00144)"
                    },
                    "referredBy": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Referrer account UUID, member code, phone, or email"
                    },
                    "dateOfBirth": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "YYYY-MM-DD"
                    },
                    "customFields": {
                      "anyOf": [
                        {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Account custom fields keyed by fieldName"
                    },
                    "membershipTier": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Tier name or ID"
                    }
                  }
                },
                "maxItems": 2000,
                "minItems": 1
              },
              "sessionId": {
                "type": "string",
                "minLength": 1,
                "description": "sessionId from preview_customer_import"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Commit Customer Import",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_account",
          "description": "Create a CRM account/customer with a primary contact. Optionally enroll the account as a member; use enrol_membership later when the account already exists.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Account/customer display name"
              },
              "type": {
                "enum": [
                  "individual",
                  "business",
                  "household"
                ],
                "type": "string",
                "description": "Account type. Defaults to individual."
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "description": "Email address"
              },
              "notes": {
                "type": "string",
                "description": "Internal notes"
              },
              "phone": {
                "type": "string",
                "description": "Phone number"
              },
              "source": {
                "enum": [
                  "walk_in",
                  "online",
                  "pos",
                  "whatsapp",
                  "referral",
                  "import",
                  "api",
                  "shopify",
                  "woocommerce",
                  "email"
                ],
                "type": "string",
                "description": "Acquisition source. Defaults to api."
              },
              "tierId": {
                "type": "string",
                "description": "Membership tier ID to enroll into. If omitted, the company default tier may apply."
              },
              "address": {
                "type": "object",
                "properties": {
                  "city": {
                    "type": "string"
                  },
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "state": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  }
                },
                "description": "Postal address"
              },
              "lastName": {
                "type": "string",
                "description": "Last name for individual accounts"
              },
              "expiresAt": {
                "type": "string",
                "description": "Optional ISO expiry for the membership"
              },
              "firstName": {
                "type": "string",
                "description": "First name for individual accounts"
              },
              "lifeStage": {
                "enum": [
                  "lead",
                  "active",
                  "churned",
                  "vip",
                  "prospect"
                ],
                "type": "string",
                "description": "CRM life stage. Defaults to active."
              },
              "enrollMembership": {
                "type": "boolean",
                "description": "Whether to create an active membership immediately"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Account",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_account",
          "description": "Update CRM account/customer profile fields such as name, phone, email, life stage, owner, notes, or member code.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Account/customer display name"
              },
              "type": {
                "enum": [
                  "individual",
                  "business",
                  "household"
                ],
                "type": "string",
                "description": "Account type"
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "description": "Email address"
              },
              "notes": {
                "type": "string",
                "description": "Internal notes"
              },
              "phone": {
                "type": "string",
                "description": "Phone number"
              },
              "gender": {
                "type": "string",
                "description": "Gender"
              },
              "source": {
                "enum": [
                  "walk_in",
                  "online",
                  "pos",
                  "whatsapp",
                  "referral",
                  "import",
                  "api",
                  "shopify",
                  "woocommerce",
                  "email"
                ],
                "type": "string",
                "description": "Acquisition source"
              },
              "lastName": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Last name for individual accounts"
              },
              "accountId": {
                "type": "string",
                "description": "The account ID to update"
              },
              "firstName": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "First name for individual accounts"
              },
              "lifeStage": {
                "enum": [
                  "lead",
                  "active",
                  "churned",
                  "vip",
                  "prospect"
                ],
                "type": "string",
                "description": "CRM life stage"
              },
              "assignedTo": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Assigned team member user ID, or null to clear"
              },
              "memberCode": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Merchant member code, or null to clear"
              },
              "dateOfBirth": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "YYYY-MM-DD date of birth, or null to clear"
              },
              "referredByAccountId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Referrer account ID, or null to clear"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Account",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_account",
          "description": "Soft-delete a CRM account/customer. This releases the primary phone for future reuse while keeping account history for audit.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "accountId": {
                "type": "string",
                "description": "The account ID to soft-delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Account",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_tags",
          "description": "List all available tags for the merchant.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "search": {
                "type": "string",
                "description": "Search tags by name"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Tags",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_tag",
          "description": "Create a CRM tag for customer segmentation and organization.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Tag name"
              },
              "color": {
                "type": "string",
                "description": "Optional display color, e.g. #2563eb"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Tag",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_tag",
          "description": "Rename or recolor an existing CRM tag.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "tagId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New tag name"
              },
              "color": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "New color, or null to clear"
              },
              "tagId": {
                "type": "string",
                "description": "The tag ID to update"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Tag",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_tag",
          "description": "Delete a CRM tag and remove it from all tagged entities.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "tagId"
            ],
            "properties": {
              "tagId": {
                "type": "string",
                "description": "The tag ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Tag",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "attach_tags",
          "description": "Attach one or more tags to a member/account. Useful for segmenting members after filtering.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountIds",
              "tagId"
            ],
            "properties": {
              "tagId": {
                "type": "string",
                "description": "Tag ID to attach"
              },
              "accountIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Member/account IDs to tag (max 100)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Attach Tags",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "detach_tags",
          "description": "Detach one tag from one or more member/account records.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountIds",
              "tagId"
            ],
            "properties": {
              "tagId": {
                "type": "string",
                "description": "Tag ID to detach"
              },
              "accountIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Member/account IDs to untag (max 100)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Detach Tags",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_tiers",
          "description": "List all membership tiers with member counts and stats.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Tiers",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_membership_tier",
          "description": "Get a specific membership tier by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "tierId"
            ],
            "properties": {
              "tierId": {
                "type": "string",
                "description": "The tier ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Membership Tier",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "issue_rewards",
          "description": "Issue a gift/reward to multiple members. Requires a gift offer ID and member IDs.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "giftOfferId",
              "memberIds"
            ],
            "properties": {
              "expiresAt": {
                "type": "string",
                "description": "Optional ISO date when the reward expires"
              },
              "memberIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Member/account IDs to receive the reward (max 50)"
              },
              "giftOfferId": {
                "type": "string",
                "description": "The gift offer/reward scheme ID to issue"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Issue Rewards",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "enrol_membership",
          "description": "Enrol a member into a membership tier. Free tiers enrol immediately; paid tiers return PAYMENT_REQUIRED unless skipPriceCheck is set. Use list_tiers first to find the target tier.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "tierId": {
                "type": "string",
                "description": "The membership tier ID. Omit to enrol on the default no-tier membership."
              },
              "accountId": {
                "type": "string",
                "description": "The member/account ID to enrol"
              },
              "expiresAt": {
                "type": "string",
                "description": "Optional ISO date to override the tier-computed expiry."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Enrol Membership",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_loyalty_balance",
          "description": "Get a member's current loyalty balance — points, stamps, credits, lifetime totals, and active membership tier. Returns null if the member is not enrolled.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "accountId": {
                "type": "string",
                "description": "The member/account ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Loyalty Balance",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "earn_loyalty_points",
          "description": "Credit loyalty points or stamps to a member. Use field=\"points\" for points, \"stamps\" for stamps. Server records a transaction with the reason as audit context.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId",
              "field",
              "amount"
            ],
            "properties": {
              "field": {
                "enum": [
                  "points",
                  "stamps"
                ],
                "type": "string",
                "description": "Which loyalty unit to credit"
              },
              "amount": {
                "type": "integer",
                "maximum": 9007199254740991,
                "description": "Positive integer amount to credit",
                "exclusiveMinimum": 0
              },
              "reason": {
                "type": "string",
                "description": "Audit-trail reason (e.g. \"Booking completed\", \"Manual adjustment\")"
              },
              "accountId": {
                "type": "string",
                "description": "The member/account ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Earn Loyalty Points",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_dashboard_stats",
          "description": "Get high-level business KPIs: member count, new members this week, active subscriptions, total points issued, active promotions, rewards redeemed, messages sent.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Dashboard Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_bookings",
          "description": "List bookings with filters for date range, status, service, staff, or member.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "dateTo": {
                "type": "string",
                "description": "ISO date — bookings up to this date"
              },
              "status": {
                "enum": [
                  "draft",
                  "held",
                  "pending",
                  "confirmed",
                  "cancelled",
                  "completed",
                  "no_show"
                ],
                "type": "string",
                "description": "Filter by booking status"
              },
              "staffId": {
                "type": "string",
                "description": "Filter by staff member ID"
              },
              "dateFrom": {
                "type": "string",
                "description": "ISO date — bookings from this date"
              },
              "accountId": {
                "type": "string",
                "description": "Filter by member/account ID"
              },
              "serviceId": {
                "type": "string",
                "description": "Filter by service ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Bookings",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_booking_detail",
          "description": "Get full booking details including line items, status history, and participants.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId"
            ],
            "properties": {
              "bookingId": {
                "type": "string",
                "description": "The booking ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Booking Detail",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_booking_stats",
          "description": "Get booking counts: today, this week, this month, and breakdown by status.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Booking Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_available_slots",
          "description": "Find available booking slots for a service on a specific date.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "date"
            ],
            "properties": {
              "date": {
                "type": "string",
                "description": "ISO date to check (YYYY-MM-DD)"
              },
              "staffId": {
                "type": "string",
                "description": "Optional: filter by specific staff member"
              },
              "serviceId": {
                "type": "string",
                "description": "The service to check availability for"
              },
              "resourceId": {
                "type": "string",
                "description": "Optional: filter by specific resource"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Available Slots",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_services",
          "description": "List booking services with name, price, duration, and status.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by name"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "archived"
                ],
                "type": "string",
                "description": "Filter by status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Services",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_service_detail",
          "description": "Get full service details including addons, staff, resources, and tier pricing.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId"
            ],
            "properties": {
              "serviceId": {
                "type": "string",
                "description": "The service ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Service Detail",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_service_tier_pricing",
          "description": "Read every membership-tier pricing configuration for one booking service.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId"
            ],
            "properties": {
              "serviceId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Booking service ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Service Tier Pricing",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_service_tier_pricing",
          "description": "Set the complete pricing and booking-policy configuration for one membership tier on a booking service.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "tierId",
              "priceOverride",
              "discountPercent",
              "advanceBookingDays",
              "timeSlotPricing",
              "bookingLimits"
            ],
            "properties": {
              "tierId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Membership tier ID"
              },
              "serviceId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Booking service ID"
              },
              "bookingLimits": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "isAllowed",
                      "dailyBookingCount",
                      "weeklyBookingCount",
                      "weeklyHoursLimit"
                    ],
                    "properties": {
                      "isAllowed": {
                        "type": "boolean"
                      },
                      "weeklyHoursLimit": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "dailyBookingCount": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "weeklyBookingCount": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "maxBookableTimeslots": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "exclusiveMinimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "priceOverride": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d+(?:\\.\\d{1,2})?$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "discountPercent": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^\\d+(?:\\.\\d{1,2})?$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "timeSlotPricing": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "dayOfWeek",
                        "startTime",
                        "endTime",
                        "price"
                      ],
                      "properties": {
                        "price": {
                          "type": "number",
                          "minimum": 0
                        },
                        "endTime": {
                          "type": "string",
                          "pattern": "^(?:(?:[01]\\d|2[0-3]):[0-5]\\d|24:00)$"
                        },
                        "priority": {
                          "type": "integer",
                          "maximum": 9007199254740991,
                          "minimum": -9007199254740991
                        },
                        "dayOfWeek": {
                          "type": "array",
                          "items": {
                            "enum": [
                              "Mon",
                              "Tue",
                              "Wed",
                              "Thu",
                              "Fri",
                              "Sat",
                              "Sun"
                            ],
                            "type": "string"
                          },
                          "minItems": 1
                        },
                        "startTime": {
                          "type": "string",
                          "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "advanceBookingDays": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Service Tier Pricing",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "copy_service_tier_pricing",
          "description": "Copy the complete pricing and booking-policy configuration from one membership tier to another on the same booking service.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "sourceTierId",
              "targetTierId"
            ],
            "properties": {
              "serviceId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Booking service ID"
              },
              "sourceTierId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Membership tier to copy from"
              },
              "targetTierId": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                "description": "Membership tier to replace"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Copy Service Tier Pricing",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_service",
          "description": "Create a bookable service. Sets duration, price, capacity, and policies. Use list_service_categories first if you want to attach to an existing category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "durationMinutes"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Service name"
              },
              "type": {
                "enum": [
                  "one_on_one",
                  "group",
                  "class"
                ],
                "type": "string",
                "description": "Default one_on_one"
              },
              "price": {
                "type": "string",
                "description": "Decimal string, e.g. \"80.00\". Defaults to \"0\"."
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "archived"
                ],
                "type": "string",
                "description": "Default active"
              },
              "capacity": {
                "type": "number",
                "description": "How many participants per slot (default 1)"
              },
              "currency": {
                "type": "string",
                "description": "ISO currency code, default HKD"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "categoryId": {
                "type": "string",
                "description": "Existing service category ID"
              },
              "visibility": {
                "enum": [
                  "public",
                  "members_only",
                  "hidden"
                ],
                "type": "string",
                "description": "Visibility: public | members_only | hidden"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "requireLogin": {
                "type": "boolean",
                "description": "Default true — guests cannot book"
              },
              "requiresStaff": {
                "type": "boolean",
                "description": "Whether the service requires staff assignment"
              },
              "allowedTierIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Required when visibility=members_only"
              },
              "commissionType": {
                "anyOf": [
                  {
                    "enum": [
                      "fixed",
                      "percentage"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission type: \"fixed\" or \"percentage\""
              },
              "commissionValue": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission amount as decimal string"
              },
              "cooldownMinutes": {
                "type": "number",
                "description": "Minimum gap before bookings can be cancelled (default 0)"
              },
              "durationMinutes": {
                "type": "number",
                "description": "Duration of one booking in minutes"
              },
              "requiresResource": {
                "type": "boolean",
                "description": "Whether the service requires a resource (room/equipment)"
              },
              "commissionCurrency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission currency (ISO code)"
              },
              "requiresConfirmation": {
                "type": "boolean",
                "description": "If true, bookings start as pending and need confirm_booking"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Service",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_service",
          "description": "Update an existing booking service. Pass only the fields you want to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name"
              },
              "price": {
                "type": "string",
                "description": "Decimal string, e.g. \"80.00\""
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "archived"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "capacity": {
                "type": "number",
                "description": "Participants per slot"
              },
              "serviceId": {
                "type": "string",
                "description": "Service ID to update"
              },
              "categoryId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Category ID"
              },
              "visibility": {
                "enum": [
                  "public",
                  "members_only",
                  "hidden"
                ],
                "type": "string",
                "description": "Visibility: public | members_only | hidden"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "requireLogin": {
                "type": "boolean",
                "description": "If true, guests cannot book without an account"
              },
              "requiresStaff": {
                "type": "boolean",
                "description": "Whether the service requires staff assignment"
              },
              "commissionType": {
                "anyOf": [
                  {
                    "enum": [
                      "fixed",
                      "percentage"
                    ],
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission type: \"fixed\" or \"percentage\""
              },
              "commissionValue": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission amount as decimal string"
              },
              "cooldownMinutes": {
                "type": "number",
                "description": "Cooldown minutes between bookings"
              },
              "durationMinutes": {
                "type": "number",
                "description": "Duration of one booking in minutes"
              },
              "requiresResource": {
                "type": "boolean",
                "description": "Whether the service requires a resource (room/equipment)"
              },
              "commissionCurrency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Commission currency (ISO code)"
              },
              "requiresConfirmation": {
                "type": "boolean",
                "description": "If true, bookings start pending and need explicit confirmation"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Service",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_service_schedule",
          "description": "Create a bookable schedule window for a service, including recurring weekly/daily availability.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "date",
              "startTime",
              "endTime"
            ],
            "properties": {
              "date": {
                "type": "string",
                "description": "Start date or one-off date (YYYY-MM-DD)"
              },
              "notes": {
                "type": "string",
                "description": "Free-form notes"
              },
              "endTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "staffId": {
                "type": "string",
                "description": "Optional companyMembers.id to bind this schedule to staff"
              },
              "byWeekday": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 6,
                  "minimum": 0
                },
                "description": "Weekdays for weekly recurrence: 0=Mon, 1=Tue, ... 6=Sun"
              },
              "serviceId": {
                "type": "string",
                "description": "Service ID"
              },
              "startTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "recurrence": {
                "enum": [
                  "none",
                  "daily",
                  "weekly",
                  "monthly"
                ],
                "type": "string",
                "description": "Default none"
              },
              "resourceId": {
                "type": "string",
                "description": "Optional resource ID to bind this schedule to a room/resource"
              },
              "maxCapacity": {
                "type": "number",
                "description": "Max bookings per generated slot"
              },
              "recurrenceEndDate": {
                "type": "string",
                "description": "YYYY-MM-DD"
              },
              "recurrenceInterval": {
                "type": "number",
                "description": "Default 1"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Service Schedule",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_service_schedules",
          "description": "List schedule windows for booking services.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "dateTo": {
                "type": "string",
                "description": "YYYY-MM-DD"
              },
              "staffId": {
                "type": "string",
                "description": "Staff member ID"
              },
              "dateFrom": {
                "type": "string",
                "description": "YYYY-MM-DD"
              },
              "serviceId": {
                "type": "string",
                "description": "Service ID"
              },
              "isOverride": {
                "type": "boolean",
                "description": "Filter to override entries only"
              },
              "resourceId": {
                "type": "string",
                "description": "Resource ID (room/equipment)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Service Schedules",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_service_schedule",
          "description": "Update a service schedule window. Pass only fields to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "scheduleId"
            ],
            "properties": {
              "date": {
                "type": "string",
                "description": "Date (YYYY-MM-DD)"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Free-form notes"
              },
              "endTime": {
                "type": "string",
                "description": "End time (HH:mm)"
              },
              "staffId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Staff member ID"
              },
              "byWeekday": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "maximum": 6,
                      "minimum": 0
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Weekdays (0=Mon..6=Sun) for weekly recurrence"
              },
              "startTime": {
                "type": "string",
                "description": "Start time (HH:mm)"
              },
              "recurrence": {
                "enum": [
                  "none",
                  "daily",
                  "weekly",
                  "monthly"
                ],
                "type": "string",
                "description": "Recurrence rule: none | daily | weekly | monthly"
              },
              "resourceId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Resource ID (room/equipment)"
              },
              "scheduleId": {
                "type": "string",
                "description": "Schedule ID"
              },
              "maxCapacity": {
                "type": "number",
                "description": "Maximum capacity for this slot"
              },
              "recurrenceEndDate": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Recurrence end date (YYYY-MM-DD)"
              },
              "recurrenceInterval": {
                "type": "number",
                "description": "Recurrence interval (e.g. every N weeks)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Service Schedule",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "assign_staff_to_service",
          "description": "Assign a staff member to a booking service. Pass users.id from list_staff.userId.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "userId"
            ],
            "properties": {
              "userId": {
                "type": "string",
                "description": "users.id from list_staff.userId"
              },
              "serviceId": {
                "type": "string",
                "description": "Service ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Assign Staff To Service",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "link_resource_to_service",
          "description": "Link a room/resource to a booking service.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "resourceId"
            ],
            "properties": {
              "serviceId": {
                "type": "string",
                "description": "Service ID"
              },
              "resourceId": {
                "type": "string",
                "description": "Resource ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Link Resource To Service",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_service_categories",
          "description": "List service categories (groups for booking services like \"Treatments\", \"Classes\").",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Service Categories",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_service_category",
          "description": "Create a service category (e.g. \"Treatments\", \"Classes\") to group bookable services.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Category name"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "description": {
                "type": "string",
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Service Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_resource",
          "description": "Create a bookable resource (room, equipment, vehicle). Used by services that have requiresResource=true.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "type"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Resource name (e.g. \"Treatment Room A\")"
              },
              "type": {
                "type": "string",
                "description": "Free-form type label, e.g. \"room\", \"equipment\""
              },
              "status": {
                "enum": [
                  "active",
                  "inactive"
                ],
                "type": "string",
                "description": "Default active"
              },
              "capacity": {
                "type": "number",
                "description": "How many concurrent bookings (default 1)"
              },
              "description": {
                "type": "string",
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Resource",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "set_resource_availability",
          "description": "Add an availability window for a resource. Use day-of-week + recurring=true for weekly schedules, or a specific date for one-off blocks.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "resourceId",
              "startTime",
              "endTime"
            ],
            "properties": {
              "date": {
                "type": "string",
                "description": "YYYY-MM-DD for a specific date instead of dayOfWeek"
              },
              "type": {
                "enum": [
                  "available",
                  "blocked"
                ],
                "type": "string",
                "description": "Default available"
              },
              "endTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "dayOfWeek": {
                "enum": [
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat",
                  "sun"
                ],
                "type": "string",
                "description": "Day of week (0=Sun..6=Sat)"
              },
              "startTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "resourceId": {
                "type": "string",
                "description": "Resource ID"
              },
              "isRecurring": {
                "type": "boolean",
                "description": "Default true"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Resource Availability",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_staff_availability",
          "description": "Add an availability window for a staff member (companyMembers.id). Use day-of-week + recurring for weekly schedules, or a specific date for one-off changes.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "memberId",
              "startTime",
              "endTime"
            ],
            "properties": {
              "date": {
                "type": "string",
                "description": "YYYY-MM-DD for a specific date instead of dayOfWeek"
              },
              "type": {
                "enum": [
                  "available",
                  "blocked"
                ],
                "type": "string",
                "description": "Default available"
              },
              "endTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "memberId": {
                "type": "string",
                "description": "companyMembers.id of the staff"
              },
              "dayOfWeek": {
                "enum": [
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat",
                  "sun"
                ],
                "type": "string",
                "description": "Day of week (0=Sun..6=Sat)"
              },
              "startTime": {
                "type": "string",
                "description": "HH:MM (24h)"
              },
              "isRecurring": {
                "type": "boolean",
                "description": "Default true"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Staff Availability",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_booking_settings",
          "description": "Get global booking settings for the customer booking flow, cancellation rules, visibility options, and confirmation requirements.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Booking Settings",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_booking_settings",
          "description": "Update global booking settings. Pass only the fields you want to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "showCoupon": {
                "type": "boolean",
                "description": "Show coupon field in booking flow"
              },
              "calendarStyle": {
                "enum": [
                  "list",
                  "calendar"
                ],
                "type": "string",
                "description": "Booking flow calendar presentation"
              },
              "showAccessPass": {
                "type": "boolean",
                "description": "Show access pass/package options in booking flow"
              },
              "cooldownMessage": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 200
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional message shown when cooldown blocks a booking"
              },
              "premisePassCode": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 32
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "One premise pass code for this company. Guest templates show it only when they include the pass code variable. Empty clears it."
              },
              "blockUntilFinished": {
                "type": "boolean",
                "description": "Block customers from booking again while they have active bookings"
              },
              "globalCooldownDays": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Minimum days between customer bookings, or null to disable"
              },
              "accessPassAfterMinutes": {
                "type": "integer",
                "maximum": 1440,
                "minimum": 0,
                "description": "Minutes after booking end when the access QR remains usable"
              },
              "bookingReminderEnabled": {
                "type": "boolean",
                "description": "Send the default pre-booking reminder"
              },
              "memberReschedulingMode": {
                "enum": [
                  "disabled",
                  "merchant_only",
                  "member"
                ],
                "type": "string",
                "description": "Choose whether rescheduling is disabled, merchant-only, or available to members"
              },
              "sameDayReminderEnabled": {
                "type": "boolean",
                "description": "Send an additional same-day reminder before booking start"
              },
              "accessPassBeforeMinutes": {
                "type": "integer",
                "maximum": 1440,
                "minimum": 0,
                "description": "Minutes before booking start when the access QR becomes usable"
              },
              "allowMemberCancellation": {
                "type": "boolean",
                "description": "Allow members to cancel bookings from the customer portal"
              },
              "bookingReminderLeadHours": {
                "type": "integer",
                "maximum": 168,
                "minimum": 1,
                "description": "Hours before booking start for the default reminder"
              },
              "hideUnavailableTimeslots": {
                "type": "boolean",
                "description": "Hide unavailable timeslots instead of showing them as full"
              },
              "sameDayReminderLeadHours": {
                "type": "integer",
                "maximum": 24,
                "minimum": 1,
                "description": "Hours before booking start for the same-day reminder"
              },
              "requireBookingConfirmation": {
                "type": "boolean",
                "description": "Require merchant confirmation before bookings are confirmed"
              },
              "bookingReminderLeadHoursList": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "maximum": 168,
                  "minimum": 1
                },
                "maxItems": 4,
                "description": "Up to four reminder leads in hours. Replaces the legacy pair when set. Empty turns customer reminders off. Leads must be at least 2 hours apart."
              },
              "minimumAdvanceBookingMinutes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 43200,
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Minutes before slot start when customer booking closes. null/0 = no cutoff; set > 0 to require advance notice"
              },
              "memberCancellationCutoffHours": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 720,
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Hours before booking start when member cancellation closes, or null for no cutoff"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Booking Settings",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_tickets",
          "description": "List support tickets with optional filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by subject"
              },
              "status": {
                "enum": [
                  "open",
                  "in_progress",
                  "waiting_customer",
                  "resolved",
                  "closed"
                ],
                "type": "string",
                "description": "Filter by status"
              },
              "category": {
                "enum": [
                  "bug",
                  "feature_request",
                  "account",
                  "billing",
                  "general",
                  "other"
                ],
                "type": "string",
                "description": "Filter by category"
              },
              "priority": {
                "enum": [
                  "critical",
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "description": "Filter by priority"
              },
              "accountId": {
                "type": "string",
                "description": "Filter by CRM account ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Tickets",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_ticket_stats",
          "description": "Get ticket counts grouped by status.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Ticket Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_ticket",
          "description": "Create a support ticket for a member issue.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "subject"
            ],
            "properties": {
              "source": {
                "enum": [
                  "portal",
                  "email",
                  "phone",
                  "walk_in",
                  "api",
                  "mobile_app"
                ],
                "type": "string",
                "description": "Where the ticket originated"
              },
              "subject": {
                "type": "string",
                "description": "Ticket subject/title"
              },
              "category": {
                "enum": [
                  "bug",
                  "feature_request",
                  "account",
                  "billing",
                  "general",
                  "other"
                ],
                "type": "string",
                "description": "Ticket category"
              },
              "priority": {
                "enum": [
                  "critical",
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "description": "Ticket priority"
              },
              "accountId": {
                "type": "string",
                "description": "Member/account ID this ticket is about"
              },
              "contactName": {
                "type": "string",
                "description": "Contact name if no account ID"
              },
              "description": {
                "type": "string",
                "description": "Detailed description of the issue"
              },
              "contactEmail": {
                "type": "string",
                "description": "Contact email if no account ID"
              },
              "contactPhone": {
                "type": "string",
                "description": "Contact phone if no account ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Ticket",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_ticket_status",
          "description": "Update the status of an existing support ticket.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "ticketId",
              "status"
            ],
            "properties": {
              "status": {
                "enum": [
                  "open",
                  "in_progress",
                  "waiting_customer",
                  "resolved",
                  "closed"
                ],
                "type": "string",
                "description": "New status"
              },
              "ticketId": {
                "type": "string",
                "description": "The ticket ID to update"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Ticket Status",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_surveys",
          "description": "List surveys with optional status/search filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search survey title or description"
              },
              "status": {
                "enum": [
                  "draft",
                  "published",
                  "closed",
                  "archived"
                ],
                "type": "string",
                "description": "Filter by survey status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Surveys",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_survey",
          "description": "Create a survey with custom question blocks. Publish it later or set status to published for immediate portal access.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "title",
              "questionBlocks"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "description": "Optional URL slug; generated from title when omitted"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "description": "Survey title"
              },
              "openAt": {
                "type": "string",
                "description": "Optional ISO datetime when the survey opens"
              },
              "status": {
                "enum": [
                  "draft",
                  "published",
                  "closed",
                  "archived"
                ],
                "type": "string",
                "description": "Initial status"
              },
              "closeAt": {
                "type": "string",
                "description": "Optional ISO datetime when the survey closes"
              },
              "settings": {
                "type": "object",
                "description": "Survey settings such as allowMultipleResponses, collectEmail, collectIpAddress, requireAuthentication, showProgress, successMessage",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "visibility": {
                "enum": [
                  "public",
                  "members_only",
                  "token_only",
                  "private"
                ],
                "type": "string",
                "description": "Who can access the survey"
              },
              "description": {
                "type": "string",
                "description": "Optional survey description"
              },
              "questionBlocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "description": "Ordered survey question blocks"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Survey",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_survey",
          "description": "Get survey detail, including blocks, publishing status, visibility, settings, and response count.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Survey",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_survey",
          "description": "Update a survey draft or publishing configuration. Use questionBlocks to replace the ordered form block list.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "slug": {
                "type": "string",
                "description": "URL slug"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "description": "Survey title"
              },
              "openAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional ISO datetime when the survey opens"
              },
              "status": {
                "enum": [
                  "draft",
                  "published",
                  "closed",
                  "archived"
                ],
                "type": "string",
                "description": "Survey status"
              },
              "closeAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Optional ISO datetime when the survey closes"
              },
              "settings": {
                "type": "object",
                "description": "Survey settings such as allowMultipleResponses, collectEmail, collectIpAddress, requireAuthentication, showProgress, successMessage",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              },
              "visibility": {
                "enum": [
                  "public",
                  "members_only",
                  "token_only",
                  "private"
                ],
                "type": "string",
                "description": "Survey access mode"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Survey description"
              },
              "questionBlocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "description": "Ordered survey question blocks"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Survey",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "archive_survey",
          "description": "Archive a survey and remove it from active survey lists.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "surveyId": {
                "type": "string",
                "description": "Survey ID to archive"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Archive Survey",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": true
          }
        },
        {
          "name": "get_survey_stats",
          "description": "Get response and invitation metrics for a survey overview dashboard.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Survey Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_survey_responses",
          "description": "List responses for a survey.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max responses (default 50)"
              },
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Survey Responses",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_survey_invitations",
          "description": "List survey invitation history without exposing token hashes or old invitation tokens.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max invitations (default 50)"
              },
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Survey Invitations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_survey_invitation",
          "description": "Create a token-auth survey invitation for a specific member/account or contact.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "channel": {
                "type": "string",
                "description": "Intended channel, e.g. email, sms, whatsapp, link"
              },
              "metadata": {
                "type": "object",
                "description": "Optional invitation metadata",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              },
              "accountId": {
                "type": "string",
                "description": "CRM account ID to invite"
              },
              "contactId": {
                "type": "string",
                "description": "Contact ID to invite"
              },
              "expiresAt": {
                "type": "string",
                "description": "Optional invitation expiry ISO datetime"
              },
              "recipientName": {
                "type": "string",
                "description": "Recipient display name for link tracking"
              },
              "recipientEmail": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "description": "Recipient email for link tracking"
              },
              "recipientPhone": {
                "type": "string",
                "description": "Recipient phone for link tracking"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Survey Invitation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_survey_workflows",
          "description": "List automation workflows attached to a survey.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId"
            ],
            "properties": {
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Survey Workflows",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "upsert_survey_workflow",
          "description": "Create or update a survey automation workflow, usually triggered by survey_response_submitted.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "surveyId",
              "name",
              "graph"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Workflow name"
              },
              "graph": {
                "type": "object",
                "required": [
                  "trigger",
                  "nodes",
                  "edges"
                ],
                "properties": {
                  "edges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "nodes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "trigger": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "description": "Workflow graph definition"
              },
              "status": {
                "enum": [
                  "draft",
                  "active",
                  "disabled"
                ],
                "type": "string",
                "description": "Workflow status"
              },
              "trigger": {
                "type": "string",
                "description": "Trigger name, default from graph.trigger"
              },
              "surveyId": {
                "type": "string",
                "description": "Survey ID"
              },
              "workflowId": {
                "type": "string",
                "description": "Existing workflow ID when updating"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Upsert Survey Workflow",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_deals",
          "description": "List CRM deals (sales pipeline) with optional filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "type": "number",
                "description": "Page number (default 1)"
              },
              "limit": {
                "type": "number",
                "description": "Items per page (default 20)"
              },
              "stage": {
                "type": "string",
                "description": "Filter by stage"
              },
              "search": {
                "type": "string",
                "description": "Search by name or description"
              },
              "dealType": {
                "type": "string",
                "description": "Filter by deal type"
              },
              "accountId": {
                "type": "string",
                "description": "Filter by account"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Deals",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_deal",
          "description": "Get detailed CRM deal information by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId"
            ],
            "properties": {
              "dealId": {
                "type": "string",
                "description": "The deal ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Deal",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_deal",
          "description": "Create a CRM sales pipeline deal, optionally linked to a customer account and contact.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Deal name"
              },
              "stage": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Pipeline stage"
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal amount"
              },
              "ownerId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Owner user/team member ID"
              },
              "dealType": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal type/category"
              },
              "accountId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Linked CRM account ID"
              },
              "contactId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Linked contact ID"
              },
              "closingDate": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expected closing date"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal notes or description"
              },
              "probability": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Win probability, e.g. 25"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_deal",
          "description": "Update a CRM deal. Pass only fields to change; use null for nullable links/fields to clear them.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Deal name"
              },
              "stage": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Pipeline stage, or null to clear"
              },
              "amount": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal amount, or null to clear"
              },
              "dealId": {
                "type": "string",
                "description": "The deal ID"
              },
              "ownerId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Owner user/team member ID, or null to clear"
              },
              "dealType": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal type/category, or null to clear"
              },
              "accountId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Linked CRM account ID, or null to clear"
              },
              "contactId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Linked contact ID, or null to clear"
              },
              "closingDate": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Expected closing date, or null to clear"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Deal notes or description, or null to clear"
              },
              "probability": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Win probability, or null to clear"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_deal",
          "description": "Soft-delete a CRM deal from the sales pipeline.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId"
            ],
            "properties": {
              "dealId": {
                "type": "string",
                "description": "The deal ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Deal",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "update_deal_stage",
          "description": "Move a deal to a different pipeline stage.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId",
              "stage"
            ],
            "properties": {
              "stage": {
                "enum": [
                  "discovery",
                  "qualified",
                  "proposal",
                  "negotiation",
                  "won",
                  "lost",
                  "lead",
                  "new",
                  "open"
                ],
                "type": "string",
                "description": "New pipeline stage. \"lead\", \"new\" and \"open\" are accepted aliases of \"discovery\"."
              },
              "dealId": {
                "type": "string",
                "description": "The deal ID"
              },
              "lostReason": {
                "type": "string",
                "description": "Required when moving to lost"
              },
              "probability": {
                "type": "string",
                "description": "Optional win probability (percent string)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Deal Stage",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "mark_deal_won",
          "description": "Mark a CRM deal as won and set close date.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId"
            ],
            "properties": {
              "dealId": {
                "type": "string",
                "description": "The deal ID"
              },
              "closingDate": {
                "type": "string",
                "description": "Optional close date (YYYY-MM-DD)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Mark Deal Won",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "mark_deal_lost",
          "description": "Mark a CRM deal as lost. Requires a lost reason.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "dealId",
              "reason"
            ],
            "properties": {
              "dealId": {
                "type": "string",
                "description": "The deal ID"
              },
              "reason": {
                "type": "string",
                "description": "Why the deal was lost"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Mark Deal Lost",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "convert_lead",
          "description": "Convert an account: qualify its open lead (creating one if needed) and link exactly one pipeline deal. Also promotes lifeStage lead -> active. Safe to repeat — a second call lands on the same lead and deal. Works on accounts that are already active.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "dealName": {
                "type": "string",
                "description": "Optional deal name"
              },
              "accountId": {
                "type": "string",
                "description": "Lead account ID"
              },
              "dealStage": {
                "enum": [
                  "discovery",
                  "qualified",
                  "proposal",
                  "negotiation",
                  "won",
                  "lost",
                  "lead",
                  "new",
                  "open"
                ],
                "type": "string",
                "description": "Optional initial deal stage (\"lead\" is an alias of \"discovery\")"
              },
              "lifeStage": {
                "enum": [
                  "active",
                  "vip"
                ],
                "type": "string",
                "description": "Lifecycle after convert (default active)"
              },
              "createDeal": {
                "type": "boolean",
                "description": "Deprecated and ignored — a convert always links a deal"
              },
              "dealAmount": {
                "type": "number",
                "description": "Optional deal amount"
              },
              "dealClosingDate": {
                "type": "string",
                "description": "Optional deal close date"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Convert Lead",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_contacts",
          "description": "List contacts (people linked to CRM accounts), optionally filtered by account or search.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Match name, email, or phone"
              },
              "accountId": {
                "type": "string",
                "description": "Filter by account"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Contacts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_contact",
          "description": "Fetch a single contact by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contactId"
            ],
            "properties": {
              "contactId": {
                "type": "string",
                "description": "The contact ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Contact",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_contact",
          "description": "Create a contact on an existing CRM account.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId",
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Contact name"
              },
              "email": {
                "type": "string",
                "description": "Email"
              },
              "phone": {
                "type": "string",
                "description": "Phone"
              },
              "jobTitle": {
                "type": "string",
                "description": "Job title"
              },
              "accountId": {
                "type": "string",
                "description": "Owning account ID"
              },
              "isPrimary": {
                "type": "boolean",
                "description": "Mark as primary contact"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_contact",
          "description": "Update fields on an existing contact.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contactId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name"
              },
              "email": {
                "type": "string",
                "description": "Email address"
              },
              "phone": {
                "type": "string",
                "description": "Phone number"
              },
              "jobTitle": {
                "type": "string",
                "description": "Job title"
              },
              "contactId": {
                "type": "string",
                "description": "The contact ID"
              },
              "isPrimary": {
                "type": "boolean",
                "description": "Mark as the primary contact"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_primary_contact",
          "description": "Set a contact as the primary contact for its CRM account and demote other contacts on that account.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contactId"
            ],
            "properties": {
              "contactId": {
                "type": "string",
                "description": "The contact ID to make primary"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Primary Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_contact",
          "description": "Delete a secondary contact. Primary contacts are protected; set another primary contact or delete the account instead.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "contactId"
            ],
            "properties": {
              "contactId": {
                "type": "string",
                "description": "The contact ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Contact",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_custom_fields",
          "description": "List custom field definitions for CRM entities such as account, contact, deal, or booking.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType"
            ],
            "properties": {
              "entityType": {
                "enum": [
                  "account",
                  "contact",
                  "deal",
                  "booking",
                  "ticket",
                  "product",
                  "post"
                ],
                "type": "string",
                "description": "Entity type the custom fields belong to"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Custom Fields",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_custom_field",
          "description": "Get a custom field definition by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "definitionId"
            ],
            "properties": {
              "definitionId": {
                "type": "string",
                "description": "Custom field definition ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Custom Field",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_custom_field",
          "description": "Create a custom field definition for CRM entities. Use options for select or multiselect fields.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "fieldName",
              "fieldLabel",
              "fieldType"
            ],
            "properties": {
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed values for select/multiselect fields"
              },
              "fieldName": {
                "type": "string",
                "minLength": 1,
                "description": "Stable machine name, e.g. preferred_branch"
              },
              "fieldType": {
                "enum": [
                  "text",
                  "number",
                  "date",
                  "select",
                  "multiselect",
                  "boolean",
                  "url",
                  "email",
                  "phone"
                ],
                "type": "string",
                "description": "Field type"
              },
              "sortOrder": {
                "type": "number",
                "description": "Display order"
              },
              "entityType": {
                "enum": [
                  "account",
                  "contact",
                  "deal",
                  "booking",
                  "ticket",
                  "product",
                  "post"
                ],
                "type": "string",
                "description": "Entity type, e.g. account, contact, deal, booking"
              },
              "fieldLabel": {
                "type": "string",
                "minLength": 1,
                "description": "Human-readable label, e.g. Preferred branch"
              },
              "isRequired": {
                "type": "boolean",
                "description": "Whether this field is required"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Custom Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_custom_field",
          "description": "Update a custom field definition label, type, options, required flag, or sort order.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "definitionId"
            ],
            "properties": {
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Allowed values for select/multiselect fields"
              },
              "fieldType": {
                "enum": [
                  "text",
                  "number",
                  "date",
                  "select",
                  "multiselect",
                  "boolean",
                  "url",
                  "email",
                  "phone"
                ],
                "type": "string",
                "description": "Field type"
              },
              "sortOrder": {
                "type": "number",
                "description": "Display order"
              },
              "fieldLabel": {
                "type": "string",
                "minLength": 1,
                "description": "Human-readable label"
              },
              "isRequired": {
                "type": "boolean",
                "description": "Whether this field is required"
              },
              "definitionId": {
                "type": "string",
                "description": "Custom field definition ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Custom Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_custom_field",
          "description": "Delete a custom field definition and its stored values.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "definitionId"
            ],
            "properties": {
              "definitionId": {
                "type": "string",
                "description": "Custom field definition ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Custom Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "get_custom_field_values",
          "description": "Get custom field values for a CRM entity such as an account, contact, deal, or booking.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "entityId"
            ],
            "properties": {
              "entityId": {
                "type": "string",
                "description": "Entity ID"
              },
              "entityType": {
                "enum": [
                  "account",
                  "contact",
                  "deal",
                  "booking",
                  "ticket",
                  "product",
                  "post"
                ],
                "type": "string",
                "description": "Entity type"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Custom Field Values",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_custom_field_values",
          "description": "Set or clear custom field values for a CRM entity. Values are stored as strings; pass null to clear a value.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "entityId",
              "values"
            ],
            "properties": {
              "values": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "definitionId",
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Value to store, or null to clear"
                    },
                    "definitionId": {
                      "type": "string",
                      "description": "Custom field definition ID"
                    }
                  }
                },
                "maxItems": 100,
                "description": "Values to upsert"
              },
              "entityId": {
                "type": "string",
                "description": "Entity ID"
              },
              "entityType": {
                "enum": [
                  "account",
                  "contact",
                  "deal",
                  "booking",
                  "ticket",
                  "product",
                  "post"
                ],
                "type": "string",
                "description": "Entity type"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Custom Field Values",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_tasks",
          "description": "List tasks with optional status, assignee, and account filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "status": {
                "enum": [
                  "todo",
                  "in_progress",
                  "blocked",
                  "done"
                ],
                "type": "string",
                "description": "Filter by task status"
              },
              "accountId": {
                "type": "string",
                "description": "Filter by related CRM account"
              },
              "assigneeId": {
                "type": "string",
                "description": "Filter by assignee company_members.id"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Tasks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_task",
          "description": "Get detailed task information by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "taskId"
            ],
            "properties": {
              "taskId": {
                "type": "string",
                "description": "The task ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Task",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_task",
          "description": "Create a task. Optionally link to a CRM account or assign to a team member.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "title"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Task title"
              },
              "status": {
                "enum": [
                  "todo",
                  "in_progress",
                  "blocked",
                  "done"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "dueDate": {
                "type": "string",
                "description": "ISO date (YYYY-MM-DD)"
              },
              "priority": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ],
                "type": "string",
                "description": "Priority"
              },
              "accountId": {
                "type": "string",
                "description": "Linked CRM account"
              },
              "assigneeId": {
                "type": "string",
                "description": "company_members.id"
              },
              "description": {
                "type": "string",
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_task",
          "description": "Update a task (status, priority, assignee, due date, completion).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "taskId"
            ],
            "properties": {
              "title": {
                "type": "string",
                "description": "Title"
              },
              "status": {
                "enum": [
                  "todo",
                  "in_progress",
                  "blocked",
                  "done"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "taskId": {
                "type": "string",
                "description": "The task ID"
              },
              "dueDate": {
                "type": "string",
                "description": "Due date (ISO 8601)"
              },
              "priority": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ],
                "type": "string",
                "description": "Priority"
              },
              "assigneeId": {
                "type": "string",
                "description": "Assignee company_members.id (team member ID, not user ID)"
              },
              "description": {
                "type": "string",
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_task",
          "description": "Soft-delete a CRM task.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "taskId"
            ],
            "properties": {
              "taskId": {
                "type": "string",
                "description": "The task ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "search_crm",
          "description": "Search across CRM accounts and contacts by name, email, or phone.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "query"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max per entity (default 10)"
              },
              "query": {
                "type": "string",
                "description": "Search string"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Search Crm",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_invoices",
          "description": "List invoices with optional filters. Use status \"OVERDUE\" to find unpaid invoices past due date.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "sort": {
                "type": "string",
                "description": "Sort column"
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "order": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order"
              },
              "search": {
                "type": "string",
                "description": "Search by invoice number, account name, email, or phone"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "SENT",
                  "PARTIALLY_PAID",
                  "PAID",
                  "OVERDUE",
                  "VOID",
                  "CANCELLED"
                ],
                "type": "string",
                "description": "Filter by invoice status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Invoices",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_invoice",
          "description": "Fetch a single invoice with line items, payment history, and customer detail.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Invoice",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_invoice",
          "description": "Create a new invoice for a customer. Optionally include line items inline. Returns the new invoiceId.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "description": "Free-form notes shown on the invoice"
              },
              "dueDate": {
                "type": "string",
                "description": "Due date (ISO 8601 date)"
              },
              "currency": {
                "type": "string",
                "description": "ISO currency code (defaults to company default)"
              },
              "accountId": {
                "type": "string",
                "description": "Customer accountId (CRM account)"
              },
              "lineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "unitPrice"
                  ],
                  "properties": {
                    "quantity": {
                      "type": "number",
                      "description": "Quantity (default 1)"
                    },
                    "unitPrice": {
                      "type": "string",
                      "description": "Unit price as decimal string, e.g. \"100.00\""
                    },
                    "description": {
                      "type": "string",
                      "description": "Line item description"
                    }
                  }
                },
                "description": "Line items to bill — totals are computed server-side"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Invoice",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "record_invoice_payment",
          "description": "Record a manual payment against an invoice (cash, bank transfer, cheque, card terminal). Updates invoice status to PARTIAL or PAID based on the running total.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId",
              "amount",
              "method"
            ],
            "properties": {
              "note": {
                "type": "string",
                "description": "Internal note about this payment"
              },
              "amount": {
                "type": "string",
                "description": "Payment amount as decimal string, e.g. \"100.00\""
              },
              "method": {
                "enum": [
                  "cash",
                  "bank_transfer",
                  "cheque",
                  "card",
                  "stripe",
                  "qfpay",
                  "eftpay",
                  "yedpay",
                  "manual",
                  "member_credit",
                  "other"
                ],
                "type": "string",
                "description": "Payment method"
              },
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID to record payment against"
              },
              "reference": {
                "type": "string",
                "description": "External reference (cheque number, bank transfer ID)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Record Invoice Payment",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "mark_invoice_sent",
          "description": "Mark an invoice as sent to the customer (transitions DRAFT → OPEN). Use after delivering the invoice via email or share link. Idempotent.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Mark Invoice Sent",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "void_invoice",
          "description": "Void an invoice. Destructive — invoice can no longer be paid or edited; existing payments are preserved as history. Cannot void invoices that are already PAID or VOIDED.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID to void"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Void Invoice",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "delete_invoice",
          "description": "Delete a DRAFT invoice. Only invoices that have never been sent can be deleted; otherwise use void_invoice.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Invoice",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_invoice",
          "description": "Restore a previously deleted DRAFT invoice.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "invoiceId"
            ],
            "properties": {
              "invoiceId": {
                "type": "string",
                "description": "Invoice ID to restore"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Invoice",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_invoice_stats",
          "description": "Outstanding totals, overdue counts, and revenue this period. Used by the weekly-snapshot playbook.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Invoice Stats",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_event_registrations",
          "description": "List registrations for an event in the active company, including CRM account IDs for campaign exclusions.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "eventId"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Max results (default 50, maximum 100)"
              },
              "offset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Number of matching registrations to skip (default 0)"
              },
              "eventId": {
                "type": "string",
                "description": "Event ID"
              },
              "statuses": {
                "type": "array",
                "items": {
                  "enum": [
                    "pending",
                    "confirmed",
                    "paid",
                    "cancelled"
                  ],
                  "type": "string"
                },
                "maxItems": 4,
                "minItems": 1,
                "description": "Registration statuses to include. Omit to include all statuses."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Event Registrations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_event_campaign_exclusions",
          "description": "Resolve pending, confirmed, and paid event registrations into unique CRM account IDs for campaign exclusions. Pass accountIds to audienceExclusions only when ready=true; cancelled registrations are omitted and unmatched guests make the result not ready.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "eventId"
            ],
            "properties": {
              "eventId": {
                "type": "string",
                "description": "Event ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Event Campaign Exclusions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_events",
          "description": "List events for the active company with optional status and search filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Max results (default 20)"
              },
              "offset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Offset (default 0)"
              },
              "search": {
                "type": "string",
                "description": "Search event title or venue"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "PUBLISHED",
                  "CANCELLED",
                  "COMPLETED"
                ],
                "type": "string",
                "description": "Filter by event status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Events",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_event",
          "description": "Create a new event (initially DRAFT unless status is specified) for the active company.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Event title"
              },
              "endDate": {
                "type": "string",
                "description": "ISO end date/time"
              },
              "location": {
                "type": "string",
                "description": "Venue name"
              },
              "startDate": {
                "type": "string",
                "description": "ISO start date/time"
              },
              "visibility": {
                "enum": [
                  "public",
                  "members_only"
                ],
                "type": "string",
                "description": "Event visibility"
              },
              "description": {
                "type": "string",
                "description": "Event description or introduction"
              },
              "ticketPrice": {
                "type": "number",
                "minimum": 0,
                "description": "Ticket price in major currency units (0 for free)"
              },
              "deliveryMode": {
                "enum": [
                  "in_person",
                  "online",
                  "hybrid"
                ],
                "type": "string",
                "description": "Delivery format"
              },
              "venueAddress": {
                "type": "string",
                "description": "Street address of the venue"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Event",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "check_in_event_attendee",
          "description": "Mark an event attendee registration as present or absent for a specific event session.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "eventId",
              "sessionId",
              "registrationId"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "description": "Optional note or reason"
              },
              "status": {
                "enum": [
                  "present",
                  "absent"
                ],
                "type": "string",
                "description": "Attendance status (default: present)"
              },
              "eventId": {
                "type": "string",
                "description": "Event ID"
              },
              "sessionId": {
                "type": "string",
                "description": "Event session ID"
              },
              "registrationId": {
                "type": "string",
                "description": "Event registration ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Check In Event Attendee",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_tutor_courses",
          "description": "List structured courses and multi-session classes in the active company.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Max results (default 25)"
              },
              "offset": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "Offset (default 0)"
              },
              "status": {
                "enum": [
                  "draft",
                  "published",
                  "archived"
                ],
                "type": "string",
                "description": "Filter by course status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Tutor Courses",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_tutor_course",
          "description": "Retrieve full details, sections, and enrollment summary for a structured course.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "courseId"
            ],
            "properties": {
              "courseId": {
                "type": "string",
                "description": "Course ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Tutor Course",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_tutor_course",
          "description": "Create a new draft structured course or class curriculum.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Course title"
              },
              "level": {
                "type": "string",
                "description": "Skill or grade level label"
              },
              "endsOn": {
                "type": "string",
                "description": "Course end date (YYYY-MM-DD)"
              },
              "startsOn": {
                "type": "string",
                "description": "Course start date (YYYY-MM-DD)"
              },
              "description": {
                "type": "string",
                "description": "Course syllabus or overview"
              },
              "requiresLevelApproval": {
                "type": "boolean",
                "description": "Require instructor approval before enrollment"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Tutor Course",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_subscriptions",
          "description": "List member subscriptions. Filter by status to find active, cancelled, or past-due subscriptions.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "status": {
                "enum": [
                  "trialing",
                  "active",
                  "past_due",
                  "cancelled"
                ],
                "type": "string",
                "description": "Filter by subscription status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Subscriptions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_subscription",
          "description": "Fetch a single subscription with customer, tier, billing cycle, and renewal info.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "subscriptionId"
            ],
            "properties": {
              "subscriptionId": {
                "type": "string",
                "description": "Subscription ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Subscription",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_subscription",
          "description": "Create a manual, non-renewing subscription record for a member. Use a subscription action link for provider-backed recurring billing.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "amount": {
                "type": "number",
                "description": "Override amount per cycle (otherwise derived from tier)"
              },
              "tierId": {
                "type": "string",
                "description": "Membership tier ID — if set, amount/currency default from the tier"
              },
              "currency": {
                "type": "string",
                "description": "ISO currency code (otherwise derived from tier or company default)"
              },
              "accountId": {
                "type": "string",
                "description": "Customer accountId"
              },
              "autoRenew": {
                "type": "boolean",
                "const": false,
                "description": "Manual records cannot auto-renew"
              },
              "billingCycle": {
                "enum": [
                  "monthly",
                  "quarterly",
                  "yearly",
                  "one_off"
                ],
                "type": "string",
                "description": "Billing cycle (default monthly)"
              },
              "currentPeriodEnd": {
                "type": "string",
                "description": "Period end (ISO 8601). Defaults to start + cycle."
              },
              "currentPeriodStart": {
                "type": "string",
                "description": "Period start (ISO 8601). Defaults to now."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Subscription",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "pause_subscription",
          "description": "Mark an active manual subscription as past_due. Provider-backed subscriptions cannot be paused here — cancel them or manage them at the payment provider.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "subscriptionId"
            ],
            "properties": {
              "subscriptionId": {
                "type": "string",
                "description": "Subscription ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Pause Subscription",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "resume_subscription",
          "description": "Resume a paused manual subscription back to active. Provider-backed subscriptions must be managed at the payment provider.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "subscriptionId"
            ],
            "properties": {
              "subscriptionId": {
                "type": "string",
                "description": "Subscription ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Resume Subscription",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "cancel_subscription",
          "description": "Cancel a subscription. Destructive. Manual records are marked cancelled. Provider-backed records are cancelled with the payment provider — Stripe is scheduled to stop at the period end and QFPay is cancelled at the gateway — so auto-renew turns off and paid access continues until the period ends. If the provider is unreachable or unsupported the call fails and the subscription is left unchanged.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "subscriptionId"
            ],
            "properties": {
              "subscriptionId": {
                "type": "string",
                "description": "Subscription ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Cancel Subscription",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_campaigns",
          "description": "List marketing campaigns (email, SMS, WhatsApp, or push) with delivery stats. Use the returned IDs when excluding recipients of previous campaigns.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "sort": {
                "type": "string",
                "description": "Sort column"
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "order": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order"
              },
              "search": {
                "type": "string",
                "description": "Search by campaign name"
              },
              "channel": {
                "enum": [
                  "sms",
                  "email",
                  "whatsapp",
                  "push"
                ],
                "type": "string",
                "description": "Filter by channel"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Campaigns",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_campaign",
          "description": "Get a campaign by ID, including its recipient source, audience exclusions, channel configuration, and delivery stats.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "campaignId": {
                "type": "string",
                "description": "Campaign ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Campaign",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_campaign",
          "description": "Create an email, SMS, WhatsApp, or push campaign in DRAFT. audienceExclusions can omit specific account IDs and recipients of previous campaign IDs. For email channelConfig, use subject + htmlBody + optional plainTextBody. recipientSource=\"list\" is accepted as an alias for \"individual\".",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "channel"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Campaign name (internal)"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "SCHEDULED"
                ],
                "type": "string",
                "description": "Default DRAFT"
              },
              "channel": {
                "enum": [
                  "sms",
                  "email",
                  "whatsapp",
                  "push"
                ],
                "type": "string",
                "description": "email | sms | whatsapp | push"
              },
              "segmentId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Required if recipientSource=\"segment\""
              },
              "scheduledAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO datetime for scheduled send (status must be SCHEDULED)"
              },
              "recipientIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Required if recipientSource=\"individual\", \"list\", or \"csv\"; values are account IDs"
              },
              "channelConfig": {
                "type": "object",
                "description": "Channel-specific config: subject + htmlBody + optional plainTextBody for email; body for sms; approved templateId plus required bodyParameters, headerTextParameter, or headerMediaUrl and optional whatsappConnectionId for whatsapp. Legacy email html is normalized to htmlBody.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "recipientSource": {
                "enum": [
                  "all",
                  "segment",
                  "individual",
                  "csv",
                  "list"
                ],
                "type": "string",
                "description": "Where to source recipients from. \"list\" is normalized to \"individual\"."
              },
              "audienceExclusions": {
                "type": "object",
                "properties": {
                  "accountIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "default": [],
                    "maxItems": 1000
                  },
                  "campaignIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "default": [],
                    "maxItems": 50
                  }
                },
                "description": "Optional exclusions: accountIds contains specific customer account IDs; campaignIds contains previous campaign IDs whose accepted recipients must be omitted. A recipient matching any rule is excluded."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_campaign",
          "description": "Update an existing campaign, including audience exclusions. Channel cannot be changed after creation. Pass only fields to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "SCHEDULED",
                  "PAUSED",
                  "CANCELLED"
                ],
                "type": "string",
                "description": "New campaign status"
              },
              "segmentId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Segment ID"
              },
              "campaignId": {
                "type": "string",
                "description": "Campaign ID"
              },
              "scheduledAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Scheduled timestamp (ISO 8601)"
              },
              "recipientIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Explicit customer account IDs"
              },
              "channelConfig": {
                "type": "object",
                "description": "For email, use subject + htmlBody + optional plainTextBody. Legacy html is normalized to htmlBody.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "recipientSource": {
                "enum": [
                  "all",
                  "segment",
                  "individual",
                  "csv",
                  "list"
                ],
                "type": "string",
                "description": "Recipient source: all | segment | individual | csv | list"
              },
              "audienceExclusions": {
                "type": "object",
                "properties": {
                  "accountIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "default": [],
                    "maxItems": 1000
                  },
                  "campaignIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "default": [],
                    "maxItems": 50
                  }
                },
                "description": "Optional exclusions: accountIds contains specific customer account IDs; campaignIds contains previous campaign IDs whose accepted recipients must be omitted. Pass empty arrays to clear exclusions."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_campaign",
          "description": "Delete a campaign. Only allowed in DRAFT status; sent campaigns are kept for audit history.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "campaignId": {
                "type": "string",
                "description": "Campaign ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_campaign",
          "description": "Restore a previously deleted campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "campaignId": {
                "type": "string",
                "description": "Campaign ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Campaign",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "undo_campaign_send",
          "description": "Undo a campaign send during its one-minute safety buffer. Use immediately when the merchant says to stop or undo a submitted campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "campaignId": {
                "type": "string",
                "description": "Buffered campaign ID to return to its prior draft state"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Undo Campaign Send",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_campaign",
          "description": "Validate a campaign before sending. Resolves contactable recipient count and previews the final email subject/body without sending.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "campaignId"
            ],
            "properties": {
              "campaignId": {
                "type": "string",
                "description": "Campaign ID to validate"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Validate Campaign",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_notification_logs",
          "description": "List notification delivery logs for the current company. Recipients are masked by default for incident-response safety.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 50, max 100)"
              },
              "dateTo": {
                "type": "string",
                "description": "ISO timestamp upper bound"
              },
              "status": {
                "enum": [
                  "pending",
                  "retrying",
                  "sent",
                  "delivered",
                  "failed",
                  "skipped"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "channel": {
                "enum": [
                  "email",
                  "sms",
                  "whatsapp",
                  "push"
                ],
                "type": "string",
                "description": "Notification channel filter"
              },
              "dateFrom": {
                "type": "string",
                "description": "ISO timestamp lower bound"
              },
              "entityId": {
                "type": "string",
                "description": "Entity ID filter"
              },
              "eventType": {
                "enum": [
                  "account_created",
                  "account_updated",
                  "booking_created",
                  "booking_confirmed",
                  "booking_checked_in",
                  "booking_cancelled",
                  "booking_completed",
                  "booking_reminder",
                  "order_placed",
                  "order_completed",
                  "order_cancelled",
                  "order_refunded",
                  "payment_received",
                  "payment_failed",
                  "payment_failed_followup",
                  "membership_enrolled",
                  "membership_expired",
                  "membership_expired_followup",
                  "tier_changed",
                  "deal_stage_changed",
                  "deal_won",
                  "deal_lost",
                  "customer_ownership_review_required",
                  "customer_ownership_review_resolved",
                  "event_registered",
                  "event_cancelled",
                  "event_updated",
                  "event_checkout_abandoned",
                  "event_session_reminder",
                  "tutor_course_enrollment_confirmed",
                  "tutor_course_payment_pending",
                  "tutor_course_leave_requested",
                  "tutor_course_leave_approved",
                  "tutor_course_leave_declined",
                  "tutor_course_class_switch_requested",
                  "tutor_course_class_switch_approved",
                  "tutor_course_class_switch_declined",
                  "staff_agenda_digest",
                  "invoice_created",
                  "invoice_sent",
                  "invoice_paid",
                  "invoice_reminder",
                  "invoice_overdue",
                  "invoice_voided",
                  "invoice_installment_reminder",
                  "invoice_installment_overdue",
                  "invoice_due_in_n_days",
                  "subscription_created",
                  "subscription_activated",
                  "subscription_paused",
                  "subscription_cancellation_scheduled",
                  "subscription_cancelled",
                  "subscription_expired",
                  "subscription_renewed",
                  "subscription_payment_failed",
                  "subscription_renewal_reminder",
                  "campaign_sent",
                  "campaign_failed",
                  "promotion_activated",
                  "promotion_expired",
                  "coupon_redeemed",
                  "gift_offer_claimed",
                  "gift_offer_redeemed",
                  "gift_offer_expired",
                  "service_package_purchased",
                  "service_package_redeemed",
                  "service_package_expired",
                  "service_package_expiring_soon",
                  "service_package_low_quota",
                  "service_package_expired_followup",
                  "reward_earned",
                  "reward_redeemed",
                  "reward_expired",
                  "reward_redemption_expiring_soon",
                  "reward_unused_after_n_days",
                  "loyalty_points_added",
                  "loyalty_points_used",
                  "loyalty_stamps_added",
                  "loyalty_stamps_used",
                  "member_credit_added",
                  "member_credit_used",
                  "membership_expiring_soon",
                  "booking_followup_review_request",
                  "customer_inactive_n_days",
                  "ticket_created",
                  "ticket_resolved",
                  "ticket_closed",
                  "integration_order_created",
                  "integration_order_fulfilled",
                  "integration_shipment_in_transit",
                  "integration_shipment_out_for_delivery",
                  "integration_shipment_delivered",
                  "integration_shipment_delayed",
                  "integration_shipment_attempted_delivery",
                  "integration_shipment_ready_for_pickup",
                  "integration_shipment_exception",
                  "integration_order_cancelled",
                  "integration_cart_abandoned",
                  "integration_customer_created",
                  "integration_product_out_of_stock",
                  "post_published",
                  "post_updated",
                  "post_unpublished",
                  "survey_invitation_sent",
                  "survey_invitation_opened",
                  "survey_response_submitted",
                  "survey_completed",
                  "survey_score_matched",
                  "wallet_pass_generated",
                  "agent_action.proposed",
                  "agent_action.approved",
                  "agent_action.rejected",
                  "agent_action.executed",
                  "agent_action.failed",
                  "team_member_application_review_required",
                  "custom_field_changed",
                  "otp_sent",
                  "review_request"
                ],
                "type": "string",
                "description": "Event type filter"
              },
              "recipient": {
                "type": "string",
                "description": "Substring search on recipient"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Notification Logs",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_conversations",
          "description": "List messaging conversations across WhatsApp, Messenger, Instagram, Threads, SMS, email, and other enabled channels. Threads items are public conversations. Shows unread counts and last message time.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "type": "number",
                "description": "Page number (default 1)"
              },
              "limit": {
                "type": "number",
                "description": "Page size (default 20, max 50)"
              },
              "search": {
                "type": "string",
                "description": "Search by contact name, phone, or email"
              },
              "status": {
                "enum": [
                  "active",
                  "archived",
                  "closed"
                ],
                "type": "string",
                "description": "Filter by conversation status"
              },
              "channel": {
                "enum": [
                  "whatsapp",
                  "sms",
                  "email",
                  "messenger",
                  "instagram",
                  "threads",
                  "web_form"
                ],
                "type": "string",
                "description": "Filter by channel"
              },
              "assignee": {
                "enum": [
                  "mine",
                  "unassigned"
                ],
                "type": "string",
                "description": "\"mine\": conversations assigned to you. \"unassigned\": no assignee. Cannot be combined with assignedToId."
              },
              "assignedToId": {
                "type": "string",
                "description": "Only conversations assigned to this company member ID (companyMembers.id)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Conversations",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_audit_logs",
          "description": "List recent audit log entries for this company. Filter by action, resource, resourceId, user, source, outcome, destructive flag, and created date range.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "default": 50,
                "maximum": 200,
                "minimum": 1,
                "description": "Maximum rows to return"
              },
              "action": {
                "type": "string",
                "description": "Exact tool/action name, e.g. delete_campaign"
              },
              "source": {
                "enum": [
                  "mcp",
                  "ai_agent",
                  "merchant_api",
                  "payment_webhook",
                  "manual_refresh",
                  "qfpay_reconciliation",
                  "hold_expiry_sweeper"
                ],
                "type": "string",
                "description": "Audit source, e.g. mcp, ai_agent, payment_webhook, merchant_api"
              },
              "userId": {
                "type": "string",
                "description": "Actor user ID"
              },
              "outcome": {
                "enum": [
                  "success",
                  "failed",
                  "blocked"
                ],
                "type": "string",
                "description": "Execution outcome"
              },
              "resource": {
                "type": "string",
                "description": "Resource name, e.g. campaigns"
              },
              "resourceId": {
                "type": "string",
                "description": "Resource ID"
              },
              "destructive": {
                "type": "boolean",
                "description": "Whether the audited tool was destructive"
              },
              "createdAfter": {
                "type": "string",
                "description": "ISO timestamp lower bound"
              },
              "createdBefore": {
                "type": "string",
                "description": "ISO timestamp upper bound"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Audit Logs",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "search_audit_logs",
          "description": "Search audit logs by free text across action, resource, resource ID, changes JSON, and metadata JSON.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "query"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "default": 25,
                "maximum": 100,
                "minimum": 1,
                "description": "Maximum rows to return"
              },
              "query": {
                "type": "string",
                "minLength": 1,
                "description": "Text to search for"
              },
              "createdAfter": {
                "type": "string",
                "description": "ISO timestamp lower bound"
              },
              "createdBefore": {
                "type": "string",
                "description": "ISO timestamp upper bound"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Search Audit Logs",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_audit_log",
          "description": "Fetch a single audit log entry by ID, including before/after snapshots when available.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "auditLogId"
            ],
            "properties": {
              "auditLogId": {
                "type": "string",
                "description": "Audit log ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Audit Log",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "revert_audit_action",
          "description": "Revert an audited action by restoring the captured before snapshot. Only works for allowlisted target tables with full before/after audit snapshots.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "auditLogId"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "maxLength": 1000,
                "description": "Reason for reverting this action"
              },
              "auditLogId": {
                "type": "string",
                "description": "Audit log ID to revert"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Revert Audit Action",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "clone",
          "description": "Duplicate an existing record (product, tier, campaign, post, service package, promotion, gift offer). Creates a copy in DRAFT status with \"(Copy)\" appended to the name.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "entityId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Override the name of the cloned entity (defaults to \"Original Name (Copy)\")"
              },
              "entityId": {
                "type": "string",
                "description": "ID of the entity to clone"
              },
              "entityType": {
                "enum": [
                  "product",
                  "tier",
                  "campaign",
                  "post",
                  "service_package",
                  "promotion",
                  "gift_offer"
                ],
                "type": "string",
                "description": "Type of entity to clone"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Clone",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_notes",
          "description": "List notes attached to a member/account, booking, or ticket.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "entityId"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 10)"
              },
              "entityId": {
                "type": "string",
                "description": "The entity ID"
              },
              "entityType": {
                "enum": [
                  "account",
                  "booking",
                  "ticket",
                  "invoice"
                ],
                "type": "string",
                "description": "Type of entity the notes are on"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Notes",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_note",
          "description": "Add a note to a member/account, booking, ticket, or invoice.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "entityType",
              "entityId",
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "description": "Note content"
              },
              "entityId": {
                "type": "string",
                "description": "The entity ID"
              },
              "isPinned": {
                "type": "boolean",
                "description": "Pin this note to the top"
              },
              "entityType": {
                "enum": [
                  "account",
                  "booking",
                  "ticket",
                  "invoice"
                ],
                "type": "string",
                "description": "Type of entity"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Note",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "confirm_booking",
          "description": "Confirm a pending booking.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId"
            ],
            "properties": {
              "bookingId": {
                "type": "string",
                "description": "The booking ID to confirm"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Confirm Booking",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "cancel_booking",
          "description": "Cancel a booking and create a durable refund receipt. Uses the merchant refund setting unless refundMethod is provided.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId",
              "idempotencyKey"
            ],
            "properties": {
              "reason": {
                "type": "string",
                "description": "Cancellation reason"
              },
              "bookingId": {
                "type": "string",
                "description": "The booking ID to cancel"
              },
              "refundMethod": {
                "enum": [
                  "manual",
                  "account_credit"
                ],
                "type": "string",
                "description": "Refund cash manually or convert refundable cash to member credit"
              },
              "idempotencyKey": {
                "type": "string",
                "maxLength": 200,
                "minLength": 8,
                "description": "Unique key for this cancellation attempt; reuse it only when retrying the same request"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Cancel Booking",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "complete_booking",
          "description": "Mark a booking as completed. Triggers commission calculation if configured.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId"
            ],
            "properties": {
              "bookingId": {
                "type": "string",
                "description": "The booking ID to complete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Complete Booking",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "mark_no_show",
          "description": "Mark a booking as no-show when the customer did not attend.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId"
            ],
            "properties": {
              "bookingId": {
                "type": "string",
                "description": "The booking ID to mark as no-show"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Mark No Show",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reschedule_booking",
          "description": "Move or reassign a single-service booking to a new date, time, staff member, resource or schedule slot. Multi-service appointments must be handled in the merchant dashboard. Runs conflict, capacity and rebooking-policy checks, enforces actor permissions and outlet access, syncs the booking calendar, and returns the updated booking.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "bookingId"
            ],
            "properties": {
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Replace the booking notes"
              },
              "endTime": {
                "type": "string",
                "description": "New end time in HH:MM format"
              },
              "staffId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reassign to the staff userId returned by list_staff; null clears the assignment"
              },
              "bookingId": {
                "type": "string",
                "description": "The booking ID to reschedule"
              },
              "startTime": {
                "type": "string",
                "description": "New start time in HH:MM format"
              },
              "resourceId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Assign this resource ID; null clears the assignment"
              },
              "scheduleId": {
                "type": "string",
                "description": "Target schedule slot ID when moving between schedule windows"
              },
              "bookingDate": {
                "type": "string",
                "description": "New date in YYYY-MM-DD format"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Reschedule Booking",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_promotions",
          "description": "List promotion/coupon codes with optional status filter.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by name"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "ACTIVE",
                  "PAUSED",
                  "EXPIRED"
                ],
                "type": "string",
                "description": "Filter by status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Promotions",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_promotion",
          "description": "Get details of a specific promotion/coupon code.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "promotionId"
            ],
            "properties": {
              "promotionId": {
                "type": "string",
                "description": "The promotion ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Promotion",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_promotion",
          "description": "Create a promotion / discount code. type=percentage or fixed_amount; value is the discount as a string (\"10\" = 10% or 10 currency units). Codes are uppercased server-side.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "code",
              "value"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Coupon code customers enter at checkout (auto-uppercased)"
              },
              "name": {
                "type": "string",
                "description": "Promotion name (internal)"
              },
              "type": {
                "enum": [
                  "percentage",
                  "fixed_amount"
                ],
                "type": "string",
                "description": "Default percentage"
              },
              "value": {
                "type": "string",
                "description": "Discount value as decimal string"
              },
              "endsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO datetime — when the promo expires"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "expired"
                ],
                "type": "string",
                "description": "Default active"
              },
              "startsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO datetime — when the promo becomes valid"
              },
              "posEnabled": {
                "type": "boolean",
                "description": "Allow at POS"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "eventEnabled": {
                "type": "boolean",
                "description": "Allow on event registrations"
              },
              "minimumAmount": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Minimum order amount required, decimal string"
              },
              "onlineEnabled": {
                "type": "boolean",
                "description": "Allow on online shop orders"
              },
              "bookingEnabled": {
                "type": "boolean",
                "description": "Allow on bookings"
              },
              "maximumDiscount": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cap on percentage discounts, decimal string"
              },
              "minimumQuantity": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Minimum item count required"
              },
              "usageLimitTotal": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Max total uses across all customers"
              },
              "usageLimitPerCustomer": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Max uses per single customer"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Promotion",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_promotion",
          "description": "Update an existing promotion. Pass only the fields you want to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "promotionId"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "Promotion code"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "type": {
                "enum": [
                  "percentage",
                  "fixed_amount"
                ],
                "type": "string",
                "description": "Type"
              },
              "value": {
                "type": "string",
                "description": "Discount value (numeric or decimal string)"
              },
              "endsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "End timestamp (ISO 8601)"
              },
              "status": {
                "enum": [
                  "active",
                  "inactive",
                  "expired"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "startsAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Start timestamp (ISO 8601)"
              },
              "promotionId": {
                "type": "string",
                "description": "Promotion ID"
              },
              "usageLimitTotal": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total usage limit across all customers"
              },
              "usageLimitPerCustomer": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Usage limit per customer"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Promotion",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_promotion",
          "description": "Delete a promotion. Past usage records are preserved.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "promotionId"
            ],
            "properties": {
              "promotionId": {
                "type": "string",
                "description": "Promotion ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Promotion",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_promotion",
          "description": "Restore a previously deleted promotion.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "promotionId"
            ],
            "properties": {
              "promotionId": {
                "type": "string",
                "description": "Promotion ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Promotion",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "validate_promotion",
          "description": "Check if a promotion code is valid for a given order. Returns isValid, discount amount, and an error code/message if invalid. Use before applying to a checkout.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "promotionCode",
              "channel",
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "number",
                "description": "Order subtotal in major units (dollars, not cents)"
              },
              "channel": {
                "enum": [
                  "booking",
                  "event",
                  "online",
                  "pos"
                ],
                "type": "string",
                "description": "Where the promo is being applied"
              },
              "accountId": {
                "type": "string",
                "description": "Customer account ID — used for per-customer usage limits"
              },
              "promotionCode": {
                "type": "string",
                "description": "The code customer entered"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Validate Promotion",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_reward_schemes",
          "description": "List loyalty reward schemes (points/stamps programs) configured for this business.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by name"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Reward Schemes",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_staff",
          "description": "List staff/team members in the business.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Staff",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_resources",
          "description": "List booking resources (rooms, equipment, etc.).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Resources",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_service_packages",
          "description": "List service packages/prepaid session bundles with optional search, status, sorting, and pagination.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "sort": {
                "type": "string",
                "description": "Sort column: name, price, or createdAt"
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "order": {
                "enum": [
                  "asc",
                  "desc"
                ],
                "type": "string",
                "description": "Sort order"
              },
              "search": {
                "type": "string",
                "description": "Search package name"
              },
              "status": {
                "enum": [
                  "ACTIVE",
                  "INACTIVE"
                ],
                "type": "string",
                "description": "Filter by package status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Service Packages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_service_package",
          "description": "Get service package detail including applicability and selected booking service/event items.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "packageId"
            ],
            "properties": {
              "packageId": {
                "type": "string",
                "description": "Service package ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Service Package",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_service_package",
          "description": "Create a service package/prepaid session bundle. Use applicableType=SELECTED with applicableItems to limit the package to specific booking services or events.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "sessionCount",
              "price",
              "validDays"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Package name"
              },
              "price": {
                "type": "number",
                "minimum": 0,
                "description": "Package price"
              },
              "status": {
                "enum": [
                  "ACTIVE",
                  "INACTIVE"
                ],
                "type": "string",
                "description": "Default ACTIVE"
              },
              "validDays": {
                "type": "integer",
                "maximum": 3650,
                "minimum": 1,
                "description": "Validity window after purchase, in days"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "sessionCount": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Number of included sessions"
              },
              "applicableType": {
                "enum": [
                  "ALL",
                  "ALL_BOOKINGS",
                  "ALL_EVENTS",
                  "SELECTED"
                ],
                "type": "string",
                "description": "Default ALL"
              },
              "applicableItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "itemType",
                    "itemId"
                  ],
                  "properties": {
                    "itemId": {
                      "type": "string"
                    },
                    "itemType": {
                      "enum": [
                        "booking_service",
                        "event"
                      ],
                      "type": "string"
                    }
                  }
                },
                "description": "Items used when applicableType=SELECTED"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Service Package",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_service_package",
          "description": "Update an existing service package. Pass only the fields you want to change.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "packageId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Name"
              },
              "price": {
                "type": "number",
                "minimum": 0,
                "description": "Decimal string, e.g. \"80.00\""
              },
              "status": {
                "enum": [
                  "ACTIVE",
                  "INACTIVE"
                ],
                "type": "string",
                "description": "Status filter"
              },
              "packageId": {
                "type": "string",
                "description": "Service package ID to update"
              },
              "validDays": {
                "type": "integer",
                "maximum": 3650,
                "minimum": 1,
                "description": "Validity period in days"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Description"
              },
              "sessionCount": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Number of sessions in the package"
              },
              "applicableType": {
                "enum": [
                  "ALL",
                  "ALL_BOOKINGS",
                  "ALL_EVENTS",
                  "SELECTED"
                ],
                "type": "string",
                "description": "What this package applies to: services | products | both"
              },
              "applicableItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "itemType",
                    "itemId"
                  ],
                  "properties": {
                    "itemId": {
                      "type": "string"
                    },
                    "itemType": {
                      "enum": [
                        "booking_service",
                        "event"
                      ],
                      "type": "string"
                    }
                  }
                },
                "description": "Item IDs the package can be redeemed against"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Service Package",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_service_package",
          "description": "Delete a service package by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "packageId"
            ],
            "properties": {
              "packageId": {
                "type": "string",
                "description": "Service package ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Service Package",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_service_package",
          "description": "Restore a previously deleted service package by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "packageId"
            ],
            "properties": {
              "packageId": {
                "type": "string",
                "description": "Service package ID to restore"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Service Package",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_plan_status",
          "description": "Show the current organisation plan, subscription/payment state, enabled modules, and quota usage. Use before deciding whether an agentic operation is allowed.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Plan Status",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "check_plan_operation",
          "description": "Preflight whether an intended operation is allowed by token scopes, enabled modules, subscription state, and quota. Provide toolName, quotaCode, or moduleCode.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "delta": {
                "type": "integer",
                "default": 1,
                "maximum": 9007199254740991,
                "minimum": 1,
                "description": "Planned usage increment. Currently quota checks are single-resource preflights."
              },
              "toolName": {
                "type": "string",
                "description": "MCP tool name to preflight, e.g. create_account"
              },
              "quotaCode": {
                "type": "string",
                "description": "Quota code to check, e.g. contacts or mcp_calls_per_minute"
              },
              "moduleCode": {
                "type": "string",
                "description": "Module code to check, e.g. whatsapp or crm"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Check Plan Operation",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_plan_options",
          "description": "List active FavCRM plans with prices, quotas, included modules, and whether each is the current plan.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Plan Options",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_plan_upgrade_link",
          "description": "Create a Stripe Checkout link for a new paid subscription, or a Stripe Billing Portal link for an existing Stripe subscription. Use only after the user explicitly asks to upgrade or fix billing.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "planId": {
                "type": "string",
                "description": "Target plan ID. Use list_plan_options first if unknown."
              },
              "confirm": {
                "type": "boolean",
                "default": false,
                "description": "Required true to create a Stripe-hosted payment or billing link."
              },
              "planCode": {
                "type": "string",
                "description": "Target plan code, e.g. favcrm-lite. Either planId or planCode is required."
              },
              "returnUrl": {
                "type": "string",
                "format": "uri",
                "description": "Where Stripe should return after checkout/portal. Defaults to merchant billing settings."
              },
              "billingCycle": {
                "enum": [
                  "monthly",
                  "yearly"
                ],
                "type": "string",
                "default": "monthly"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Plan Upgrade Link",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_team_member_invite",
          "description": "Invite a team member to this company and return a one-time MCP accept token. The invited user must verify an email code through accept_team_invite_request and accept_team_invite_verify before membership and API key issuance.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "email"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional display name for a new user"
              },
              "role": {
                "enum": [
                  "manager",
                  "staff"
                ],
                "type": "string",
                "default": "staff",
                "description": "Team member role to grant on acceptance"
              },
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "description": "Invitee email address"
              },
              "modules": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Optional legacy module list to attach to the company member"
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "actions"
                  ],
                  "properties": {
                    "module": {
                      "type": "string"
                    },
                    "actions": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1
                    },
                    "resource": {
                      "type": "string"
                    }
                  }
                },
                "description": "Optional structured module permissions to attach to the company member"
              },
              "expiresInHours": {
                "type": "integer",
                "maximum": 336,
                "minimum": 1,
                "description": "Invite lifetime in hours. Defaults to 72, max 336."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Team Member Invite",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "accept_team_invite_request",
          "description": "Step 1 of agentic team invite acceptance. Validates an invite token and sends a 6-digit verification code to the invited email. Then call accept_team_invite_verify with the code to join and receive an MCP API key.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "token"
            ],
            "properties": {
              "token": {
                "type": "string",
                "description": "Invite token returned by create_team_member_invite or from the invite link"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Accept Team Invite — Request Code",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "accept_team_invite_verify",
          "description": "Step 2 of agentic team invite acceptance. Verifies the emailed code, joins the invited user to the company, and returns a one-time MCP API key for that user.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "token",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 6,
                "minLength": 6,
                "description": "6-digit code from the invite email"
              },
              "name": {
                "type": "string",
                "maxLength": 120,
                "minLength": 1,
                "description": "Optional display name when creating a new user"
              },
              "token": {
                "type": "string",
                "description": "Invite token returned by create_team_member_invite or from the invite link"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Accept Team Invite — Verify Code",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_whatsapp_connection_status",
          "description": "Check whether WhatsApp Business is connected for this company, including WABA/phone metadata and the latest agentic connect session state.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Whatsapp Connection Status",
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_whatsapp_connect_link",
          "description": "Create a short-lived browser link for WhatsApp Business Embedded Signup. The user must open the link because Meta requires a browser popup to authorize and choose the WABA/phone number.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "ttlMinutes": {
                "type": "integer",
                "maximum": 1440,
                "minimum": 5,
                "description": "Connect link lifetime in minutes. Defaults to 30."
              },
              "onboardingMode": {
                "enum": [
                  "cloud_api",
                  "coexistence"
                ],
                "type": "string",
                "default": "cloud_api",
                "description": "Use cloud_api for a new WhatsApp Cloud API connection, or coexistence when connecting a WhatsApp Business App number."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create WhatsApp Connect Link",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_my_companies",
          "description": "List all companies/organisations the current user has access to. Use this to see available orgs before switching.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List My Companies",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "switch_company",
          "description": "Issue a new MCP access token scoped to another company/organisation. This does not mutate the current MCP connection: the client must use the returned token on later /mcp requests. Platform operators should prefer explicit-company admin tools when available.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "companyId"
            ],
            "properties": {
              "companyId": {
                "type": "string",
                "description": "The company ID to switch to (use list_my_companies to find available IDs)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Switch Company",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_posts",
          "description": "List CMS posts (blog posts and/or pages) with optional filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "type": {
                "type": "string",
                "description": "Filter by post type slug (blog_post, page, or any custom type — see list_post_types)."
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by title"
              },
              "status": {
                "enum": [
                  "draft",
                  "scheduled",
                  "published",
                  "archived"
                ],
                "type": "string",
                "description": "Filter by status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Posts",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_post",
          "description": "Get detailed CMS post including content blocks, categories, and tags.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId"
            ],
            "properties": {
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Post",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_post",
          "description": "Create a new CMS post (blog_post, page, or any custom post type). The post type must already exist — use list_post_types to discover, create_post_type to add a new one. excerpt = plain-text summary only (auto-derived from blocks if omitted). Structured custom fields go in meta, keyed by the field schema defined with create_post_type_field.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "type",
              "title"
            ],
            "properties": {
              "meta": {
                "type": "object",
                "description": "Structured custom field values, keyed by field key (see list_post_type_fields). Validated against the post type field schema. Use this for all machine-readable data — never put JSON in excerpt.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "slug": {
                "type": "string",
                "description": "URL slug. Auto-generated from title if omitted; collisions get -2, -3 suffix."
              },
              "type": {
                "type": "string",
                "description": "Post type slug (e.g. blog_post, page, treatment). Must exist in post_types for this company."
              },
              "title": {
                "type": "string",
                "description": "Post title"
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Ordered array of content blocks. Each block has { id, version, type, data } where type is one of: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product, columns. Unknown types are rejected."
              },
              "status": {
                "enum": [
                  "draft",
                  "scheduled",
                  "published",
                  "archived"
                ],
                "type": "string",
                "description": "Status (default draft)"
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tag IDs to attach to the post"
              },
              "excerpt": {
                "type": "string",
                "description": "Plain-text summary only — never JSON. Auto-derived from the first paragraph/heading block if omitted and the post type supports excerpts."
              },
              "parentId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Parent post ID for nested types (e.g. pages)."
              },
              "seoTitle": {
                "type": "string",
                "description": "SEO title override"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "visibility": {
                "enum": [
                  "public",
                  "private",
                  "members_only"
                ],
                "type": "string",
                "description": "Visibility (default public)"
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Category IDs (post types with supportsCategories only)"
              },
              "publishedAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "ISO timestamp; required when status=scheduled."
              },
              "featuredImage": {
                "type": "string",
                "description": "Cover image URL"
              },
              "seoDescription": {
                "type": "string",
                "description": "SEO meta description"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "level",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "level": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 1
                              },
                              {
                                "type": "number",
                                "const": 2
                              },
                              {
                                "type": "number",
                                "const": 3
                              },
                              {
                                "type": "number",
                                "const": 4
                              }
                            ]
                          },
                          "anchor": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "alt"
                        ],
                        "properties": {
                          "alt": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "width": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "caption": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "ordered",
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "minItems": 1
                          },
                          "ordered": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "text"
                        ],
                        "properties": {
                          "cite": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "lang",
                          "code"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lang": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "size"
                        ],
                        "properties": {
                          "size": {
                            "enum": [
                              "sm",
                              "md",
                              "lg"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "provider",
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "provider": {
                            "enum": [
                              "youtube",
                              "vimeo",
                              "iframe"
                            ],
                            "type": "string"
                          },
                          "aspectRatio": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "embed"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "html"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "videoId"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "title": {
                            "type": "string"
                          },
                          "videoId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{11}$"
                          },
                          "aspectRatio": {
                            "type": "string"
                          },
                          "startSeconds": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "youtube"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "mimeType",
                          "sizeBytes",
                          "originalName"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "icon": {
                            "enum": [
                              "pdf",
                              "doc",
                              "image",
                              "video",
                              "audio",
                              "generic"
                            ],
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "originalName": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "file"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "question",
                                "answer"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "answer": {
                                  "type": "string"
                                },
                                "question": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "faq"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "tone",
                          "body"
                        ],
                        "properties": {
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tone": {
                            "enum": [
                              "info",
                              "success",
                              "warning",
                              "danger",
                              "note"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "callout"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "layout",
                          "images"
                        ],
                        "properties": {
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "url",
                                "alt"
                              ],
                              "properties": {
                                "alt": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "caption": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "layout": {
                            "enum": [
                              "grid",
                              "masonry",
                              "carousel"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "gallery"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "label",
                          "href"
                        ],
                        "properties": {
                          "href": {
                            "type": "string",
                            "minLength": 1
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "style": {
                            "enum": [
                              "primary",
                              "secondary",
                              "ghost"
                            ],
                            "type": "string"
                          },
                          "openInNewTab": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "cta"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "title",
                                "body"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "body": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "semantic": {
                            "enum": [
                              "faq",
                              "plain"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "accordion"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "slug"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string",
                            "minLength": 1
                          },
                          "layout": {
                            "enum": [
                              "card",
                              "inline"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "product"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "columns"
                        ],
                        "properties": {
                          "align": {
                            "enum": [
                              "start",
                              "center",
                              "stretch"
                            ],
                            "type": "string"
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "blocks"
                              ],
                              "properties": {
                                "span": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "maxItems": 4,
                            "minItems": 2
                          },
                          "stackBelow": {
                            "type": "string",
                            "pattern": "^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "columns"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  }
                ]
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Post",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_post",
          "description": "Update an existing CMS post (any post type). Only provided fields are changed.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId"
            ],
            "properties": {
              "meta": {
                "type": "object",
                "description": "Custom field values; merged shallowly with existing meta. Use this for structured data, not excerpt.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "slug": {
                "type": "string",
                "description": "URL slug (must be unique per company+type)."
              },
              "type": {
                "type": "string",
                "description": "Change post type (e.g. blog_post → treatment). Slug is re-checked for uniqueness under the new type."
              },
              "title": {
                "type": "string",
                "description": "Post title"
              },
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "description": "Replaces the entire ordered block array. Use append_post_block / replace_post_block / remove_post_block / reorder_post_blocks for per-block edits. Each block: { id, version, type, data }. Types: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product, columns."
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              },
              "status": {
                "enum": [
                  "draft",
                  "scheduled",
                  "published",
                  "archived"
                ],
                "type": "string",
                "description": "Post status"
              },
              "tagIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Tag IDs to sync (replaces existing tags)"
              },
              "excerpt": {
                "type": "string",
                "description": "Plain-text summary only — never JSON. Omit to leave unchanged."
              },
              "parentId": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Parent post ID for nested types."
              },
              "seoTitle": {
                "type": "string",
                "description": "SEO title override"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "visibility": {
                "enum": [
                  "public",
                  "private",
                  "members_only"
                ],
                "type": "string",
                "description": "Visibility"
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Category IDs"
              },
              "publishedAt": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Publish timestamp (ISO 8601)"
              },
              "featuredImage": {
                "type": "string",
                "description": "Cover image URL"
              },
              "seoDescription": {
                "type": "string",
                "description": "SEO description override"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "level",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "level": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 1
                              },
                              {
                                "type": "number",
                                "const": 2
                              },
                              {
                                "type": "number",
                                "const": 3
                              },
                              {
                                "type": "number",
                                "const": 4
                              }
                            ]
                          },
                          "anchor": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "alt"
                        ],
                        "properties": {
                          "alt": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "width": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "caption": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "ordered",
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "minItems": 1
                          },
                          "ordered": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "text"
                        ],
                        "properties": {
                          "cite": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "lang",
                          "code"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lang": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "size"
                        ],
                        "properties": {
                          "size": {
                            "enum": [
                              "sm",
                              "md",
                              "lg"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "provider",
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "provider": {
                            "enum": [
                              "youtube",
                              "vimeo",
                              "iframe"
                            ],
                            "type": "string"
                          },
                          "aspectRatio": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "embed"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "html"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "videoId"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "title": {
                            "type": "string"
                          },
                          "videoId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{11}$"
                          },
                          "aspectRatio": {
                            "type": "string"
                          },
                          "startSeconds": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "youtube"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "mimeType",
                          "sizeBytes",
                          "originalName"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "icon": {
                            "enum": [
                              "pdf",
                              "doc",
                              "image",
                              "video",
                              "audio",
                              "generic"
                            ],
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "originalName": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "file"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "question",
                                "answer"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "answer": {
                                  "type": "string"
                                },
                                "question": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "faq"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "tone",
                          "body"
                        ],
                        "properties": {
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tone": {
                            "enum": [
                              "info",
                              "success",
                              "warning",
                              "danger",
                              "note"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "callout"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "layout",
                          "images"
                        ],
                        "properties": {
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "url",
                                "alt"
                              ],
                              "properties": {
                                "alt": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "caption": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "layout": {
                            "enum": [
                              "grid",
                              "masonry",
                              "carousel"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "gallery"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "label",
                          "href"
                        ],
                        "properties": {
                          "href": {
                            "type": "string",
                            "minLength": 1
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "style": {
                            "enum": [
                              "primary",
                              "secondary",
                              "ghost"
                            ],
                            "type": "string"
                          },
                          "openInNewTab": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "cta"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "title",
                                "body"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "body": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "semantic": {
                            "enum": [
                              "faq",
                              "plain"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "accordion"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "slug"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string",
                            "minLength": 1
                          },
                          "layout": {
                            "enum": [
                              "card",
                              "inline"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "product"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "columns"
                        ],
                        "properties": {
                          "align": {
                            "enum": [
                              "start",
                              "center",
                              "stretch"
                            ],
                            "type": "string"
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "blocks"
                              ],
                              "properties": {
                                "span": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "maxItems": 4,
                            "minItems": 2
                          },
                          "stackBelow": {
                            "type": "string",
                            "pattern": "^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "columns"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  }
                ]
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Post",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_post",
          "description": "Delete a CMS post by ID. Soft-deleted posts can be restored with restore_post.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId"
            ],
            "properties": {
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Post",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_post",
          "description": "Restore a previously deleted CMS post.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId"
            ],
            "properties": {
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Post",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_image_models",
          "description": "List AI image-generation models exposed to merchants (sanitized — provider/cost details hidden). Use to pick a `modelCode` for `generate_post_cover`.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Image Models",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "generate_image",
          "description": "Generate an AI image via kie.ai and return its public R2 URL. Use to mint reusable URLs for content blocks (image, gallery), product photos, or any field that takes an image URL — does NOT attach to a post by itself. Costs credits (see list_image_models). On poll timeout the job continues running; pass `jobId` from the response to merchant ai-media APIs to retrieve it later.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "prompt",
              "modelCode"
            ],
            "properties": {
              "seed": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Random seed for reproducible output"
              },
              "prompt": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1,
                "description": "Generation prompt"
              },
              "modelCode": {
                "type": "string",
                "description": "Image model code from list_image_models"
              },
              "aspectRatio": {
                "type": "string",
                "maxLength": 20,
                "description": "Output aspect ratio (e.g. 16:9, 1:1)"
              },
              "pollTimeoutMs": {
                "type": "integer",
                "maximum": 120000,
                "minimum": 5000,
                "description": "Default 60000."
              },
              "negativePrompt": {
                "type": "string",
                "maxLength": 2000,
                "description": "Things to exclude from generation"
              },
              "pollIntervalMs": {
                "type": "integer",
                "maximum": 15000,
                "minimum": 1000,
                "description": "Default 3000."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Generate Image",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "generate_post_cover",
          "description": "Generate an AI image and attach it as a post's featuredImage. Submits a kie.ai job, polls until complete, copies the result into the canonical post-asset R2 folder, and writes the public URL onto the post. Costs credits (see list_image_models). On poll timeout, the job continues — call attach_post_cover_from_job(postId, jobId) once it finishes to attach without paying again.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "prompt",
              "modelCode"
            ],
            "properties": {
              "seed": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Random seed for reproducible output"
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              },
              "prompt": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1,
                "description": "Image generation prompt"
              },
              "modelCode": {
                "type": "string",
                "description": "Image model code from list_image_models (e.g. nano-banana-2)"
              },
              "aspectRatio": {
                "type": "string",
                "maxLength": 20,
                "description": "Aspect ratio passed to the model, e.g. \"16:9\", \"1:1\""
              },
              "pollTimeoutMs": {
                "type": "integer",
                "maximum": 120000,
                "minimum": 5000,
                "description": "Default 60000."
              },
              "negativePrompt": {
                "type": "string",
                "maxLength": 2000,
                "description": "Things to exclude from generation"
              },
              "pollIntervalMs": {
                "type": "integer",
                "maximum": 15000,
                "minimum": 1000,
                "description": "Default 3000."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Generate Post Cover",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "attach_post_cover_from_job",
          "description": "Attach a previously generated ai-media job's output as the post's featuredImage. Use when generate_post_cover timed out (job kept running) or when reusing the same generation across multiple posts. Verifies the job belongs to your company and succeeded. Does NOT charge credits — credits were charged at submit time.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "jobId"
            ],
            "properties": {
              "jobId": {
                "type": "string",
                "description": "The ai-media job ID (from generate_image, generate_post_cover, or POST /v6/merchant/ai-media/generate)"
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              },
              "assetIndex": {
                "type": "integer",
                "maximum": 20,
                "minimum": 0,
                "description": "Which asset to use when the job produced multiple outputs. Default 0."
              },
              "pollIfRunning": {
                "type": "boolean",
                "description": "When true, advance polling once if the job is still running. Default true."
              },
              "pollTimeoutMs": {
                "type": "integer",
                "maximum": 120000,
                "minimum": 0,
                "description": "When pollIfRunning is true, wait up to this long for terminal state. Default 30000."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Attach Post Cover From Job",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "upload_post_cover_from_url",
          "description": "Download an external image URL into R2 and attach it as the post's featuredImage. Replaces the manual flow of pasting external URLs (which break when the source goes down). Validates content-type starts with `image/` and rejects payloads larger than 20 MB. No AI credits charged — only standard storage.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "sourceUrl"
            ],
            "properties": {
              "postId": {
                "type": "string",
                "description": "The post ID"
              },
              "sourceUrl": {
                "type": "string",
                "format": "uri",
                "description": "Public http(s) URL to fetch the image from. Must respond with an image/* content-type."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Upload Post Cover From Url",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_categories",
          "description": "List CMS post categories.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Categories",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_category",
          "description": "Create a CMS post category (e.g. \"Equipment\", \"Injection — Botox\"). For sub-categories, use namespaced names — the table is flat.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Category name"
              },
              "slug": {
                "type": "string",
                "description": "Auto-generated from name if omitted."
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "description": {
                "type": "string",
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_category",
          "description": "Update a CMS post category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "categoryId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name"
              },
              "slug": {
                "type": "string",
                "description": "URL slug"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "categoryId": {
                "type": "string",
                "description": "Category ID"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Description"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_category",
          "description": "Delete a CMS post category. Posts in the category are not deleted; they are simply unlinked.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "categoryId"
            ],
            "properties": {
              "categoryId": {
                "type": "string",
                "description": "Category ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_category",
          "description": "Restore a previously deleted CMS post category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "categoryId"
            ],
            "properties": {
              "categoryId": {
                "type": "string",
                "description": "Category ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_post_types",
          "description": "List all post types defined for this company (built-in: blog_post, page; plus any custom types).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Post Types",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_post_type",
          "description": "Define a new custom post type (e.g. \"treatment\", \"service\"). Required before creating posts of that type. After creating a post type, use create_post_type_field to define its structured field schema. Those fields are stored in meta on each post — do not use excerpt for structured data.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "slug",
              "label",
              "labelPlural"
            ],
            "properties": {
              "icon": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Icon name or URL"
              },
              "slug": {
                "type": "string",
                "description": "Lowercase identifier, e.g. \"treatment\". Auto-derived from label if omitted."
              },
              "label": {
                "type": "string",
                "description": "Singular UI label, e.g. \"Treatment\""
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "labelPlural": {
                "type": "string",
                "description": "Plural UI label, e.g. \"Treatments\""
              },
              "supportsBlocks": {
                "type": "boolean",
                "description": "Default true"
              },
              "supportsExcerpt": {
                "type": "boolean",
                "description": "Default true"
              },
              "supportsNesting": {
                "type": "boolean",
                "description": "Default false"
              },
              "supportsCategories": {
                "type": "boolean",
                "description": "Default true"
              },
              "supportsFeaturedImage": {
                "type": "boolean",
                "description": "Default true"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Post Type",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_post_type_fields",
          "description": "List the custom field schema for a post type. Use this before creating posts to know which keys to pass in meta and what types they expect.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId"
            ],
            "properties": {
              "postTypeId": {
                "type": "string",
                "description": "Post type ID (from list_post_types)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Post Type Fields",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_post_type_field",
          "description": "Add a custom field to a post type schema. The field key becomes the key in meta when creating/updating posts. Use fieldType=\"repeater\" with fields=[...] for repeatable structured rows. Use this instead of storing structured data in excerpt.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId",
              "label",
              "fieldType"
            ],
            "properties": {
              "key": {
                "type": "string",
                "description": "snake_case key used in meta. Auto-derived from label if omitted."
              },
              "label": {
                "type": "string",
                "description": "Human-readable field label, e.g. \"Tagline\""
              },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "label",
                    "fieldType"
                  ],
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "snake_case key for this repeater child field. Auto-derived from label if omitted."
                    },
                    "label": {
                      "type": "string",
                      "description": "Human-readable child field label"
                    },
                    "options": {
                      "type": "object",
                      "description": "For select/multiselect child fields: { choices: [\"a\",\"b\"] }.",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "helpText": {
                      "type": "string",
                      "description": "Optional hint shown in the UI"
                    },
                    "required": {
                      "type": "boolean",
                      "description": "Whether this child field is required on every repeater row"
                    },
                    "fieldType": {
                      "enum": [
                        "text",
                        "textarea",
                        "richtext",
                        "number",
                        "boolean",
                        "date",
                        "datetime",
                        "select",
                        "multiselect",
                        "url",
                        "email",
                        "image",
                        "file",
                        "gallery",
                        "attachments",
                        "repeater"
                      ],
                      "type": "string",
                      "description": "Child field type. Repeaters support scalar/select types plus singular upload fields: text, textarea, richtext, number, boolean, date, datetime, select, multiselect, url, email, image, file. Nested repeaters and array upload fields are not supported."
                    },
                    "sortOrder": {
                      "type": "number"
                    }
                  }
                },
                "description": "Required for fieldType=\"repeater\". Defines the child fields stored in each row object."
              },
              "options": {
                "type": "object",
                "description": "For select/multiselect: { choices: [{ label, value }] }. For URL fields that should accept merchant uploads, use { uploadable: true } so the UI stores the uploaded file URL instead of asking the merchant to paste a raw URL.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "helpText": {
                "type": "string",
                "description": "Optional hint shown in the UI"
              },
              "required": {
                "type": "boolean",
                "description": "Whether the field is required on post creation (default false)"
              },
              "fieldType": {
                "enum": [
                  "text",
                  "textarea",
                  "richtext",
                  "number",
                  "boolean",
                  "date",
                  "datetime",
                  "select",
                  "multiselect",
                  "url",
                  "email",
                  "image",
                  "file",
                  "gallery",
                  "attachments",
                  "repeater"
                ],
                "type": "string",
                "description": "Field type: text | textarea | richtext | number | boolean | date | datetime | select | multiselect | url | email | image | file | gallery | attachments | repeater"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "postTypeId": {
                "type": "string",
                "description": "Post type ID (from list_post_types)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Post Type Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_post_type",
          "description": "Update a custom post type. Built-in types (blog_post, page) cannot be modified.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId"
            ],
            "properties": {
              "icon": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Icon name or URL"
              },
              "label": {
                "type": "string",
                "description": "Display label"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              },
              "labelPlural": {
                "type": "string",
                "description": "Plural display label"
              },
              "supportsBlocks": {
                "type": "boolean",
                "description": "Allow content blocks (rich body)"
              },
              "supportsExcerpt": {
                "type": "boolean",
                "description": "Allow an excerpt field"
              },
              "supportsNesting": {
                "type": "boolean",
                "description": "Allow parent/child nesting"
              },
              "supportsCategories": {
                "type": "boolean",
                "description": "Allow categories on this post type"
              },
              "supportsFeaturedImage": {
                "type": "boolean",
                "description": "Allow a featured image"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Post Type",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_post_type",
          "description": "Delete a custom post type. Built-in types cannot be deleted. Fails if any posts of this type still exist — delete those first.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId"
            ],
            "properties": {
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Post Type",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_post_type",
          "description": "Restore a previously deleted custom post type.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId"
            ],
            "properties": {
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Post Type",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_post_type_field",
          "description": "Update a field on a post type schema. Changing fieldType or flipping required=true is blocked when posts already use the field unless force=true is passed.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId",
              "fieldId"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "description": "Override safety guards. Required to change fieldType or flip required=true on a field that already has data in posts."
              },
              "label": {
                "type": "string",
                "description": "Display label"
              },
              "fields": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "label",
                        "fieldType"
                      ],
                      "properties": {
                        "key": {
                          "type": "string",
                          "description": "snake_case key for this repeater child field. Auto-derived from label if omitted."
                        },
                        "label": {
                          "type": "string",
                          "description": "Human-readable child field label"
                        },
                        "options": {
                          "type": "object",
                          "description": "For select/multiselect child fields: { choices: [\"a\",\"b\"] }.",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "helpText": {
                          "type": "string",
                          "description": "Optional hint shown in the UI"
                        },
                        "required": {
                          "type": "boolean",
                          "description": "Whether this child field is required on every repeater row"
                        },
                        "fieldType": {
                          "enum": [
                            "text",
                            "textarea",
                            "richtext",
                            "number",
                            "boolean",
                            "date",
                            "datetime",
                            "select",
                            "multiselect",
                            "url",
                            "email",
                            "image",
                            "file",
                            "gallery",
                            "attachments",
                            "repeater"
                          ],
                          "type": "string",
                          "description": "Child field type. Repeaters support scalar/select types plus singular upload fields: text, textarea, richtext, number, boolean, date, datetime, select, multiselect, url, email, image, file. Nested repeaters and array upload fields are not supported."
                        },
                        "sortOrder": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Child fields for fieldType=\"repeater\"."
              },
              "fieldId": {
                "type": "string",
                "description": "Field ID"
              },
              "options": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "For URL fields, { uploadable: true } enables file upload while preserving a URL string in meta."
              },
              "helpText": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Help text shown next to the input"
              },
              "required": {
                "type": "boolean",
                "description": "Whether the field is required"
              },
              "fieldType": {
                "enum": [
                  "text",
                  "textarea",
                  "richtext",
                  "number",
                  "boolean",
                  "date",
                  "datetime",
                  "select",
                  "multiselect",
                  "url",
                  "email",
                  "image",
                  "file",
                  "gallery",
                  "attachments",
                  "repeater"
                ],
                "type": "string",
                "description": "Field type"
              },
              "sortOrder": {
                "type": "number",
                "description": "Sort order (lower = earlier)"
              },
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Post Type Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_post_type_field",
          "description": "Remove a field from a post type schema. Blocked when posts of this type still have data in the field unless force=true is passed (orphans the data).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId",
              "fieldId"
            ],
            "properties": {
              "force": {
                "type": "boolean",
                "description": "Delete even if posts have data in this field. Existing meta values become orphaned."
              },
              "fieldId": {
                "type": "string",
                "description": "Field ID"
              },
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Post Type Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_post_type_field",
          "description": "Restore a previously deleted field on a post type schema.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId",
              "fieldId"
            ],
            "properties": {
              "fieldId": {
                "type": "string",
                "description": "Field ID"
              },
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Post Type Field",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "reorder_post_type_fields",
          "description": "Reorder fields on a post type. Pass field IDs in the desired display order; sortOrder is updated to match.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postTypeId",
              "orderedFieldIds"
            ],
            "properties": {
              "postTypeId": {
                "type": "string",
                "description": "Post type ID"
              },
              "orderedFieldIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Field IDs in the desired order"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Reorder Post Type Fields",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "append_post_block",
          "description": "Append one or more blocks to the end of a post. Each block must be a valid block object: { id, version, type, data }. Types: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "blocks"
            ],
            "properties": {
              "blocks": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema0"
                },
                "minItems": 1,
                "description": "Block(s) to append"
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            },
            "definitions": {
              "__schema0": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "level",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "level": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 1
                              },
                              {
                                "type": "number",
                                "const": 2
                              },
                              {
                                "type": "number",
                                "const": 3
                              },
                              {
                                "type": "number",
                                "const": 4
                              }
                            ]
                          },
                          "anchor": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "alt"
                        ],
                        "properties": {
                          "alt": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "width": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "caption": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "ordered",
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "minItems": 1
                          },
                          "ordered": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "text"
                        ],
                        "properties": {
                          "cite": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "lang",
                          "code"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lang": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "size"
                        ],
                        "properties": {
                          "size": {
                            "enum": [
                              "sm",
                              "md",
                              "lg"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "provider",
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "provider": {
                            "enum": [
                              "youtube",
                              "vimeo",
                              "iframe"
                            ],
                            "type": "string"
                          },
                          "aspectRatio": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "embed"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "html"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "videoId"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "title": {
                            "type": "string"
                          },
                          "videoId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{11}$"
                          },
                          "aspectRatio": {
                            "type": "string"
                          },
                          "startSeconds": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "youtube"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "mimeType",
                          "sizeBytes",
                          "originalName"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "icon": {
                            "enum": [
                              "pdf",
                              "doc",
                              "image",
                              "video",
                              "audio",
                              "generic"
                            ],
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "originalName": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "file"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "question",
                                "answer"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "answer": {
                                  "type": "string"
                                },
                                "question": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "faq"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "tone",
                          "body"
                        ],
                        "properties": {
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tone": {
                            "enum": [
                              "info",
                              "success",
                              "warning",
                              "danger",
                              "note"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "callout"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "layout",
                          "images"
                        ],
                        "properties": {
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "url",
                                "alt"
                              ],
                              "properties": {
                                "alt": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "caption": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "layout": {
                            "enum": [
                              "grid",
                              "masonry",
                              "carousel"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "gallery"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "label",
                          "href"
                        ],
                        "properties": {
                          "href": {
                            "type": "string",
                            "minLength": 1
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "style": {
                            "enum": [
                              "primary",
                              "secondary",
                              "ghost"
                            ],
                            "type": "string"
                          },
                          "openInNewTab": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "cta"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "title",
                                "body"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "body": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "semantic": {
                            "enum": [
                              "faq",
                              "plain"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "accordion"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "slug"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string",
                            "minLength": 1
                          },
                          "layout": {
                            "enum": [
                              "card",
                              "inline"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "product"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "columns"
                        ],
                        "properties": {
                          "align": {
                            "enum": [
                              "start",
                              "center",
                              "stretch"
                            ],
                            "type": "string"
                          },
                          "columns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "blocks"
                              ],
                              "properties": {
                                "span": {
                                  "type": "number",
                                  "exclusiveMinimum": 0
                                },
                                "blocks": {
                                  "type": "array",
                                  "items": {
                                    "allOf": [
                                      {
                                        "$ref": "#/definitions/__schema0"
                                      }
                                    ]
                                  }
                                }
                              }
                            },
                            "maxItems": 4,
                            "minItems": 2
                          },
                          "stackBelow": {
                            "type": "string",
                            "pattern": "^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "columns"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  }
                ]
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Append Post Block",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "replace_post_block",
          "description": "Replace a single block at the given index (0-based). Avoids fetching the full post and re-sending all blocks via update_post.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "index",
              "block"
            ],
            "properties": {
              "block": {
                "oneOf": [
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "paragraph"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "level",
                          "text"
                        ],
                        "properties": {
                          "text": {
                            "type": "string",
                            "minLength": 1
                          },
                          "level": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 1
                              },
                              {
                                "type": "number",
                                "const": 2
                              },
                              {
                                "type": "number",
                                "const": 3
                              },
                              {
                                "type": "number",
                                "const": 4
                              }
                            ]
                          },
                          "anchor": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "heading"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "alt"
                        ],
                        "properties": {
                          "alt": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "width": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "height": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "caption": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "image"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "ordered",
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "minItems": 1
                          },
                          "ordered": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "list"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "text"
                        ],
                        "properties": {
                          "cite": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "quote"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "lang",
                          "code"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "minLength": 1
                          },
                          "lang": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "code"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      },
                      "type": {
                        "type": "string",
                        "const": "divider"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "size"
                        ],
                        "properties": {
                          "size": {
                            "enum": [
                              "sm",
                              "md",
                              "lg"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "spacer"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "provider",
                          "url"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "provider": {
                            "enum": [
                              "youtube",
                              "vimeo",
                              "iframe"
                            ],
                            "type": "string"
                          },
                          "aspectRatio": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "embed"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "html"
                        ],
                        "properties": {
                          "html": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "html"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "videoId"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "title": {
                            "type": "string"
                          },
                          "videoId": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9_-]{11}$"
                          },
                          "aspectRatio": {
                            "type": "string"
                          },
                          "startSeconds": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "youtube"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "url",
                          "mimeType",
                          "sizeBytes",
                          "originalName"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "icon": {
                            "enum": [
                              "pdf",
                              "doc",
                              "image",
                              "video",
                              "audio",
                              "generic"
                            ],
                            "type": "string"
                          },
                          "mimeType": {
                            "type": "string",
                            "minLength": 1
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "maximum": 9007199254740991,
                            "minimum": 0
                          },
                          "displayName": {
                            "type": "string"
                          },
                          "originalName": {
                            "type": "string",
                            "minLength": 1
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "file"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "question",
                                "answer"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "answer": {
                                  "type": "string"
                                },
                                "question": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "faq"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "tone",
                          "body"
                        ],
                        "properties": {
                          "body": {
                            "type": "string",
                            "minLength": 1
                          },
                          "tone": {
                            "enum": [
                              "info",
                              "success",
                              "warning",
                              "danger",
                              "note"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "callout"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "layout",
                          "images"
                        ],
                        "properties": {
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "url",
                                "alt"
                              ],
                              "properties": {
                                "alt": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "caption": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "layout": {
                            "enum": [
                              "grid",
                              "masonry",
                              "carousel"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "gallery"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "label",
                          "href"
                        ],
                        "properties": {
                          "href": {
                            "type": "string",
                            "minLength": 1
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1
                          },
                          "style": {
                            "enum": [
                              "primary",
                              "secondary",
                              "ghost"
                            ],
                            "type": "string"
                          },
                          "openInNewTab": {
                            "type": "boolean"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "cta"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "items"
                        ],
                        "properties": {
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "id",
                                "title",
                                "body"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "body": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              }
                            }
                          },
                          "semantic": {
                            "enum": [
                              "faq",
                              "plain"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "accordion"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "id",
                      "version",
                      "type",
                      "data"
                    ],
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "data": {
                        "type": "object",
                        "required": [
                          "slug"
                        ],
                        "properties": {
                          "slug": {
                            "type": "string",
                            "minLength": 1
                          },
                          "layout": {
                            "enum": [
                              "card",
                              "inline"
                            ],
                            "type": "string"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "const": "product"
                      },
                      "version": {
                        "type": "integer",
                        "maximum": 9007199254740991,
                        "minimum": 0
                      }
                    }
                  },
                  {
                    "$ref": "#/definitions/__schema0"
                  }
                ],
                "description": "Replacement block"
              },
              "index": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "0-based index of the block to replace"
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            },
            "definitions": {
              "__schema0": {
                "type": "object",
                "required": [
                  "id",
                  "version",
                  "type",
                  "data"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "columns"
                    ],
                    "properties": {
                      "align": {
                        "enum": [
                          "start",
                          "center",
                          "stretch"
                        ],
                        "type": "string"
                      },
                      "columns": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "blocks"
                          ],
                          "properties": {
                            "span": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            },
                            "blocks": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "html"
                                        ],
                                        "properties": {
                                          "html": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "paragraph"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "level",
                                          "text"
                                        ],
                                        "properties": {
                                          "text": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "level": {
                                            "anyOf": [
                                              {
                                                "type": "number",
                                                "const": 1
                                              },
                                              {
                                                "type": "number",
                                                "const": 2
                                              },
                                              {
                                                "type": "number",
                                                "const": 3
                                              },
                                              {
                                                "type": "number",
                                                "const": 4
                                              }
                                            ]
                                          },
                                          "anchor": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "heading"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "url",
                                          "alt"
                                        ],
                                        "properties": {
                                          "alt": {
                                            "type": "string"
                                          },
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          "width": {
                                            "type": "number",
                                            "exclusiveMinimum": 0
                                          },
                                          "height": {
                                            "type": "number",
                                            "exclusiveMinimum": 0
                                          },
                                          "caption": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "image"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "ordered",
                                          "items"
                                        ],
                                        "properties": {
                                          "items": {
                                            "type": "array",
                                            "items": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "minItems": 1
                                          },
                                          "ordered": {
                                            "type": "boolean"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "list"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "text"
                                        ],
                                        "properties": {
                                          "cite": {
                                            "type": "string"
                                          },
                                          "text": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "quote"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "lang",
                                          "code"
                                        ],
                                        "properties": {
                                          "code": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "lang": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "code"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "properties": {},
                                        "additionalProperties": false
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "divider"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "size"
                                        ],
                                        "properties": {
                                          "size": {
                                            "enum": [
                                              "sm",
                                              "md",
                                              "lg"
                                            ],
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "spacer"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "provider",
                                          "url"
                                        ],
                                        "properties": {
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          "provider": {
                                            "enum": [
                                              "youtube",
                                              "vimeo",
                                              "iframe"
                                            ],
                                            "type": "string"
                                          },
                                          "aspectRatio": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "embed"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "html"
                                        ],
                                        "properties": {
                                          "html": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "html"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "videoId"
                                        ],
                                        "properties": {
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          "title": {
                                            "type": "string"
                                          },
                                          "videoId": {
                                            "type": "string",
                                            "pattern": "^[A-Za-z0-9_-]{11}$"
                                          },
                                          "aspectRatio": {
                                            "type": "string"
                                          },
                                          "startSeconds": {
                                            "type": "integer",
                                            "maximum": 9007199254740991,
                                            "minimum": 0
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "youtube"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "url",
                                          "mimeType",
                                          "sizeBytes",
                                          "originalName"
                                        ],
                                        "properties": {
                                          "url": {
                                            "type": "string",
                                            "format": "uri"
                                          },
                                          "icon": {
                                            "enum": [
                                              "pdf",
                                              "doc",
                                              "image",
                                              "video",
                                              "audio",
                                              "generic"
                                            ],
                                            "type": "string"
                                          },
                                          "mimeType": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "sizeBytes": {
                                            "type": "integer",
                                            "maximum": 9007199254740991,
                                            "minimum": 0
                                          },
                                          "displayName": {
                                            "type": "string"
                                          },
                                          "originalName": {
                                            "type": "string",
                                            "minLength": 1
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "file"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "items"
                                        ],
                                        "properties": {
                                          "items": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "required": [
                                                "id",
                                                "question",
                                                "answer"
                                              ],
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "answer": {
                                                  "type": "string"
                                                },
                                                "question": {
                                                  "type": "string",
                                                  "minLength": 1
                                                }
                                              }
                                            }
                                          },
                                          "title": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "faq"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "tone",
                                          "body"
                                        ],
                                        "properties": {
                                          "body": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "tone": {
                                            "enum": [
                                              "info",
                                              "success",
                                              "warning",
                                              "danger",
                                              "note"
                                            ],
                                            "type": "string"
                                          },
                                          "title": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "callout"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "layout",
                                          "images"
                                        ],
                                        "properties": {
                                          "images": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "required": [
                                                "url",
                                                "alt"
                                              ],
                                              "properties": {
                                                "alt": {
                                                  "type": "string"
                                                },
                                                "url": {
                                                  "type": "string",
                                                  "format": "uri"
                                                },
                                                "caption": {
                                                  "type": "string"
                                                }
                                              }
                                            }
                                          },
                                          "layout": {
                                            "enum": [
                                              "grid",
                                              "masonry",
                                              "carousel"
                                            ],
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "gallery"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "label",
                                          "href"
                                        ],
                                        "properties": {
                                          "href": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "label": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "style": {
                                            "enum": [
                                              "primary",
                                              "secondary",
                                              "ghost"
                                            ],
                                            "type": "string"
                                          },
                                          "openInNewTab": {
                                            "type": "boolean"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "cta"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "items"
                                        ],
                                        "properties": {
                                          "items": {
                                            "type": "array",
                                            "items": {
                                              "type": "object",
                                              "required": [
                                                "id",
                                                "title",
                                                "body"
                                              ],
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "minLength": 1
                                                },
                                                "body": {
                                                  "type": "string"
                                                },
                                                "title": {
                                                  "type": "string",
                                                  "minLength": 1
                                                }
                                              }
                                            }
                                          },
                                          "semantic": {
                                            "enum": [
                                              "faq",
                                              "plain"
                                            ],
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "accordion"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "version",
                                      "type",
                                      "data"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "data": {
                                        "type": "object",
                                        "required": [
                                          "slug"
                                        ],
                                        "properties": {
                                          "slug": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "layout": {
                                            "enum": [
                                              "card",
                                              "inline"
                                            ],
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "type": {
                                        "type": "string",
                                        "const": "product"
                                      },
                                      "version": {
                                        "type": "integer",
                                        "maximum": 9007199254740991,
                                        "minimum": 0
                                      }
                                    }
                                  },
                                  {
                                    "$ref": "#/definitions/__schema0"
                                  }
                                ]
                              }
                            }
                          }
                        },
                        "maxItems": 4,
                        "minItems": 2
                      },
                      "stackBelow": {
                        "type": "string",
                        "pattern": "^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "const": "columns"
                  },
                  "version": {
                    "type": "integer",
                    "maximum": 9007199254740991,
                    "minimum": 0
                  }
                }
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Replace Post Block",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "remove_post_block",
          "description": "Remove the block at the given index (0-based). All subsequent blocks shift up by one.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "index"
            ],
            "properties": {
              "index": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0,
                "description": "0-based index of the block to remove"
              },
              "postId": {
                "type": "string",
                "description": "The post ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Remove Post Block",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "reorder_post_blocks",
          "description": "Reorder blocks by passing block IDs in the desired order. The id list must contain every existing block id exactly once.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "postId",
              "orderedBlockIds"
            ],
            "properties": {
              "postId": {
                "type": "string",
                "description": "The post ID"
              },
              "orderedBlockIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Block IDs in the desired order; must match the existing set exactly"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Reorder Post Blocks",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_booking",
          "description": "Create a new booking for a member. Use get_available_slots first to find valid times, then create the booking with the service, member, date, and time.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "serviceId",
              "accountId",
              "bookingDate",
              "startTime",
              "endTime"
            ],
            "properties": {
              "notes": {
                "type": "string",
                "description": "Booking notes"
              },
              "endTime": {
                "type": "string",
                "description": "End time in HH:MM format"
              },
              "staffId": {
                "type": "string",
                "description": "Staff member ID"
              },
              "outletId": {
                "type": "string",
                "description": "Outlet/location ID. Required when the company has multiple outlets and the member has no default outlet."
              },
              "accountId": {
                "type": "string",
                "description": "The member/account ID"
              },
              "serviceId": {
                "type": "string",
                "description": "The service ID"
              },
              "startTime": {
                "type": "string",
                "description": "Start time in HH:MM format"
              },
              "resourceId": {
                "type": "string",
                "description": "Resource ID"
              },
              "bookingDate": {
                "type": "string",
                "description": "Date in YYYY-MM-DD format"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Booking",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_conversation_messages",
          "description": "Get messages from a specific conversation thread. Shows the chat history between the merchant and a contact.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversationId"
            ],
            "properties": {
              "page": {
                "type": "number",
                "description": "Page number, newest first (default 1)"
              },
              "limit": {
                "type": "number",
                "description": "Page size (default 20, max 50)"
              },
              "search": {
                "type": "string",
                "description": "Search within messages"
              },
              "conversationId": {
                "type": "string",
                "description": "The conversation ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Conversation Messages",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "find_or_create_workroom_thread",
          "description": "Find or create a Workroom DM thread between a merchant user and an AI colleague. Use this when an inbound event deserves owner attention but no threadId was provided. This only prepares an internal Workroom channel.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "agentId"
            ],
            "properties": {
              "title": {
                "type": "string",
                "maxLength": 120,
                "description": "Optional title if a new thread is created"
              },
              "userId": {
                "type": "string",
                "description": "Merchant user ID to notify. Defaults to the current MCP user when omitted."
              },
              "agentId": {
                "type": "string",
                "description": "AI colleague ID for the Workroom DM"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Find Or Create Workroom Thread",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_attachment_text",
          "description": "Read the text/Markdown content of a file attached to a Workroom thread or sent by a customer (PDF, image, or document). Extracts on first read and caches the result. Returns status \"ready\" with markdown, or \"skipped\"/\"failed\"/\"not_found\" with a reason. Use when a message references an attachment you need to read.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "attachmentId"
            ],
            "properties": {
              "attachmentId": {
                "type": "string",
                "description": "The attachment ID from the message attachments list"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Attachment Text",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "post_workroom_message",
          "description": "Post an internal message from an AI colleague into a Workroom thread. Use this to report findings, ask the owner for approval, or share source links after reading CRM/Inbox data. This does not send anything to customers.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "threadId",
              "agentId",
              "content"
            ],
            "properties": {
              "agentId": {
                "type": "string",
                "description": "AI colleague ID that is a participant in the thread"
              },
              "content": {
                "type": "string",
                "maxLength": 8000,
                "minLength": 1,
                "description": "Message to show in Workroom. Markdown is allowed."
              },
              "metadata": {
                "type": "object",
                "description": "Optional generic metadata, e.g. {sourceRefs:[{type:\"inbox_conversation\",id:\"...\"}]}",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "threadId": {
                "type": "string",
                "description": "Workroom thread ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Post Workroom Message",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_inbox_reply_suggestion",
          "description": "Create a draft reply suggestion that appears inline in the FavCRM Inbox composer. Use this for message.inbound events with replyPolicy=\"suggest\"; it does not send anything to the customer.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversationId",
              "agentId",
              "body"
            ],
            "properties": {
              "body": {
                "type": "string",
                "maxLength": 8000,
                "minLength": 1,
                "description": "Draft reply text for the merchant to review"
              },
              "agentId": {
                "type": "string",
                "minLength": 1,
                "description": "AI colleague ID creating the suggestion"
              },
              "subject": {
                "type": "string",
                "maxLength": 500,
                "description": "Optional email subject suggestion"
              },
              "metadata": {
                "type": "object",
                "description": "Optional metadata such as rationale, confidence, or source refs",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "conversationId": {
                "type": "string",
                "minLength": 1,
                "description": "Inbox conversation ID"
              },
              "sourceMessageId": {
                "type": "string",
                "description": "Inbound message ID this draft responds to"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Inbox Reply Suggestion",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "request_send_approval",
          "description": "Create a merchant-owned Workroom approval request for a customer-facing send. The agent must not call send_message, send_whatsapp_message, send_test_campaign, or send_campaign directly.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "threadId",
              "agentId",
              "actionType",
              "summary",
              "payload"
            ],
            "properties": {
              "agentId": {
                "type": "string",
                "description": "AI colleague ID that is a participant in the thread"
              },
              "payload": {
                "type": "object",
                "description": "Exact tool payload to execute if the merchant approves. For send_test_campaign use { campaignId, to }, with an email address or international WhatsApp number matching the campaign channel.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "summary": {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1,
                "description": "Human-readable draft/recipient/campaign summary shown above the approval buttons"
              },
              "threadId": {
                "type": "string",
                "description": "Workroom thread ID where the approval button should appear"
              },
              "actionType": {
                "enum": [
                  "send_message",
                  "send_whatsapp_message",
                  "send_test_campaign",
                  "send_campaign"
                ],
                "type": "string",
                "description": "The customer-facing action to execute only after merchant approval"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Request Send Approval",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_segments",
          "description": "List customer segments. Segments group members by criteria for targeted campaigns.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by segment name"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Segments",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_segment",
          "description": "Get customer segment details including type, criteria, and live member count.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "segmentId"
            ],
            "properties": {
              "segmentId": {
                "type": "string",
                "description": "The segment ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Segment",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_segment_members",
          "description": "Get the members that belong to a specific segment.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "segmentId"
            ],
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "segmentId": {
                "type": "string",
                "description": "The segment ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Segment Members",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_segment",
          "description": "Create a new customer segment. Use STATIC for manual member lists, DYNAMIC for criteria-based auto-filtering.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Segment name"
              },
              "criteria": {
                "type": "object",
                "required": [
                  "operator",
                  "conditions"
                ],
                "properties": {
                  "operator": {
                    "enum": [
                      "AND",
                      "OR"
                    ],
                    "type": "string",
                    "description": "How to combine conditions"
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "type",
                        "operator"
                      ],
                      "properties": {
                        "days": {
                          "type": "number",
                          "description": "Days window for time-based conditions"
                        },
                        "type": {
                          "type": "string",
                          "description": "Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Single value for text/date/selection/custom-field conditions"
                        },
                        "values": {
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              }
                            ]
                          },
                          "description": "Multiple values for IN/NOT_IN conditions"
                        },
                        "operator": {
                          "type": "string",
                          "description": "Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"
                        },
                        "fieldName": {
                          "type": "string",
                          "description": "Custom field name for custom-field segment conditions"
                        },
                        "fieldType": {
                          "type": "string",
                          "description": "Custom field type for custom-field segment conditions"
                        },
                        "threshold": {
                          "type": "number",
                          "description": "Numeric threshold for numeric conditions"
                        },
                        "definitionId": {
                          "type": "string",
                          "description": "Custom field definition ID for custom-field segment conditions"
                        }
                      }
                    },
                    "description": "Filter conditions"
                  }
                },
                "description": "Dynamic segment criteria"
              },
              "description": {
                "type": "string",
                "description": "Segment description"
              },
              "segmentType": {
                "enum": [
                  "STATIC",
                  "DYNAMIC"
                ],
                "type": "string",
                "description": "Segment type (default DYNAMIC)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Segment",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_segment",
          "description": "Update an existing customer segment by id. Pass only the fields to change; criteria replaces the existing rules.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "segmentId"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "New segment name"
              },
              "criteria": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "operator",
                      "conditions"
                    ],
                    "properties": {
                      "operator": {
                        "enum": [
                          "AND",
                          "OR"
                        ],
                        "type": "string",
                        "description": "How to combine conditions"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "type",
                            "operator"
                          ],
                          "properties": {
                            "days": {
                              "type": "number",
                              "description": "Days window for time-based conditions"
                            },
                            "type": {
                              "type": "string",
                              "description": "Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Single value for text/date/selection/custom-field conditions"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  }
                                ]
                              },
                              "description": "Multiple values for IN/NOT_IN conditions"
                            },
                            "operator": {
                              "type": "string",
                              "description": "Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"
                            },
                            "fieldName": {
                              "type": "string",
                              "description": "Custom field name for custom-field segment conditions"
                            },
                            "fieldType": {
                              "type": "string",
                              "description": "Custom field type for custom-field segment conditions"
                            },
                            "threshold": {
                              "type": "number",
                              "description": "Numeric threshold for numeric conditions"
                            },
                            "definitionId": {
                              "type": "string",
                              "description": "Custom field definition ID for custom-field segment conditions"
                            }
                          }
                        },
                        "description": "Filter conditions"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Replace dynamic criteria, or null to clear criteria"
              },
              "segmentId": {
                "type": "string",
                "description": "The segment ID to update"
              },
              "description": {
                "type": "string",
                "description": "New segment description"
              },
              "segmentType": {
                "enum": [
                  "STATIC",
                  "DYNAMIC"
                ],
                "type": "string",
                "description": "Change segment type"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Segment",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "preview_segment_count",
          "description": "Preview how many customers would match dynamic segment criteria before creating or updating a segment.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "criteria": {
                "anyOf": [
                  {
                    "type": "object",
                    "required": [
                      "operator",
                      "conditions"
                    ],
                    "properties": {
                      "operator": {
                        "enum": [
                          "AND",
                          "OR"
                        ],
                        "type": "string",
                        "description": "How to combine conditions"
                      },
                      "conditions": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "type",
                            "operator"
                          ],
                          "properties": {
                            "days": {
                              "type": "number",
                              "description": "Days window for time-based conditions"
                            },
                            "type": {
                              "type": "string",
                              "description": "Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ],
                              "description": "Single value for text/date/selection/custom-field conditions"
                            },
                            "values": {
                              "type": "array",
                              "items": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  }
                                ]
                              },
                              "description": "Multiple values for IN/NOT_IN conditions"
                            },
                            "operator": {
                              "type": "string",
                              "description": "Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"
                            },
                            "fieldName": {
                              "type": "string",
                              "description": "Custom field name for custom-field segment conditions"
                            },
                            "fieldType": {
                              "type": "string",
                              "description": "Custom field type for custom-field segment conditions"
                            },
                            "threshold": {
                              "type": "number",
                              "description": "Numeric threshold for numeric conditions"
                            },
                            "definitionId": {
                              "type": "string",
                              "description": "Custom field definition ID for custom-field segment conditions"
                            }
                          }
                        },
                        "description": "Filter conditions"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dynamic criteria to preview. Omit or null to count all active customers."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Preview Segment Count",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "set_segment_members",
          "description": "Replace the members of a STATIC customer segment with the given account IDs. The segment is converted to STATIC.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "segmentId",
              "accountIds"
            ],
            "properties": {
              "segmentId": {
                "type": "string",
                "description": "The segment ID"
              },
              "accountIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 1000,
                "description": "CRM account IDs to set as segment members"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Set Segment Members",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_segment",
          "description": "Delete a customer segment.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "segmentId"
            ],
            "properties": {
              "segmentId": {
                "type": "string",
                "description": "The segment ID to delete"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Segment",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "list_templates",
          "description": "List the company's WhatsApp message templates with their Meta approval status (PENDING / APPROVED / REJECTED). Check this to see which templates are approved before referencing one in a campaign.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 100,
                "minimum": 1,
                "description": "Max templates to return (default 20)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Templates",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_template",
          "description": "Create and submit a WhatsApp message template to Meta for approval. Text templates only (header text, body with {{1}} variables, footer) — add buttons in the app. The template is NOT usable until Meta approves it (check with list_templates). Submitting consumes the store’s Meta template allowance.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "category",
              "message"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Friendly template name (a Meta-safe id is derived from it)."
              },
              "footer": {
                "type": "string",
                "description": "Optional small footer text."
              },
              "message": {
                "type": "string",
                "minLength": 1,
                "description": "Body text. Use {{1}}, {{2}} for personalised values."
              },
              "category": {
                "enum": [
                  "MARKETING",
                  "UTILITY",
                  "AUTHENTICATION"
                ],
                "type": "string",
                "description": "UTILITY = transactional (order/shipping), MARKETING = promos, AUTHENTICATION = codes."
              },
              "language": {
                "type": "string",
                "description": "Language code, default en_US."
              },
              "headerText": {
                "type": "string",
                "description": "Optional short bold header above the body."
              },
              "variableSamples": {
                "type": "object",
                "description": "Example values per variable number, e.g. {\"1\":\"Sara\"} — Meta reviews with these.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Template",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_outlets",
          "description": "List shop outlets/locations for the company.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "activeOnly": {
                "type": "boolean",
                "description": "When true, only return active outlets (default false)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Outlets",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_outlet",
          "description": "Create a shop outlet/location. Optionally pass id to preserve a legacy UUID during migration.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Optional outlet UUID (for legacy migration; non-standard formats accepted)"
              },
              "name": {
                "type": "string",
                "description": "Outlet name"
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contact phone"
              },
              "address": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Street address"
              },
              "logoUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Logo URL"
              },
              "isActive": {
                "type": "boolean",
                "description": "Whether outlet is active (default true)"
              },
              "latitude": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Latitude"
              },
              "longitude": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Longitude"
              },
              "sortOrder": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Display sort order (default 0)"
              },
              "acceptsOrders": {
                "type": "boolean",
                "description": "Whether outlet accepts online orders (default true)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Outlet",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_outlet",
          "description": "Update an existing shop outlet/location by ID.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Outlet ID (UUID)"
              },
              "name": {
                "type": "string",
                "description": "Outlet name"
              },
              "phone": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contact phone"
              },
              "address": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Street address"
              },
              "logoUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Logo URL"
              },
              "isActive": {
                "type": "boolean",
                "description": "Whether outlet is active"
              },
              "latitude": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Latitude"
              },
              "longitude": {
                "anyOf": [
                  {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Longitude"
              },
              "sortOrder": {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": -9007199254740991,
                "description": "Display sort order"
              },
              "acceptsOrders": {
                "type": "boolean",
                "description": "Whether outlet accepts online orders"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Outlet",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_products",
          "description": "List shop products with optional filters by name, status, or category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by product name"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "ACTIVE",
                  "ARCHIVED"
                ],
                "type": "string",
                "description": "Filter by status"
              },
              "categoryId": {
                "type": "number",
                "description": "Filter by category ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Products",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_product",
          "description": "Get full product detail including images, options, and variations.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "productId"
            ],
            "properties": {
              "productId": {
                "type": "number",
                "description": "The product ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Product",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_product",
          "description": "Create a new shop product as DRAFT. Merchant can review and activate from the portal.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "price"
            ],
            "properties": {
              "sku": {
                "type": "string",
                "description": "SKU code"
              },
              "name": {
                "type": "string",
                "description": "Product name"
              },
              "price": {
                "type": "string",
                "description": "Price as decimal string (e.g. \"29.99\")"
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "Category IDs (first is primary)"
              },
              "description": {
                "type": "string",
                "description": "Product description"
              },
              "memberPrice": {
                "type": "string",
                "description": "Members-only price"
              },
              "productType": {
                "enum": [
                  "one_time",
                  "recurring"
                ],
                "type": "string",
                "description": "Product type (default one_time)"
              },
              "discountPrice": {
                "type": "string",
                "description": "Discounted price"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Product",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_product",
          "description": "Update an existing product. Only provided fields are changed.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "productId"
            ],
            "properties": {
              "sku": {
                "type": "string",
                "description": "SKU code"
              },
              "name": {
                "type": "string",
                "description": "Product name"
              },
              "price": {
                "type": "string",
                "description": "Price as decimal string"
              },
              "status": {
                "enum": [
                  "DRAFT",
                  "ACTIVE",
                  "ARCHIVED"
                ],
                "type": "string",
                "description": "Product status"
              },
              "productId": {
                "type": "number",
                "description": "The product ID"
              },
              "categoryIds": {
                "type": "array",
                "items": {
                  "type": "number"
                },
                "description": "Category IDs (first is primary). Replaces all existing categories."
              },
              "description": {
                "type": "string",
                "description": "Product description"
              },
              "memberPrice": {
                "type": "string",
                "description": "Members-only price"
              },
              "discountPrice": {
                "type": "string",
                "description": "Discounted price"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Product",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_product_categories",
          "description": "List all product categories for the shop.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Product Categories",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_product_category",
          "description": "Create a product category. Use parentId to create subcategories under an existing category.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Category name"
              },
              "parentId": {
                "type": "number",
                "description": "Parent category ID for subcategories"
              },
              "sortOrder": {
                "type": "number",
                "description": "Display sort order"
              },
              "description": {
                "type": "string",
                "description": "Category description"
              },
              "onlineEnabled": {
                "type": "boolean",
                "description": "Show in online store (default true)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Product Category",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "create_variation",
          "description": "Add a variation (size, color, etc.) to an existing product.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "productId",
              "price"
            ],
            "properties": {
              "sku": {
                "type": "string",
                "description": "Variation SKU"
              },
              "name": {
                "type": "string",
                "description": "Variation name"
              },
              "price": {
                "type": "string",
                "description": "Price as decimal string (e.g. \"29.99\")"
              },
              "productId": {
                "type": "number",
                "description": "The product ID"
              },
              "memberPrice": {
                "type": "string",
                "description": "Members-only price"
              },
              "stockStatus": {
                "enum": [
                  "in_stock",
                  "out_of_stock",
                  "low_stock"
                ],
                "type": "string",
                "description": "Stock status"
              },
              "discountPrice": {
                "type": "string",
                "description": "Discounted price"
              },
              "stockQuantity": {
                "type": "number",
                "description": "Stock quantity"
              },
              "selectedOptions": {
                "type": "object",
                "description": "Option selections e.g. {\"Size\": \"Large\"}",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Variation",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_orders",
          "description": "List shop orders with optional status and search filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "search": {
                "type": "string",
                "description": "Search by order number or customer name/email"
              },
              "status": {
                "enum": [
                  "pending",
                  "confirmed",
                  "processing",
                  "shipped",
                  "delivered",
                  "cancelled",
                  "refunded"
                ],
                "type": "string",
                "description": "Filter by order status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Orders",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_order",
          "description": "Get full order detail including line items.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "orderId"
            ],
            "properties": {
              "orderId": {
                "type": "string",
                "description": "The order UUID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Order",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "update_order_status",
          "description": "Update the status of a shop order (e.g. confirm, ship, cancel).",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "orderId",
              "status"
            ],
            "properties": {
              "status": {
                "enum": [
                  "pending",
                  "confirmed",
                  "processing",
                  "shipped",
                  "delivered",
                  "cancelled",
                  "refunded"
                ],
                "type": "string",
                "description": "New order status"
              },
              "orderId": {
                "type": "string",
                "description": "The order UUID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Order Status",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_offer_rules",
          "description": "List upsell/cross-sell offer rules with optional filters.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "type": {
                "enum": [
                  "upsell",
                  "cross_sell",
                  "bundle",
                  "post_purchase"
                ],
                "type": "string",
                "description": "Filter by rule type"
              },
              "limit": {
                "type": "number",
                "description": "Max results (default 20)"
              },
              "status": {
                "enum": [
                  "draft",
                  "active",
                  "paused"
                ],
                "type": "string",
                "description": "Filter by status"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Offer Rules",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_offer_rule",
          "description": "Get offer rule detail including associated products and discounts.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "ruleId"
            ],
            "properties": {
              "ruleId": {
                "type": "string",
                "description": "The offer rule ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Offer Rule",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_offer_rule",
          "description": "Create an upsell/cross-sell offer rule as draft. Specify trigger type, conditions, and suggested products with optional discounts.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "type",
              "triggerType"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Rule name"
              },
              "type": {
                "enum": [
                  "upsell",
                  "cross_sell",
                  "bundle",
                  "post_purchase"
                ],
                "type": "string",
                "description": "Rule type: upsell, cross_sell, bundle, or post_purchase"
              },
              "products": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "productId"
                  ],
                  "properties": {
                    "productId": {
                      "type": "number",
                      "description": "Product ID to suggest"
                    },
                    "discountType": {
                      "enum": [
                        "percentage",
                        "fixed_amount"
                      ],
                      "type": "string",
                      "description": "Discount type"
                    },
                    "discountValue": {
                      "type": "string",
                      "description": "Discount value"
                    }
                  }
                },
                "description": "Products to suggest with optional discounts"
              },
              "description": {
                "type": "string",
                "description": "Rule description"
              },
              "triggerType": {
                "enum": [
                  "product_view",
                  "cart_contains",
                  "cart_threshold",
                  "post_order",
                  "category_view"
                ],
                "type": "string",
                "description": "When the offer triggers"
              },
              "triggerConfig": {
                "type": "object",
                "description": "Trigger-specific configuration",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Offer Rule",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "query_favcrm_platform",
          "description": "Search FavCRM MCP tools, enabled skills, and feature areas for how to use the platform. Use before guessing tool names or JSON arguments.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "query"
            ],
            "properties": {
              "area": {
                "enum": [
                  "all",
                  "tools",
                  "skills",
                  "features"
                ],
                "type": "string",
                "description": "Restrict search area (default all)"
              },
              "limit": {
                "type": "integer",
                "maximum": 20,
                "minimum": 1,
                "description": "Maximum results (default 8)"
              },
              "query": {
                "type": "string",
                "minLength": 1,
                "description": "Plain-language capability question, e.g. \"create a booking\" or \"send a campaign safely\""
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Query Favcrm Platform",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "search_tools",
          "description": "Search the available FavCRM tool catalog for relevant operations. Use this when the curated direct tool list does not contain the operation you need.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 20,
                "minimum": 1,
                "description": "Maximum results (default 8, max 20)"
              },
              "query": {
                "type": "string",
                "minLength": 1,
                "description": "Plain-language tool search, e.g. \"delete a segment\" or \"set custom field values\""
              },
              "scope": {
                "type": "string",
                "description": "Optional exact scope filter, e.g. contacts, customer_segments, invoices"
              },
              "write": {
                "type": "boolean",
                "description": "Filter to write tools (true) or read-only tools (false)"
              },
              "includeInputSchema": {
                "type": "boolean",
                "description": "Include full JSON input schemas for returned tools. Defaults to false to keep context small."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Search Tools",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "execute_tool",
          "description": "Execute an available FavCRM tool by name after discovering it with search_tools. Target tool availability, input schema, module gates, and audit logging are still enforced.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "toolName"
            ],
            "properties": {
              "toolName": {
                "type": "string",
                "minLength": 1,
                "description": "Exact target tool name returned by search_tools"
              },
              "arguments": {
                "type": "object",
                "description": "Arguments object for the target tool. Must match the target input schema.",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Execute Tool",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "query_company_knowledge",
          "description": "Search this company's reviewed knowledge base and return grounded snippets with source document IDs. Use for merchant policies, FAQs, pricing notes, brand guidance, and other uploaded references.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "query"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "maximum": 20,
                "minimum": 1,
                "description": "Maximum matching snippets (default 5)"
              },
              "query": {
                "type": "string",
                "minLength": 1,
                "description": "Question or keywords to search for in company knowledge"
              },
              "maxSnippetChars": {
                "type": "integer",
                "maximum": 1200,
                "minimum": 120,
                "description": "Maximum characters per snippet (default 600)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Query Company Knowledge",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "list_knowledge_documents",
          "description": "List merchant knowledge base documents (uploads + scraped URLs). Use reviewStatus/syncable to see what is ready for agent retrieval. Pass `updatedAfter` for delta sync. Reviewed content is fetched via GET /v6/merchant/ai/knowledge/{id}/content; source audit text is available with ?variant=extracted.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "limit": {
                "type": "number",
                "description": "Max results (default 100)"
              },
              "updatedAfter": {
                "type": "string",
                "description": "ISO timestamp — only return docs updated after this. Use for delta sync."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Knowledge Documents",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_knowledge_document",
          "description": "Fetch a single knowledge document with metadata + extraction/review status. Reviewed content is served via GET /v6/merchant/ai/knowledge/{id}/content; raw/extracted variants are for audit.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "documentId"
            ],
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Knowledge document ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Knowledge Document",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "scrape_knowledge_url",
          "description": "Fetch a URL's content into the knowledge base. Server crawls the URL, stores the response body in R2, returns the new document ID. Failures store the row with status='failed'. Use for adding marketing pages, FAQ docs, or external references the agent should be aware of.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "URL to fetch (must be https / http and publicly reachable)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Scrape Knowledge Url",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "add_knowledge_text",
          "description": "Add a free-form text document to the knowledge base. Use for pasted policies, FAQs, internal notes, brand voice references — anything the agent should be able to retrieve later. Stored as a single document; agent-side embedding/retrieval happens elsewhere.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "name",
              "content"
            ],
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 200,
                "minLength": 1,
                "description": "Friendly title for the document"
              },
              "content": {
                "type": "string",
                "minLength": 1,
                "description": "Document body text"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Add Knowledge Text",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "delete_knowledge_document",
          "description": "Soft-delete a knowledge document. The agent loses access immediately, but the document can be restored with restore_knowledge_document.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "documentId"
            ],
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Knowledge document ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Delete Knowledge Document",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": true
          }
        },
        {
          "name": "restore_knowledge_document",
          "description": "Restore a previously deleted knowledge document.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "documentId"
            ],
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Knowledge document ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Restore Knowledge Document",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_shipping_methods",
          "description": "List all shipping methods configured for the shop.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Shipping Methods",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "report_agent_issue",
          "description": "Report a FavCRM platform issue when an agent finds a missing MCP path, tool failure, confusing schema, CLI/docs issue, or SDK fallback. Include logs, AI analysis, references, and clarification questions so the platform team can follow up.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "title",
              "severity",
              "area",
              "expectedBehavior",
              "actualBehavior",
              "stepsTried",
              "aiAnalysis"
            ],
            "properties": {
              "area": {
                "enum": [
                  "mcp_tool_missing",
                  "mcp_tool_error",
                  "mcp_schema_confusing",
                  "auth",
                  "cli",
                  "docs",
                  "sdk_fallback",
                  "other"
                ],
                "type": "string",
                "description": "Issue area"
              },
              "logs": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Relevant error messages, command output, or stack traces"
              },
              "title": {
                "type": "string",
                "maxLength": 180,
                "minLength": 3,
                "description": "Short issue title"
              },
              "severity": {
                "enum": [
                  "critical",
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "description": "Impact level"
              },
              "toolCalls": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "description": "Relevant MCP/CLI/SDK calls, arguments, and outcomes"
              },
              "aiAnalysis": {
                "type": "string",
                "minLength": 1,
                "description": "Agent analysis of likely root cause and impact"
              },
              "references": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "description": "Source links, file paths, docs, screenshots, or IDs that support the report"
              },
              "stepsTried": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 1,
                "description": "Concrete steps the agent tried before reporting"
              },
              "workaround": {
                "type": "string",
                "description": "Temporary workaround used, if any"
              },
              "environment": {
                "type": "object",
                "description": "Runtime context such as MCP URL, CLI version, token type, client, sandbox, model, OS",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              "actualBehavior": {
                "type": "string",
                "minLength": 1,
                "description": "What actually happened"
              },
              "expectedBehavior": {
                "type": "string",
                "minLength": 1,
                "description": "What the agent or user expected to happen"
              },
              "clarificationQuestions": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Questions the platform team should ask the agent/user to resolve ambiguity"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Report Agent Issue",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "register_organisation_request",
          "description": "Step 1 of agentic signup. Sends a 6-digit verification code to the email. After the user reads the code, call register_organisation_verify with it to finish and receive an API key. Use this when a user wants to create a new FavCRM workspace from inside an MCP client.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "organisationName",
              "email"
            ],
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "description": "Owner email — receives a 6-digit code (10 min TTL)"
              },
              "country": {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "description": "ISO 3166-1 alpha-2 country code (HK, US, GB, ...)"
              },
              "industry": {
                "enum": [
                  "beauty",
                  "fitness",
                  "tutoring",
                  "retail",
                  "hospitality",
                  "services",
                  "other"
                ],
                "type": "string",
                "description": "Vertical — drives default templates"
              },
              "timezone": {
                "type": "string",
                "description": "IANA timezone (e.g. Asia/Hong_Kong); falls back to country default"
              },
              "organisationName": {
                "type": "string",
                "maxLength": 80,
                "minLength": 2,
                "description": "Business / brand name (used as the first company name too)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Register Organisation — Request Code",
            "readOnlyHint": false,
            "openWorldHint": true,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "register_organisation_verify",
          "description": "Step 2 of agentic signup. Confirms the 6-digit code and creates the workspace. Returns an API key the agent should set as Authorization: Bearer <apiKey> for all subsequent FavCRM MCP calls in this session.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "requestId",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 6,
                "minLength": 6,
                "description": "6-digit code from the verification email"
              },
              "requestId": {
                "type": "string",
                "description": "From register_organisation_request"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Register Organisation — Verify Code",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_customer_brief",
          "description": "Read-only customer brief for one account: details, tags, linked conversations with cached summaries, and open CRM tasks. Only records you may read are included. A section you cannot access is returned as null and listed in availableSections. Does not call the AI model.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "accountId"
            ],
            "properties": {
              "accountId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "CRM account ID"
              },
              "taskLimit": {
                "type": "number",
                "description": "Max open tasks, 1-20 (default 10)"
              },
              "conversationLimit": {
                "type": "number",
                "description": "Max linked conversations, 1-20 (default 10)"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Customer Brief",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_conversation_summary",
          "description": "Read the cached AI summary of a conversation with freshness information. Read-only: never calls the model, never bills, never writes. Returns summary null when no cache exists. Use refresh_conversation_summary to regenerate.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversationId"
            ],
            "properties": {
              "conversationId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "The conversation ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Conversation Summary",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "refresh_conversation_summary",
          "description": "Regenerate the AI summary of one conversation on explicit user request. Uses the model and is billed to company credits. Respects the cooldown and quiet-period rules, so it may return the current cache instead. Never sends a message or changes tags or tasks.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "conversationId"
            ],
            "properties": {
              "conversationId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "The conversation ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Refresh Conversation Summary",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_crm_tasks",
          "description": "List CRM follow-up tasks you may see (portal tasks, owned by users). Filter by status, owner (\"mine\" or ownerId), linked account, dueWindow overdue or today (company timezone), or exact dueAfter/dueBefore datetimes with a zone. Returns the true total and pages. Unassigned tasks cannot be filtered here.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "page": {
                "type": "number",
                "description": "Page number (default 1)"
              },
              "limit": {
                "type": "number",
                "description": "Page size (default 20, max 50)"
              },
              "owner": {
                "enum": [
                  "mine"
                ],
                "type": "string",
                "description": "\"mine\" shows only tasks you own"
              },
              "status": {
                "enum": [
                  "todo",
                  "in_progress",
                  "done"
                ],
                "type": "string",
                "description": "Task status: todo, in_progress or done"
              },
              "ownerId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Only tasks owned by this users.id. Company membership IDs do not match."
              },
              "dueAfter": {
                "type": "string",
                "maxLength": 80,
                "description": "ISO 8601 datetime with timezone offset or Z; inclusive lower bound"
              },
              "accountId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "Only tasks linked to this CRM account, if you can see it"
              },
              "dueBefore": {
                "type": "string",
                "maxLength": 80,
                "description": "ISO 8601 datetime with timezone offset or Z; exclusive upper bound"
              },
              "dueWindow": {
                "enum": [
                  "overdue",
                  "today"
                ],
                "type": "string",
                "description": "overdue: due before now. today: due today in the company timezone. Both list open tasks only."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "List Crm Tasks",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "get_crm_task",
          "description": "Get one CRM follow-up task you may see, with its UTC due instant and the company timezone. Unseen and missing tasks return not found.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "taskId"
            ],
            "properties": {
              "taskId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "CRM task ID"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Get Crm Task",
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "create_crm_task",
          "description": "Create a CRM follow-up task for you or, where your assignment policy allows, another active member. Optionally link it to a CRM account or conversation you can see. dueAt must be an exact datetime with a timezone; resolve relative dates such as \"tomorrow\" with the user first.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "title"
            ],
            "properties": {
              "dueAt": {
                "type": "string",
                "maxLength": 80,
                "description": "Exact ISO 8601 datetime with timezone offset or Z. Relative dates like \"tomorrow\" must be resolved by the user first."
              },
              "title": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "Task title"
              },
              "ownerId": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100,
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Owner users.id. Defaults to you. Null leaves the task unassigned."
              },
              "priority": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ],
                "type": "string",
                "description": "Priority (default medium)"
              },
              "relatedId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "ID of the account or conversation named by relatedType"
              },
              "description": {
                "type": "string",
                "maxLength": 10000,
                "description": "Details"
              },
              "relatedType": {
                "enum": [
                  "account",
                  "conversation",
                  "none"
                ],
                "type": "string",
                "description": "Link to a CRM account or conversation. Default none."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Create Crm Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "update_crm_task",
          "description": "Update a CRM follow-up task you can work: title, description, dueAt (exact datetime, or null to clear), owner (users.id, or null to unassign), status (done sets completion) or priority. Changing the linked account or conversation is not supported; create a new task instead.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "taskId"
            ],
            "properties": {
              "dueAt": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 80
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Exact ISO 8601 datetime with timezone offset or Z, or null to clear"
              },
              "title": {
                "type": "string",
                "maxLength": 500,
                "minLength": 1,
                "description": "New title"
              },
              "status": {
                "enum": [
                  "todo",
                  "in_progress",
                  "done"
                ],
                "type": "string",
                "description": "todo, in_progress or done"
              },
              "taskId": {
                "type": "string",
                "maxLength": 100,
                "minLength": 1,
                "description": "CRM task ID"
              },
              "ownerId": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 100,
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "New owner users.id, or null to unassign"
              },
              "priority": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "urgent"
                ],
                "type": "string",
                "description": "Priority"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 10000
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "New description, or null to clear"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Update Crm Task",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "backfill_conversation_summaries",
          "description": "Find conversations with no usable cached AI summary (missing or malformed; legacy valid caches are never touched) and generate them, at most limit per call (default 10, max 10). Newest activity first; only conversations you may read are considered. Default dryRun=true lists candidates with no model call, billing or writes. Set dryRun=false to generate; it is billed to company credits and needs company AI summaries enabled. Stops on the first generation failure, missing AI gateway configuration (rejected before any request, not billed), disabled flag, unknown usage or lost access. Cursor rules: use executeCursor from a preview to execute from its frozen window and starting position; eligibility is rechecked. nextCursor only continues the mode that produced it. Scans at most 50 visible rows per call, so hasMore may be true with no candidates in this page.",
          "inputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
              "days": {
                "type": "integer",
                "default": 30,
                "maximum": 90,
                "minimum": 1,
                "description": "Rolling window in days by last message time, 1-90 (default 30)"
              },
              "limit": {
                "type": "integer",
                "default": 10,
                "maximum": 10,
                "minimum": 1,
                "description": "Max generation attempts in this call, 1-10 (default 10). A remaining time budget can yield fewer."
              },
              "cursor": {
                "type": "string",
                "maxLength": 512,
                "minLength": 1,
                "description": "Opaque cursor from an earlier call. Pass the same cursor to the same mode to continue."
              },
              "dryRun": {
                "type": "boolean",
                "default": true,
                "description": "true (default) previews candidates with no model call, billing or writes. false generates summaries."
              },
              "channel": {
                "enum": [
                  "whatsapp",
                  "sms",
                  "email",
                  "messenger",
                  "instagram",
                  "threads",
                  "web_form"
                ],
                "type": "string",
                "description": "Only conversations on this channel"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "required": [
              "data",
              "summary",
              "renderType"
            ],
            "properties": {
              "data": {
                "description": "Tool result payload — shape varies per tool, see the tool description"
              },
              "summary": {
                "type": "string",
                "description": "One-line human-readable summary of the action"
              },
              "renderType": {
                "enum": [
                  "table",
                  "detail",
                  "stats",
                  "text",
                  "chart",
                  "download"
                ],
                "type": "string",
                "description": "UI rendering hint for the result"
              }
            },
            "additionalProperties": false
          },
          "annotations": {
            "title": "Backfill Conversation Summaries",
            "readOnlyHint": false,
            "openWorldHint": false,
            "idempotentHint": false,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [
        {
          "name": "contact",
          "uri": "contact://schema",
          "description": "CRM contact (account) record schema. Use list_contacts or get_contact to retrieve actual data."
        },
        {
          "name": "booking",
          "uri": "booking://schema",
          "description": "Booking record schema. Use list_bookings or get_booking_detail for actual data."
        },
        {
          "name": "post",
          "uri": "post://schema",
          "description": "CMS post record schema (blog, landing page, etc). Supports block-based content. Use list_posts or get_post for actual data."
        },
        {
          "name": "product",
          "uri": "product://schema",
          "description": "Shop product schema. Use list_products or get_product for actual data."
        },
        {
          "name": "order",
          "uri": "order://schema",
          "description": "Shop order schema. Use list_orders or get_order for actual data."
        }
      ],
      "prompts": [
        {
          "name": "add-customer",
          "description": "Add a new customer/contact with optional tags and notes"
        },
        {
          "name": "onboard-member",
          "description": "Create a new member, enrol them in a tier, send a welcome"
        },
        {
          "name": "enrol-customer-tier",
          "description": "Move an existing customer into a membership tier"
        },
        {
          "name": "add-loyalty-points",
          "description": "Credit loyalty points to a customer and confirm the new balance"
        },
        {
          "name": "issue-gift-reward",
          "description": "Pick a gift offer and issue it to a customer"
        },
        {
          "name": "book-customer",
          "description": "Find a customer, pick a service and slot, create + confirm a booking"
        },
        {
          "name": "cancel-and-refund",
          "description": "Cancel a booking with the proper refund + audit chain"
        },
        {
          "name": "handle-no-show",
          "description": "Mark a booking as no-show and apply the configured penalty"
        },
        {
          "name": "send-booking-reminder",
          "description": "Find tomorrow's confirmed bookings and ping each customer"
        },
        {
          "name": "create-service",
          "description": "Set up a bookable service with schedule and staff"
        },
        {
          "name": "set-up-promotion",
          "description": "Create a promo code with discount + usage limits"
        },
        {
          "name": "send-campaign",
          "description": "Send a targeted marketing campaign to a segment"
        },
        {
          "name": "respond-to-ticket",
          "description": "Reply to a support ticket and update its status"
        },
        {
          "name": "complete-booking",
          "description": "Find a pending booking and confirm it"
        },
        {
          "name": "publish-blog-post",
          "description": "Create and publish a CMS blog post with content blocks"
        },
        {
          "name": "fulfil-order",
          "description": "Process and mark a shop order as fulfilled"
        },
        {
          "name": "customer-360",
          "description": "Compile a complete view of one customer across the system"
        },
        {
          "name": "find-top-customers",
          "description": "List members by lifetime spend — identify VIPs and at-risk"
        },
        {
          "name": "bulk-tag-segment",
          "description": "Filter customers, apply a tag, optionally create a segment"
        },
        {
          "name": "build-segment",
          "description": "Create a customer segment from criteria and verify the population"
        },
        {
          "name": "manage-deal",
          "description": "Move a deal through the sales pipeline with proper stage updates"
        },
        {
          "name": "manage-task",
          "description": "Create, assign, or update an internal task"
        },
        {
          "name": "switch-workspace",
          "description": "Switch the active workspace for users with multiple companies"
        },
        {
          "name": "inbox-triage",
          "description": "Triage unread customer conversations across channels"
        },
        {
          "name": "review-cancellations",
          "description": "Pull recent cancelled bookings and identify cancellation patterns"
        },
        {
          "name": "generate-blog-post",
          "description": "Use AI image generation + structured blocks to draft a blog post end-to-end"
        },
        {
          "name": "bill-customer",
          "description": "Create an invoice with line items and send it to the customer"
        },
        {
          "name": "record-payment",
          "description": "Record a manual payment against an existing invoice"
        },
        {
          "name": "chase-overdue-invoices",
          "description": "Find overdue invoices and send a payment reminder to each customer"
        },
        {
          "name": "void-invoice",
          "description": "Void a non-paid invoice (destructive — cannot be undone)"
        },
        {
          "name": "start-subscription",
          "description": "Create a manual, non-renewing subscription record for a member"
        },
        {
          "name": "cancel-subscription",
          "description": "Cancel a subscription after confirmation"
        },
        {
          "name": "handle-past-due",
          "description": "Find past-due subscriptions and reach out for payment recovery"
        },
        {
          "name": "pause-subscription",
          "description": "Change the status of a manual subscription"
        },
        {
          "name": "train-ai-agent",
          "description": "Add a knowledge document (URL or pasted text) so the merchant's AI agent can reference it"
        },
        {
          "name": "prune-knowledge",
          "description": "Audit knowledge documents and delete outdated or failed ones"
        },
        {
          "name": "weekly-snapshot",
          "description": "Pull a one-screen summary of the past 7 days"
        }
      ]
    },
    "instructions": null
  },
  "changes": {
    "total": 1,
    "latest": [
      {
        "observed_at": "2026-11-23T18:15:04.323Z",
        "from_sha": "1f4b913a5e1dd985ae2b5896f5e8fbe0e6fcbe5c47fde0f593df2a355f7a9756",
        "to_sha": "bfcee9db991d26633c7b17c37b27d41e63036ddda5659bf0df90387f10abf5d0",
        "summary": {
          "tool_changed": 1
        },
        "diff": [
          {
            "op": "changed",
            "kind": "tool",
            "name": "search_members",
            "path": "/description",
            "after": "Search and filter members/accounts by text, date, tier, tags or history. OAuth filters require the related read permission; activity history filters are unavailable to OAuth.",
            "before": "Search and filter members/accounts. Supports text search, date ranges, booking/activity history, membership tier, tags, and more. Use lastBookingBefore/inactiveDays to find inactive members."
          }
        ],
        "withheld": false
      }
    ]
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}