← All changes
|
modules/mcp/static-resources/abilities/build-composition.md
+3
-1
4.3.0-beta1
→
4.3.3
View file →
| @@ -41,8 +41,9 @@ | ||
| 41 | 41 | - Use widget tags: `<e-button configuration-id="btn1"></e-button>` |
| 42 | 42 | - Containers: "e-flexbox", "e-div-block", "e-tabs" |
| 43 | 43 | - **Every element MUST have a unique "configuration-id" attribute** |
| 44 | 44 | - No attributes, classes, IDs, or text nodes in XML |
| 45 | +- Multiple root elements are allowed. Every opening tag needs exactly one matching closing tag (or use a self-closing tag); a stray or missing closing tag fails the whole call with `invalid_xml`, even on `dry_run` | |
| 45 | 46 | - Pass the raw XML tags directly as the `xml_structure` string. Do NOT wrap the value in `<![CDATA[ ... ]]>`, code fences, quotes, or any other wrapper — JSON string escaping is the only escaping needed. Wrapping in CDATA turns the whole payload into text and the tool will reject it with `empty_composition`. |
| 46 | 47 | |
| 47 | 48 | ## NESTED ELEMENTS |
| 48 | 49 | Some elements have internal tree structures (nesting). When using these elements, you MUST build the FULL tree in XML. |
| @@ -79,9 +80,10 @@ | ||
| 79 | 80 | Match the widget schema shape: |
| 80 | 81 | - **string / enum / url**: plain string (`"h2"`, `"https://example.com"`) |
| 81 | 82 | - **number**: plain number (`42`) |
| 82 | 83 | - **boolean**: plain boolean (`true`) |
| 83 | -- **text** (`title` on `e-heading`, `paragraph` on `e-paragraph`, `text` on `e-button`): plain string (`"Welcome"`). Do NOT wrap in `{ content, children }`. | |
| 84 | +- **text** (`title` on `e-heading`, `paragraph` on `e-paragraph`, `text` on `e-button`): plain string (`"Welcome"`). May contain inline HTML tags for text styling. | |
| 85 | + - Example: `"paragraph": "<strong>Contact support</strong> for a <s>free</s> discounted quote — <em>limited time</em> only."` | |
| 84 | 86 | - **dynamic** (where schema allows): `{ "name": "<tag from elementor://dynamic-tags>", "settings": { ... } }` — settings use plain values per the tag schema; omit `group` |
| 85 | 87 | - **image**: two forms, `id` and `url` are mutually exclusive — send one, not both: |
| 86 | 88 | - Library asset (from `elementor/list-assets` tool): `{ "src": { "id": 123 }, "size": "full" }`. |
| 87 | 89 | - External URL: `{ "src": { "url": "https://example.com/photo.jpg" }, "size": "full" }` — works. If no library asset fits and no on-brand external image is available, tell the user which images to upload. |