validate_page
Checks a page source against each element’s schema, flagging save-blocking errors and rendering warnings before build_page and showing code-based fixes.
Instructions
Validate a page source ({ sections: [...] }) against every element's schema. Each message reads [CODE] #id (type) where: problem → fix. errors block saving (duplicate/missing ids, renderer-crash shapes…); warnings render wrong (UNKNOWN_KEY invented/misspelled key, STYLE_KEY not a CSS property, TYPE_MISMATCH, BAD_VALUE outside the allowed values, BAD_PARENT, OUTSIDE_FORM, FIELD_NAME, EVENT/BINDING problems…). Repeated warnings are collapsed per code; summary.by_code counts all. Always run this before build_page and fix by code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "validate_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Page source object or JSON string | |
| page_id | No | Judge it as that page's save would: its kind + the site's popups / global sources (dangling event targets and record bindings become errors) | |
| page_kind | No | Page kind when there is no page yet (build_page type) |