add_page
Add a new form page. By default it is inserted before the ending page.
Use this to create multi-page forms. After adding, use add_element to populate the page.
remove_page
Remove a form page and all its elements.
Cannot remove the ending page or the last remaining form page.
reorder_pages
Reorder the form pages. Provide the form page IDs in the desired order.
The ending page is always kept last automatically — do not include it.
set_theme
Set the form's visual theme. Choose colors, fonts, layout, and component styles that match the form's topic and tone. Be creative — pick a cohesive palette.
Only send what you want to change — unset properties keep their current values.
COLORS (all hex values):
- primary: main accent color (buttons, highlights)
- background: page background
- text: general body text
- question: question/label text
- answer: user input text
- secondary: secondary UI elements
- surface: input field backgrounds
- border: input borders, dividers
- error: validation error color
FONT:
- family: global font family shorthand (Google Fonts compatible: Inter, Poppins, Playfair Display, Space Grotesk, DM Sans, Lora, etc.)
- text: { size: "16px", family: "Inter" }
- headings: { size: "32px", family: "Playfair Display" }
LAYOUT types:
- "under": questions stacked vertically (default)
- "left": labels left, inputs right
- "right": labels right, inputs left
- "clean": minimal, no visual separators
- "over": background image with overlay
- "through": full-bleed background
COMPONENTS:
- form: { variables: { gap: "30px", maxWidth: "700px", textAlign: "left" } }
- input: { preset: "default" | "square" }
- button: { preset: "default" | "square", hoverAnimation: { preset: "default" | "grow" } }
- question: { variables: { fontWeight: "500" } }
set_settings
Configure form-level settings. Only send what you want to change.
Supported language codes: ar, ca, zh-Hans, zh-Hant, hr, cs, da, nl, en, et, fi, fr, de, el, he, hi, hu, id, it, ja, ko, no, pl, pt, ru, es, sv, tr, uk, vi.
set_logic
Set conditional logic rules and/or event triggers. This replaces ALL existing rules/triggers.
Use get_form_summary to see element and page IDs for building conditions.
Logic rule structure (FOLLOW THIS EXACTLY):
{
"id": "<uuid>",
"name": "Human-readable rule description",
"conditions": [
{
"id": "<uuid>",
"variable": "field:<elementId>",
"operator": "isNotEmpty",
"value": null
}
],
"logicalOperator": "all",
"actions": [
{
"id": "<uuid>",
"name": "showElement",
"data": { "elementId": "<elementId>" }
}
]
}
CRITICAL: In actions, the action type key is "name" NOT "type". Using "type" will break the form.
CRITICAL: In conditions, always include "value" (set to null for operators like isEmpty/isNotEmpty that don't need a value).
Condition operators: isEmpty, isNotEmpty, isEqual, isNotEqual, contains, doesNotContain, startsWith, endsWith, lessThan, lessThanOrEqual, greaterThan, greaterThanOrEqual
For isEqual/isNotEqual/contains/etc., set "value" to the comparison string.
Action names: hideElement, showElement, hidePage, skipToPage, setEnding
Action data: { elementId: "..." } for element actions, { pageId: "..." } for page actions.
logicalOperator: "all" (AND) or "any" (OR) for combining multiple conditions.
Event trigger structure (FOLLOW THIS EXACTLY):
{
"id": "<uuid>",
"name": "Human-readable trigger description",
"trigger": {
"name": "formSubmitted"
},
"actions": [
{
"id": "<uuid>",
"name": "openUrl",
"data": { "url": "https://example.com" }
}
]
}
CRITICAL: "trigger" is an object with a "name" key, NOT a plain string.
Trigger names: formSubmitted, formLoaded, formPageShown
Action names: openUrl (requires data.url), restartForm (no data needed)
All IDs (rule id, condition ids, action ids) must be UUIDs.
publish_form
Publish the form so the user can keep it, share it, and collect real responses.
ONLY call this when the user EXPLICITLY asks to publish, save, or share their form.
Do NOT call this automatically — the preview URL is sufficient during the building process.
Creates a permanent copy of the form and returns an editor URL. The user can create a Weavely account there to claim full ownership.
IMPORTANT: If this tool fails, tell the user there was an error publishing and they should try again. Do NOT suggest visiting the preview URL to claim or publish — that is NOT possible. The preview URL is a temporary link that cannot be claimed or converted into a permanent form.