Sync site plan with the site
sync_site_planBrings the site plan (.xodia/plan.json) in line with the site on a branch and writes it as an unsaved change, the same as the Plan tab's sync. Xodia reads the site's files (unsaved changes included): pages and their paths, the top-level sections on each page by their data-section ids and in order, the nav and footer links and the theme tokens. The site is the truth for what exists, the plan for intent: pages and sections on the site join the plan, sections follow the site's order, the nav, footer and brand colours and fonts follow the site, and statuses are read from the code. Anything that would drop intent (a built page gone from the site, a removed section with a purpose or notes) is kept for the owner to review in the Plan tab, never removed. With no plan on the branch (or one with no pages), it makes the plan from the site and first stamps missing data-section ids on the page files and the layout (shown in Save like any edit). Use it after you add, rename, remove or reorder pages or top-level sections outside a plan request, when unsure whether the plan matches; requests from Xodia sync on their own when you reply. Answers what changed, what waits for review and the new etag. Nothing is written when the plan already matches. Refuses with site_unreadable when Xodia can't read the site right now (nothing changes; carry on).
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": {
"projectId": "<projectId>"
},
"name": "sync_site_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| etag | No | Optional: the etag from your last get_site_plan; when given and the plan changed since, it answers plan_conflict and writes nothing. | |
| branch | No | Default: the branch the workspace has open. Pass the request's branch when a request names one. | |
| renames | No | Pages you renamed or moved in code, old path to new, so the plan moves their entries (purpose, notes, SEO) instead of treating them as a removed page and a new one. Optional: Xodia also matches by page file and section ids. | |
| projectId | Yes | Project id from list_projects |