@wootsup/yt-builder-mcp 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/README.md +18 -6
  2. package/bin/yt-builder-mcp.js +6 -0
  3. package/dist/auth.d.ts +119 -0
  4. package/dist/auth.d.ts.map +1 -0
  5. package/dist/auth.js +226 -0
  6. package/dist/auth.js.map +1 -0
  7. package/dist/client.d.ts +84 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +151 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/clients/claude-code.d.ts +18 -0
  12. package/dist/clients/claude-code.d.ts.map +1 -0
  13. package/dist/clients/claude-code.js +53 -0
  14. package/dist/clients/claude-code.js.map +1 -0
  15. package/dist/clients/claude-desktop.d.ts +19 -0
  16. package/dist/clients/claude-desktop.d.ts.map +1 -0
  17. package/dist/clients/claude-desktop.js +56 -0
  18. package/dist/clients/claude-desktop.js.map +1 -0
  19. package/dist/clients/cline.d.ts +26 -0
  20. package/dist/clients/cline.d.ts.map +1 -0
  21. package/dist/clients/cline.js +80 -0
  22. package/dist/clients/cline.js.map +1 -0
  23. package/dist/clients/codex-cli.d.ts +42 -0
  24. package/dist/clients/codex-cli.d.ts.map +1 -0
  25. package/dist/clients/codex-cli.js +194 -0
  26. package/dist/clients/codex-cli.js.map +1 -0
  27. package/dist/clients/continue.d.ts +13 -0
  28. package/dist/clients/continue.d.ts.map +1 -0
  29. package/dist/clients/continue.js +52 -0
  30. package/dist/clients/continue.js.map +1 -0
  31. package/dist/clients/cursor.d.ts +12 -0
  32. package/dist/clients/cursor.d.ts.map +1 -0
  33. package/dist/clients/cursor.js +38 -0
  34. package/dist/clients/cursor.js.map +1 -0
  35. package/dist/clients/gemini-cli.d.ts +18 -0
  36. package/dist/clients/gemini-cli.d.ts.map +1 -0
  37. package/dist/clients/gemini-cli.js +44 -0
  38. package/dist/clients/gemini-cli.js.map +1 -0
  39. package/dist/clients/home.d.ts +14 -0
  40. package/dist/clients/home.d.ts.map +1 -0
  41. package/dist/clients/home.js +20 -0
  42. package/dist/clients/home.js.map +1 -0
  43. package/dist/clients/index.d.ts +52 -0
  44. package/dist/clients/index.d.ts.map +1 -0
  45. package/dist/clients/index.js +72 -0
  46. package/dist/clients/index.js.map +1 -0
  47. package/dist/clients/roo-code.d.ts +23 -0
  48. package/dist/clients/roo-code.d.ts.map +1 -0
  49. package/dist/clients/roo-code.js +69 -0
  50. package/dist/clients/roo-code.js.map +1 -0
  51. package/dist/clients/zed.d.ts +12 -0
  52. package/dist/clients/zed.d.ts.map +1 -0
  53. package/dist/clients/zed.js +41 -0
  54. package/dist/clients/zed.js.map +1 -0
  55. package/dist/errors/hints.d.ts +51 -0
  56. package/dist/errors/hints.d.ts.map +1 -0
  57. package/dist/errors/hints.js +95 -0
  58. package/dist/errors/hints.js.map +1 -0
  59. package/dist/errors/mask.d.ts +35 -0
  60. package/dist/errors/mask.d.ts.map +1 -0
  61. package/dist/errors/mask.js +49 -0
  62. package/dist/errors/mask.js.map +1 -0
  63. package/dist/errors/sanitize.d.ts +31 -0
  64. package/dist/errors/sanitize.d.ts.map +1 -0
  65. package/dist/errors/sanitize.js +100 -0
  66. package/dist/errors/sanitize.js.map +1 -0
  67. package/dist/errors.d.ts +42 -0
  68. package/dist/errors.d.ts.map +1 -0
  69. package/dist/errors.js +61 -0
  70. package/dist/errors.js.map +1 -0
  71. package/dist/gateway/advanced-tool/discovery.d.ts +19 -0
  72. package/dist/gateway/advanced-tool/discovery.d.ts.map +1 -0
  73. package/dist/gateway/advanced-tool/discovery.js +53 -0
  74. package/dist/gateway/advanced-tool/discovery.js.map +1 -0
  75. package/dist/gateway/advanced-tool/domains.d.ts +47 -0
  76. package/dist/gateway/advanced-tool/domains.d.ts.map +1 -0
  77. package/dist/gateway/advanced-tool/domains.js +94 -0
  78. package/dist/gateway/advanced-tool/domains.js.map +1 -0
  79. package/dist/gateway/advanced-tool/execute.d.ts +29 -0
  80. package/dist/gateway/advanced-tool/execute.d.ts.map +1 -0
  81. package/dist/gateway/advanced-tool/execute.js +54 -0
  82. package/dist/gateway/advanced-tool/execute.js.map +1 -0
  83. package/dist/gateway/advanced-tool/index.d.ts +36 -0
  84. package/dist/gateway/advanced-tool/index.d.ts.map +1 -0
  85. package/dist/gateway/advanced-tool/index.js +39 -0
  86. package/dist/gateway/advanced-tool/index.js.map +1 -0
  87. package/dist/gateway/advanced-tool/register.d.ts +18 -0
  88. package/dist/gateway/advanced-tool/register.d.ts.map +1 -0
  89. package/dist/gateway/advanced-tool/register.js +69 -0
  90. package/dist/gateway/advanced-tool/register.js.map +1 -0
  91. package/dist/gateway/advanced-tool.d.ts +13 -0
  92. package/dist/gateway/advanced-tool.d.ts.map +1 -0
  93. package/dist/gateway/advanced-tool.js +13 -0
  94. package/dist/gateway/advanced-tool.js.map +1 -0
  95. package/dist/gateway/capturing-server.d.ts +117 -0
  96. package/dist/gateway/capturing-server.d.ts.map +1 -0
  97. package/dist/gateway/capturing-server.js +103 -0
  98. package/dist/gateway/capturing-server.js.map +1 -0
  99. package/dist/gateway/essentials.d.ts +49 -0
  100. package/dist/gateway/essentials.d.ts.map +1 -0
  101. package/dist/gateway/essentials.js +92 -0
  102. package/dist/gateway/essentials.js.map +1 -0
  103. package/dist/gateway/test-support.d.ts +41 -0
  104. package/dist/gateway/test-support.d.ts.map +1 -0
  105. package/dist/gateway/test-support.js +60 -0
  106. package/dist/gateway/test-support.js.map +1 -0
  107. package/dist/index.d.ts +29 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +113 -0
  110. package/dist/index.js.map +1 -0
  111. package/dist/install-skill.d.ts +43 -0
  112. package/dist/install-skill.d.ts.map +1 -0
  113. package/dist/install-skill.js +118 -0
  114. package/dist/install-skill.js.map +1 -0
  115. package/dist/platform/detect.d.ts +64 -0
  116. package/dist/platform/detect.d.ts.map +1 -0
  117. package/dist/platform/detect.js +98 -0
  118. package/dist/platform/detect.js.map +1 -0
  119. package/dist/platform/index.d.ts +121 -0
  120. package/dist/platform/index.d.ts.map +1 -0
  121. package/dist/platform/index.js +176 -0
  122. package/dist/platform/index.js.map +1 -0
  123. package/dist/platform/joomla.d.ts +44 -0
  124. package/dist/platform/joomla.d.ts.map +1 -0
  125. package/dist/platform/joomla.js +46 -0
  126. package/dist/platform/joomla.js.map +1 -0
  127. package/dist/server.d.ts +109 -0
  128. package/dist/server.d.ts.map +1 -0
  129. package/dist/server.js +237 -0
  130. package/dist/server.js.map +1 -0
  131. package/dist/setup-cli-confirm.d.ts +36 -0
  132. package/dist/setup-cli-confirm.d.ts.map +1 -0
  133. package/dist/setup-cli-confirm.js +59 -0
  134. package/dist/setup-cli-confirm.js.map +1 -0
  135. package/dist/setup-cli.d.ts +152 -0
  136. package/dist/setup-cli.d.ts.map +1 -0
  137. package/dist/setup-cli.js +870 -0
  138. package/dist/setup-cli.js.map +1 -0
  139. package/dist/setup-prompts.d.ts +41 -0
  140. package/dist/setup-prompts.d.ts.map +1 -0
  141. package/dist/setup-prompts.js +146 -0
  142. package/dist/setup-prompts.js.map +1 -0
  143. package/dist/setup-token.d.ts +38 -0
  144. package/dist/setup-token.d.ts.map +1 -0
  145. package/dist/setup-token.js +106 -0
  146. package/dist/setup-token.js.map +1 -0
  147. package/dist/setup-wizard-defaults.d.ts +43 -0
  148. package/dist/setup-wizard-defaults.d.ts.map +1 -0
  149. package/dist/setup-wizard-defaults.js +160 -0
  150. package/dist/setup-wizard-defaults.js.map +1 -0
  151. package/dist/setup-wizard-handshake.d.ts +25 -0
  152. package/dist/setup-wizard-handshake.d.ts.map +1 -0
  153. package/dist/setup-wizard-handshake.js +103 -0
  154. package/dist/setup-wizard-handshake.js.map +1 -0
  155. package/dist/setup-wizard-types.d.ts +164 -0
  156. package/dist/setup-wizard-types.d.ts.map +1 -0
  157. package/dist/setup-wizard-types.js +11 -0
  158. package/dist/setup-wizard-types.js.map +1 -0
  159. package/dist/setup-wizard.d.ts +33 -0
  160. package/dist/setup-wizard.d.ts.map +1 -0
  161. package/dist/setup-wizard.js +199 -0
  162. package/dist/setup-wizard.js.map +1 -0
  163. package/dist/setup.d.ts +17 -0
  164. package/dist/setup.d.ts.map +1 -0
  165. package/dist/setup.js +33 -0
  166. package/dist/setup.js.map +1 -0
  167. package/dist/sites/cli/add-site.d.ts +106 -0
  168. package/dist/sites/cli/add-site.d.ts.map +1 -0
  169. package/dist/sites/cli/add-site.js +185 -0
  170. package/dist/sites/cli/add-site.js.map +1 -0
  171. package/dist/sites/cli/list-sites.d.ts +40 -0
  172. package/dist/sites/cli/list-sites.d.ts.map +1 -0
  173. package/dist/sites/cli/list-sites.js +117 -0
  174. package/dist/sites/cli/list-sites.js.map +1 -0
  175. package/dist/sites/cli/remove-site.d.ts +60 -0
  176. package/dist/sites/cli/remove-site.d.ts.map +1 -0
  177. package/dist/sites/cli/remove-site.js +120 -0
  178. package/dist/sites/cli/remove-site.js.map +1 -0
  179. package/dist/sites/cli/set-default.d.ts +47 -0
  180. package/dist/sites/cli/set-default.d.ts.map +1 -0
  181. package/dist/sites/cli/set-default.js +69 -0
  182. package/dist/sites/cli/set-default.js.map +1 -0
  183. package/dist/sites/cli/test-site.d.ts +77 -0
  184. package/dist/sites/cli/test-site.d.ts.map +1 -0
  185. package/dist/sites/cli/test-site.js +146 -0
  186. package/dist/sites/cli/test-site.js.map +1 -0
  187. package/dist/sites/client-pool.d.ts +124 -0
  188. package/dist/sites/client-pool.d.ts.map +1 -0
  189. package/dist/sites/client-pool.js +172 -0
  190. package/dist/sites/client-pool.js.map +1 -0
  191. package/dist/sites/env-bridge.d.ts +55 -0
  192. package/dist/sites/env-bridge.d.ts.map +1 -0
  193. package/dist/sites/env-bridge.js +94 -0
  194. package/dist/sites/env-bridge.js.map +1 -0
  195. package/dist/sites/paths.d.ts +21 -0
  196. package/dist/sites/paths.d.ts.map +1 -0
  197. package/dist/sites/paths.js +37 -0
  198. package/dist/sites/paths.js.map +1 -0
  199. package/dist/sites/probe.d.ts +60 -0
  200. package/dist/sites/probe.d.ts.map +1 -0
  201. package/dist/sites/probe.js +112 -0
  202. package/dist/sites/probe.js.map +1 -0
  203. package/dist/sites/registry.d.ts +142 -0
  204. package/dist/sites/registry.d.ts.map +1 -0
  205. package/dist/sites/registry.js +163 -0
  206. package/dist/sites/registry.js.map +1 -0
  207. package/dist/sites/schema.d.ts +90 -0
  208. package/dist/sites/schema.d.ts.map +1 -0
  209. package/dist/sites/schema.js +71 -0
  210. package/dist/sites/schema.js.map +1 -0
  211. package/dist/sites/secret-resolver.d.ts +109 -0
  212. package/dist/sites/secret-resolver.d.ts.map +1 -0
  213. package/dist/sites/secret-resolver.js +189 -0
  214. package/dist/sites/secret-resolver.js.map +1 -0
  215. package/dist/sites/store.d.ts +82 -0
  216. package/dist/sites/store.d.ts.map +1 -0
  217. package/dist/sites/store.js +198 -0
  218. package/dist/sites/store.js.map +1 -0
  219. package/dist/sites/tools/index.d.ts +28 -0
  220. package/dist/sites/tools/index.d.ts.map +1 -0
  221. package/dist/sites/tools/index.js +30 -0
  222. package/dist/sites/tools/index.js.map +1 -0
  223. package/dist/sites/tools/sites-list.d.ts +48 -0
  224. package/dist/sites/tools/sites-list.d.ts.map +1 -0
  225. package/dist/sites/tools/sites-list.js +135 -0
  226. package/dist/sites/tools/sites-list.js.map +1 -0
  227. package/dist/sites/tools/sites-test.d.ts +47 -0
  228. package/dist/sites/tools/sites-test.d.ts.map +1 -0
  229. package/dist/sites/tools/sites-test.js +148 -0
  230. package/dist/sites/tools/sites-test.js.map +1 -0
  231. package/dist/skill-loader.d.ts +111 -0
  232. package/dist/skill-loader.d.ts.map +1 -0
  233. package/dist/skill-loader.js +191 -0
  234. package/dist/skill-loader.js.map +1 -0
  235. package/dist/tools/elements/builders.d.ts +24 -0
  236. package/dist/tools/elements/builders.d.ts.map +1 -0
  237. package/dist/tools/elements/builders.js +199 -0
  238. package/dist/tools/elements/builders.js.map +1 -0
  239. package/dist/tools/elements/handlers-write.d.ts +49 -0
  240. package/dist/tools/elements/handlers-write.d.ts.map +1 -0
  241. package/dist/tools/elements/handlers-write.js +148 -0
  242. package/dist/tools/elements/handlers-write.js.map +1 -0
  243. package/dist/tools/elements/handlers.d.ts +68 -0
  244. package/dist/tools/elements/handlers.d.ts.map +1 -0
  245. package/dist/tools/elements/handlers.js +206 -0
  246. package/dist/tools/elements/handlers.js.map +1 -0
  247. package/dist/tools/elements/index.d.ts +28 -0
  248. package/dist/tools/elements/index.d.ts.map +1 -0
  249. package/dist/tools/elements/index.js +27 -0
  250. package/dist/tools/elements/index.js.map +1 -0
  251. package/dist/tools/elements.d.ts +13 -0
  252. package/dist/tools/elements.d.ts.map +1 -0
  253. package/dist/tools/elements.js +13 -0
  254. package/dist/tools/elements.js.map +1 -0
  255. package/dist/tools/elicitation.d.ts +87 -0
  256. package/dist/tools/elicitation.d.ts.map +1 -0
  257. package/dist/tools/elicitation.js +100 -0
  258. package/dist/tools/elicitation.js.map +1 -0
  259. package/dist/tools/format/elements-format.d.ts +40 -0
  260. package/dist/tools/format/elements-format.d.ts.map +1 -0
  261. package/dist/tools/format/elements-format.js +194 -0
  262. package/dist/tools/format/elements-format.js.map +1 -0
  263. package/dist/tools/format/health-format.d.ts +79 -0
  264. package/dist/tools/format/health-format.d.ts.map +1 -0
  265. package/dist/tools/format/health-format.js +181 -0
  266. package/dist/tools/format/health-format.js.map +1 -0
  267. package/dist/tools/format/inspection-format.d.ts +58 -0
  268. package/dist/tools/format/inspection-format.d.ts.map +1 -0
  269. package/dist/tools/format/inspection-format.js +164 -0
  270. package/dist/tools/format/inspection-format.js.map +1 -0
  271. package/dist/tools/format/pages-format.d.ts +48 -0
  272. package/dist/tools/format/pages-format.d.ts.map +1 -0
  273. package/dist/tools/format/pages-format.js +137 -0
  274. package/dist/tools/format/pages-format.js.map +1 -0
  275. package/dist/tools/format/sources-format.d.ts +25 -0
  276. package/dist/tools/format/sources-format.d.ts.map +1 -0
  277. package/dist/tools/format/sources-format.js +208 -0
  278. package/dist/tools/format/sources-format.js.map +1 -0
  279. package/dist/tools/health.d.ts +22 -0
  280. package/dist/tools/health.d.ts.map +1 -0
  281. package/dist/tools/health.js +220 -0
  282. package/dist/tools/health.js.map +1 -0
  283. package/dist/tools/index.d.ts +30 -0
  284. package/dist/tools/index.d.ts.map +1 -0
  285. package/dist/tools/index.js +39 -0
  286. package/dist/tools/index.js.map +1 -0
  287. package/dist/tools/inspection.d.ts +14 -0
  288. package/dist/tools/inspection.d.ts.map +1 -0
  289. package/dist/tools/inspection.js +170 -0
  290. package/dist/tools/inspection.js.map +1 -0
  291. package/dist/tools/layout-flatten.d.ts +75 -0
  292. package/dist/tools/layout-flatten.d.ts.map +1 -0
  293. package/dist/tools/layout-flatten.js +107 -0
  294. package/dist/tools/layout-flatten.js.map +1 -0
  295. package/dist/tools/multi-items/builders.d.ts +23 -0
  296. package/dist/tools/multi-items/builders.d.ts.map +1 -0
  297. package/dist/tools/multi-items/builders.js +69 -0
  298. package/dist/tools/multi-items/builders.js.map +1 -0
  299. package/dist/tools/multi-items/clean-implode-handler.d.ts +28 -0
  300. package/dist/tools/multi-items/clean-implode-handler.d.ts.map +1 -0
  301. package/dist/tools/multi-items/clean-implode-handler.js +40 -0
  302. package/dist/tools/multi-items/clean-implode-handler.js.map +1 -0
  303. package/dist/tools/multi-items/index.d.ts +18 -0
  304. package/dist/tools/multi-items/index.d.ts.map +1 -0
  305. package/dist/tools/multi-items/index.js +18 -0
  306. package/dist/tools/multi-items/index.js.map +1 -0
  307. package/dist/tools/multi-items/inspect-handler.d.ts +41 -0
  308. package/dist/tools/multi-items/inspect-handler.d.ts.map +1 -0
  309. package/dist/tools/multi-items/inspect-handler.js +50 -0
  310. package/dist/tools/multi-items/inspect-handler.js.map +1 -0
  311. package/dist/tools/multi-items/item-container-map.d.ts +41 -0
  312. package/dist/tools/multi-items/item-container-map.d.ts.map +1 -0
  313. package/dist/tools/multi-items/item-container-map.js +73 -0
  314. package/dist/tools/multi-items/item-container-map.js.map +1 -0
  315. package/dist/tools/pages/builders.d.ts +14 -0
  316. package/dist/tools/pages/builders.d.ts.map +1 -0
  317. package/dist/tools/pages/builders.js +127 -0
  318. package/dist/tools/pages/builders.js.map +1 -0
  319. package/dist/tools/pages/handlers-read.d.ts +33 -0
  320. package/dist/tools/pages/handlers-read.d.ts.map +1 -0
  321. package/dist/tools/pages/handlers-read.js +171 -0
  322. package/dist/tools/pages/handlers-read.js.map +1 -0
  323. package/dist/tools/pages/handlers-write.d.ts +21 -0
  324. package/dist/tools/pages/handlers-write.d.ts.map +1 -0
  325. package/dist/tools/pages/handlers-write.js +52 -0
  326. package/dist/tools/pages/handlers-write.js.map +1 -0
  327. package/dist/tools/pages/index.d.ts +17 -0
  328. package/dist/tools/pages/index.d.ts.map +1 -0
  329. package/dist/tools/pages/index.js +17 -0
  330. package/dist/tools/pages/index.js.map +1 -0
  331. package/dist/tools/pages/schemas.d.ts +30 -0
  332. package/dist/tools/pages/schemas.d.ts.map +1 -0
  333. package/dist/tools/pages/schemas.js +48 -0
  334. package/dist/tools/pages/schemas.js.map +1 -0
  335. package/dist/tools/pages.d.ts +13 -0
  336. package/dist/tools/pages.d.ts.map +1 -0
  337. package/dist/tools/pages.js +13 -0
  338. package/dist/tools/pages.js.map +1 -0
  339. package/dist/tools/pool-resolve-helper.d.ts +83 -0
  340. package/dist/tools/pool-resolve-helper.d.ts.map +1 -0
  341. package/dist/tools/pool-resolve-helper.js +148 -0
  342. package/dist/tools/pool-resolve-helper.js.map +1 -0
  343. package/dist/tools/progress-phases.d.ts +46 -0
  344. package/dist/tools/progress-phases.d.ts.map +1 -0
  345. package/dist/tools/progress-phases.js +48 -0
  346. package/dist/tools/progress-phases.js.map +1 -0
  347. package/dist/tools/shared-schemas.d.ts +25 -0
  348. package/dist/tools/shared-schemas.d.ts.map +1 -0
  349. package/dist/tools/shared-schemas.js +48 -0
  350. package/dist/tools/shared-schemas.js.map +1 -0
  351. package/dist/tools/sources/builders.d.ts +13 -0
  352. package/dist/tools/sources/builders.d.ts.map +1 -0
  353. package/dist/tools/sources/builders.js +115 -0
  354. package/dist/tools/sources/builders.js.map +1 -0
  355. package/dist/tools/sources/handlers-bind.d.ts +28 -0
  356. package/dist/tools/sources/handlers-bind.d.ts.map +1 -0
  357. package/dist/tools/sources/handlers-bind.js +129 -0
  358. package/dist/tools/sources/handlers-bind.js.map +1 -0
  359. package/dist/tools/sources/handlers.d.ts +45 -0
  360. package/dist/tools/sources/handlers.d.ts.map +1 -0
  361. package/dist/tools/sources/handlers.js +91 -0
  362. package/dist/tools/sources/handlers.js.map +1 -0
  363. package/dist/tools/sources/index.d.ts +19 -0
  364. package/dist/tools/sources/index.d.ts.map +1 -0
  365. package/dist/tools/sources/index.js +18 -0
  366. package/dist/tools/sources/index.js.map +1 -0
  367. package/dist/tools/sources.d.ts +14 -0
  368. package/dist/tools/sources.d.ts.map +1 -0
  369. package/dist/tools/sources.js +14 -0
  370. package/dist/tools/sources.js.map +1 -0
  371. package/dist/tools/sparse-fields.d.ts +80 -0
  372. package/dist/tools/sparse-fields.d.ts.map +1 -0
  373. package/dist/tools/sparse-fields.js +144 -0
  374. package/dist/tools/sparse-fields.js.map +1 -0
  375. package/dist/tools/tool-builder/annotations.d.ts +55 -0
  376. package/dist/tools/tool-builder/annotations.d.ts.map +1 -0
  377. package/dist/tools/tool-builder/annotations.js +86 -0
  378. package/dist/tools/tool-builder/annotations.js.map +1 -0
  379. package/dist/tools/tool-builder/define.d.ts +31 -0
  380. package/dist/tools/tool-builder/define.d.ts.map +1 -0
  381. package/dist/tools/tool-builder/define.js +31 -0
  382. package/dist/tools/tool-builder/define.js.map +1 -0
  383. package/dist/tools/tool-builder/index.d.ts +28 -0
  384. package/dist/tools/tool-builder/index.d.ts.map +1 -0
  385. package/dist/tools/tool-builder/index.js +27 -0
  386. package/dist/tools/tool-builder/index.js.map +1 -0
  387. package/dist/tools/tool-builder/results.d.ts +93 -0
  388. package/dist/tools/tool-builder/results.d.ts.map +1 -0
  389. package/dist/tools/tool-builder/results.js +211 -0
  390. package/dist/tools/tool-builder/results.js.map +1 -0
  391. package/dist/tools/tool-builder/types.d.ts +82 -0
  392. package/dist/tools/tool-builder/types.d.ts.map +1 -0
  393. package/dist/tools/tool-builder/types.js +9 -0
  394. package/dist/tools/tool-builder/types.js.map +1 -0
  395. package/dist/tools/tool-builder.d.ts +16 -0
  396. package/dist/tools/tool-builder.d.ts.map +1 -0
  397. package/dist/tools/tool-builder.js +16 -0
  398. package/dist/tools/tool-builder.js.map +1 -0
  399. package/manifest.json +27 -10
  400. package/package.json +3 -1
  401. package/skills/yt-builder-mcp/SKILL.md +397 -138
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yt-builder-mcp
3
- description: Drive the YOOtheme Pro page builder programmatically — discover pages, inspect layouts, add/move/clone/delete elements, bind dynamic sources, diagnose 401/403 auth failures. Use when the user wants to build, modify, audit, or troubleshoot a YOOtheme-powered WordPress site through the YT Builder MCP server.
3
+ description: Drive the YOOtheme Pro Page Builder on WordPress or Joomla 5/6 — discover pages, inspect layouts, add/move/clone/delete elements, bind dynamic sources, diagnose 401/403 auth failures. Use when the user works with a YOOtheme Pro site via the YT Builder MCP server.
4
4
  ---
5
5
 
6
6
  # YT Builder MCP for YOOtheme Pro (unofficial) — Skill
@@ -8,34 +8,64 @@ description: Drive the YOOtheme Pro page builder programmatically — discover p
8
8
  > Independent third-party project. YOOtheme® is a registered trademark of YOOtheme GmbH
9
9
  > ([yootheme.com](https://yootheme.com)). YT Builder MCP is built by WootsUp (getimo
10
10
  > productions) and is not affiliated with, endorsed by, or sponsored by YOOtheme.
11
- > The integration uses YOOtheme Pro's public extension points.
11
+ > The integration uses YOOtheme Pro's public extension points and works on both
12
+ > WordPress and Joomla 5/6.
12
13
 
13
- This skill helps AI assistants drive the YOOtheme Pro page builder through the
14
- `@wootsup/yt-builder-mcp` server. The server exposes 24 typed,
15
- scoped, idempotent tools behind a 11-entry Gateway-Hub (so it stays
16
- inside the 80-tool Cursor cap even when the catalogue grows).
14
+ This skill helps AI assistants drive the YOOtheme Pro Page Builder through the
15
+ `@wootsup/yt-builder-mcp` server. The server exposes 26 typed, scoped, idempotent
16
+ tools. 20 of them advertised as first-class entries in `tools/list` (17 essential
17
+ L1 forwards + 2 direct L3 entries + 1 gateway), and 7 advanced tools reachable
18
+ through the single `yootheme_builder_advanced` gateway. This 3-lane split keeps
19
+ `tools/list` well below the ~40-tool Cursor cap while every catalogued tool stays
20
+ fully reachable.
17
21
 
18
22
  ## How to use this MCP server
19
23
 
20
- The user invokes you through Claude Desktop, Cursor, Zed, Continue, or
21
- any other MCP-aware AI client. Setup looks like this:
22
-
23
- 1. The user installs the WordPress plugin
24
- (`https://wootsup.com/products/yt-builder-mcp`) and generates
25
- a Bearer key in **wp-admin Tools "YT Builder MCP" → Bearer Keys**.
26
- 2. The user runs `npx -y @wootsup/yt-builder-mcp setup` once;
27
- the wizard probes the plugin, validates the key, and writes the
28
- MCP server entry into every selected AI client's config file.
24
+ The user invokes you through Claude Desktop, Cursor, Zed, Continue, Cline,
25
+ Roo Code, Claude Code, Codex CLI or any other MCP-aware AI client. Setup is
26
+ **cross-platform** — the same MCP server speaks to the same WordPress *or*
27
+ Joomla 5/6 host plugin:
28
+
29
+ 1. The user installs the host plugin for their CMS:
30
+ - **WordPress** install the `yt-builder-mcp` plugin (downloadable from the
31
+ [GitHub repository](https://github.com/wootsup/yt-builder-mcp)) and generate
32
+ a Bearer key in **wp-admin Tools "YT Builder MCP" → Bearer Keys**.
33
+ - **Joomla 5/6** — install the `yt-builder-mcp` package (downloadable from the
34
+ [GitHub repository](https://github.com/wootsup/yt-builder-mcp)) and generate
35
+ a Bearer key in **Components → YT Builder MCP → Bearer Keys**. The package
36
+ installs three sub-extensions (system plugin, webservices plugin, component).
37
+ 2. The user runs `npx -y @wootsup/yt-builder-mcp setup` once; the wizard probes
38
+ the host plugin, validates the key, and writes the MCP server entry into every
39
+ selected AI client's config file. (Wizard prompts include a platform hint —
40
+ `auto` works for most cases; set it to `joomla` explicitly when the site URL
41
+ has no `/joomla` segment.)
29
42
  3. The user restarts their AI client. The server is now visible.
30
43
  4. The user asks for a YOOtheme task (build, audit, change, diagnose).
31
44
 
45
+ ### Two picker entries — activate both
46
+
47
+ Some clients (notably Claude Desktop with the `.dxt` bundle) expose **two**
48
+ entries when the user types "YT Builder MCP" into the picker:
49
+
50
+ - **`YT Builder MCP for YOOtheme Pro (unofficial)`** — the MCP **server**.
51
+ Provides the 20 first-class tools (17 essential, 2 direct, 1 gateway).
52
+ The `yootheme_builder_advanced` gateway routes 7 additional tools.
53
+ - **`Von YT Builder MCP for YOOtheme Pro`** — the bundled **skill** (this
54
+ document). Gives the agent the workflow knowledge needed to drive those
55
+ tools correctly on first try.
56
+
57
+ **Activate both for the full experience.** The MCP server alone gives the agent
58
+ typed tools but no narrative guidance; the skill alone has no tools to call.
59
+
32
60
  When the user asks a YOOtheme-related question, **always start with
33
- `yootheme_builder_health`** — it confirms the plugin is reachable and
34
- returns the plugin/YOOtheme/WordPress/PHP versions you need to know
35
- about before reading or writing layout state.
61
+ `yootheme_builder_health`** — it confirms the host plugin is reachable and (when
62
+ the Bearer key is valid) returns the **plugin version, YOOtheme version, WordPress
63
+ or Joomla version, PHP version, and the site_url + home_url of the connected
64
+ site**. The site URL is how you know *which* site the agent is currently driving;
65
+ surface it back to the user when relevant ("Working on `https://example.com`...").
36
66
 
37
- If a tool returns `401 Unauthorized` or `403 Forbidden`, jump straight
38
- to **Workflow 4: Diagnose 401/auth failure**. Do not retry blindly.
67
+ If a tool returns `401 Unauthorized` or `403 Forbidden`, jump straight to
68
+ **Workflow 4: Diagnose 401/auth failure**. Do not retry blindly.
39
69
 
40
70
  ## Gateway routing (so you know what you can call)
41
71
 
@@ -44,20 +74,42 @@ The server exposes:
44
74
  - **2 direct top-level tools** — always callable, always in `tools/list`:
45
75
  `yootheme_builder_health` and `yootheme_builder_diagnose`. These are
46
76
  the "the gateway itself might be broken" escape hatch.
47
- - **8 essential forwarded tools** — common reads + the most-used writes
48
- (page list, get_etag, element list / add / update, sources_list,
49
- element_types_list, inspect_multi_items_binding). Always in
50
- `tools/list` so AI clients see them first-class.
51
- - **13 advanced captured tools** everything else (move, clone, delete,
52
- schema introspection, source binding, clean_implode_directives).
53
- Reachable through one gateway tool:
54
- `yootheme_builder_advanced({ tool: "<name>", input: { ... } })`.
77
+ - **17 essential forwarded tools** — common reads + the most-used writes
78
+ (pages_list, get_etag, element_list / add / update_settings / get / move /
79
+ clone / delete, page_get_layout, sources_list, element_types_list,
80
+ element_type_get_schema, template_summary, inspect_multi_items_binding,
81
+ sites_list, sites_test). Always advertised in `tools/list` so AI clients
82
+ see them first-class.
83
+ - **7 advanced captured tools** — everything else (page_save, page_publish,
84
+ page_get_schema, element_get_binding, element_bind_source,
85
+ element_unbind_source, clean_implode_directives). Reachable through one
86
+ gateway tool: `yootheme_builder_advanced({ tool: "<name>", input: { ... } })`.
55
87
  - **1 gateway tool** — `yootheme_builder_advanced`.
56
88
 
57
- If the AI client reports "tool not found", you are almost certainly
89
+ `tools/list` therefore advertises 20 names (17 + 2 + 1) for a total catalogue
90
+ of 26. If the AI client reports "tool not found", you are almost certainly
58
91
  calling an advanced tool by its raw name. Wrap it in
59
92
  `yootheme_builder_advanced({ tool, input })` instead.
60
93
 
94
+ ## Site and frontend URLs (for deep-linking and verification)
95
+
96
+ The server surfaces the connected site's URLs in two places so you never have to
97
+ guess where the agent is pointing:
98
+
99
+ - **`yootheme_builder_health` (Bearer-authenticated) and
100
+ `yootheme_builder_diagnose`** return `site_url` and `home_url` for the
101
+ connected install. Call one of them when the user asks "which site are you
102
+ on?" or before deep-linking the user back into wp-admin / Joomla administrator.
103
+ - **`yootheme_builder_pages_list`** returns per-template `frontend_url`,
104
+ `frontend_url_template`, and `frontend_url_description` columns when the
105
+ host plugin can resolve them. Use these when the user asks for a verification
106
+ URL ("show me the 404 page", "give me the front-end URL of the homepage
107
+ template"): find the matching row, return `frontend_url` (resolved) or
108
+ `frontend_url_template` (with placeholders the user fills in).
109
+
110
+ Treat `frontend_url: null` as "host plugin could not resolve a public URL for
111
+ this template" — surface that honestly rather than fabricating one.
112
+
61
113
  ## Scopes (Bearer key permissions)
62
114
 
63
115
  Every Bearer key has a scope, set at key creation time:
@@ -69,8 +121,167 @@ Every Bearer key has a scope, set at key creation time:
69
121
  | `admin` | ✓ | ✓ | ✓ |
70
122
 
71
123
  When a tool returns `{ error: 'insufficient_scope', context: { required: 'write', actual: 'read' } }`,
72
- ask the user to regenerate the key with a higher scope **before**
73
- retrying. Do not loop on auth errors.
124
+ ask the user to regenerate the key with a higher scope **before** retrying.
125
+ Do not loop on auth errors.
126
+
127
+ > **Joomla note.** On the Joomla API surface (`com_api`), the Bearer token's
128
+ > scope is the **sole** authority — the L2 article-write `core.edit` ACL gate
129
+ > was intentionally removed (see ADR at https://github.com/wootsup/yt-builder-mcp/blob/main/docs/adr/2026-05-24-l2-bearer-as-authority.md).
130
+ > Joomla ACL still governs the admin component (`com_ytbmcp`). On WordPress,
131
+ > capabilities like `manage_options` gate the admin settings page only; the
132
+ > REST API surface is Bearer-gated.
133
+
134
+ ---
135
+
136
+ ## Working with multiple sites
137
+
138
+ One MCP install can drive many YOOtheme Pro sites. You configure each site
139
+ once (URL + Bearer key + platform). The agent then targets a specific site
140
+ per tool-call via a `site_id` parameter, or falls back to the default site
141
+ when `site_id` is omitted.
142
+
143
+ ### When and why
144
+
145
+ The typical case is an agency or freelancer running 5, 20, or 100+ YOOtheme
146
+ sites (WordPress and Joomla mixed). Without multi-site support you would need
147
+ one MCP install per site, one set of env vars per site, and one AI-client
148
+ restart per site you want to talk to. With multi-site:
149
+
150
+ - One DXT install in Claude Desktop, one entry in your AI client config.
151
+ - One conversation can edit elements on `acme.com` and `beta.io` back-to-back.
152
+ - Each site keeps its own Bearer key, platform, label, and 1Password reference.
153
+ - Adding a new client site does not require a new MCP install.
154
+
155
+ ### How `site_id` works
156
+
157
+ Every tool accepts an optional `site_id` parameter.
158
+
159
+ - **Omit `site_id`**: the tool runs against the **default site**. This is the
160
+ common case for single-site users (the registry has one site and it is the
161
+ default) and for agency users who picked a "main" site for the session.
162
+ - **Pass `site_id: "wp-acme"`**: the tool runs against that specific site,
163
+ overriding the default for that one call.
164
+
165
+ When the agent does not know which sites are available, it calls
166
+ `yootheme_builder_sites_list` first. The response lists every configured site
167
+ with its `site_id`, URL, platform, default flag, and bearer source (so the
168
+ agent can choose by label and the user can verify by URL).
169
+
170
+ To verify a specific site before doing work on it, call
171
+ `yootheme_builder_sites_test({ site_id: "wp-acme" })`. This probes `/health`
172
+ and `/etag` in parallel and returns `plugin_reachable` + `bearer_valid`
173
+ without mutating anything.
174
+
175
+ ### Default-site mechanics
176
+
177
+ The default site is set automatically on first add:
178
+
179
+ - **First site you add**: becomes the default automatically. No flag needed.
180
+ - **Every subsequent site**: NOT default by default. Use `--default` on
181
+ `add-site` to make it the new default (the old default is demoted).
182
+ - **You remove the current default**: the next site in the registry order
183
+ is promoted to default. The registry is never left without a default
184
+ while ≥1 site exists.
185
+
186
+ ### Plain bearer vs 1Password reference
187
+
188
+ You can store the Bearer key two ways per site:
189
+
190
+ - **Plain field**: `bearer: "ytb_live_..."` in `sites.json`. Easy for dev or
191
+ onboarding, but the secret lives on disk in plaintext.
192
+ - **1Password reference**: `bearer_ref: "op://Vault/Item/credential"` in
193
+ `sites.json`. The plaintext token never touches disk. The MCP server shells
194
+ out to the `op` CLI at first use per site to fetch the live token, then
195
+ caches it in memory for that process lifetime.
196
+
197
+ **Recommendation for production sites**: use `bearer_ref`. You get rotation
198
+ without editing `sites.json`, and your 1Password audit log captures every
199
+ fetch. The `op` CLI must be installed and signed in on the machine running
200
+ the MCP server. If `op` is missing, the resolver returns a structured error
201
+ (`op CLI not found in PATH`) pointing at the install docs.
202
+
203
+ ### `sites.json` location
204
+
205
+ The registry lives at `~/.config/yt-builder-mcp/sites.json` (XDG-conform).
206
+ If `XDG_CONFIG_HOME` is set, the file lives at
207
+ `$XDG_CONFIG_HOME/yt-builder-mcp/sites.json` instead. The file is created
208
+ with mode `0600` so only the current user can read it.
209
+
210
+ The CLI subcommands below are the supported way to edit `sites.json`. Direct
211
+ edits work but skip the schema-validation and atomic-write paths.
212
+
213
+ ### CLI subcommands
214
+
215
+ Run these via `npx -y @wootsup/yt-builder-mcp <subcommand>`:
216
+
217
+ - **`setup`**: interactive wizard for the first site. Probes the host
218
+ plugin, validates the Bearer key, picks the platform, writes `sites.json`,
219
+ and writes the MCP server entry into every selected AI-client config.
220
+ - **`add-site [--url <url>] [--token <bearer> | --token-ref op://...] [--platform auto|wordpress|joomla] [--label "..."] [--default] [--site-id <slug>] [--yes]`**:
221
+ add a new site. Flags can be passed for non-interactive use; missing flags
222
+ trigger prompts. `--default` makes the new site the default (demoting the
223
+ old one). `--yes` skips the confirmation prompt.
224
+ - **`list-sites`**: print every configured site as a table (site_id, URL,
225
+ platform, default flag, bearer source).
226
+ - **`remove-site <site_id> [--yes]`**: delete a site from the registry. If
227
+ the removed site was the default, the next site in registry order is
228
+ auto-promoted. `--yes` skips the confirmation prompt.
229
+ - **`set-default <site_id>`**: switch the default site to `<site_id>`. The
230
+ previous default is demoted.
231
+ - **`test-site <site_id>`**: pre-flight probe (`/health` + `/etag`) for one
232
+ site. Returns `plugin_reachable` + `bearer_valid` and exits non-zero on
233
+ failure. Mutates nothing.
234
+
235
+ ### Restart your AI client after registry changes
236
+
237
+ After `add-site`, `remove-site`, `set-default`, or any direct edit to
238
+ `sites.json`, **restart Claude Desktop** (or your AI client). The MCP
239
+ protocol sends the `instructions` block (which carries the "Currently
240
+ configured sites" appendix) once at `initialize`. The agent will not see new
241
+ sites in its instructions until the next `initialize` cycle.
242
+
243
+ `sites_list` and the per-call `site_id` parameter both keep working
244
+ without a restart (they read the live registry on every call), but the
245
+ agent's narrative awareness of which sites exist lags by one restart.
246
+
247
+ The CLI prints a reminder line after every mutation so you do not forget.
248
+
249
+ ### Site-awareness in every response
250
+
251
+ Every tool reply carries the connected site in two places:
252
+
253
+ - **Text prefix**: every text response starts with `[<label> @ <host>]` so
254
+ the customer can see at a glance which site produced the answer
255
+ (`[ACME Production @ acme.com] 12 templates ...`).
256
+ - **Structured metadata**: `structuredContent._meta.site_id`,
257
+ `structuredContent._meta.site_url`, and `structuredContent._meta.platform`
258
+ carry the same info in a machine-readable shape. Agents can use this for
259
+ routing, logging, or follow-up calls.
260
+
261
+ If the AI-client UI hides `_meta`, the text prefix still tells the user
262
+ which site they are looking at.
263
+
264
+ ### End-to-end example: bulk element update across 5 agency sites
265
+
266
+ Goal: change a hero headline on the `home` template of 5 client sites in
267
+ one conversation.
268
+
269
+ 1. The agent calls `yootheme_builder_sites_list()`. It learns the 5
270
+ site_ids: `wp-acme`, `wp-beta`, `joomla-gamma`, `wp-delta`,
271
+ `joomla-epsilon`.
272
+ 2. For each site, the agent runs the same sequence with `site_id` set:
273
+ - `yootheme_builder_pages_list({ site_id: "wp-acme", fields: ["id", "label"] })`
274
+ - `yootheme_builder_get_etag({ site_id: "wp-acme" })`
275
+ - `yootheme_builder_element_update_settings({ site_id: "wp-acme", template_id: "home", element_path: "/0/children/0/children/0/children/0", props: { content: "New headline" }, merge: true, etag: "<etag>" })`
276
+ - `yootheme_builder_advanced({ tool: "yootheme_builder_page_save", input: { site_id: "wp-acme", template_id: "home", etag: "<fresh>" } })`
277
+ - `yootheme_builder_advanced({ tool: "yootheme_builder_page_publish", input: { site_id: "wp-acme", template_id: "home", etag: "<fresh>" } })`
278
+ 3. The customer sees a stream of replies, each prefixed with the matching
279
+ `[label @ host]`, so it is obvious which site is at which step.
280
+
281
+ If one site fails (auth error, plugin not active, network blip), the agent
282
+ isolates the failure to that one `site_id` and continues with the rest.
283
+ Run `yootheme_builder_sites_test({ site_id: "<id>" })` on the failing site
284
+ for a focused diagnosis without touching the others.
74
285
 
75
286
  ---
76
287
 
@@ -81,8 +292,9 @@ to an existing page.
81
292
 
82
293
  **Canonical tool-call sequence (real parameter names — snake_case):**
83
294
 
84
- 1. `yootheme_builder_health` — confirm plugin reachable; note plugin
85
- version (some element types are version-gated).
295
+ 1. `yootheme_builder_health` — confirm host plugin reachable; note plugin
296
+ version and `site_url` (some element types are version-gated; surface
297
+ the site URL back to the user).
86
298
  2. `yootheme_builder_pages_list({ fields: ["id", "label"] })` — find
87
299
  the target template. Returns `[{ id, label, ... }]`. If the user
88
300
  named a specific page, match on `label` (exact then fuzzy).
@@ -100,10 +312,11 @@ to an existing page.
100
312
  — add a text element.
101
313
  8. `yootheme_builder_element_add({ template_id, parent_path: "<row-path>", element_type: "button", props: { content: "<cta>", link: "<url>" }, etag })`
102
314
  — add the CTA button.
103
- 9. `yootheme_builder_page_save({ template_id, etag })` — persist the
104
- working copy (visible in YOOtheme Customizer preview).
105
- 10. `yootheme_builder_page_publish({ template_id, etag })` make the
106
- changes live on the front-end.
315
+ 9. `yootheme_builder_advanced({ tool: "yootheme_builder_page_save", input: { template_id, etag } })`
316
+ — persist the working copy (visible in YOOtheme Customizer preview).
317
+ `page_save` is an advanced tool; call it through the gateway.
318
+ 10. `yootheme_builder_advanced({ tool: "yootheme_builder_page_publish", input: { template_id, etag } })`
319
+ — make the changes live on the front-end. Also an advanced tool.
107
320
 
108
321
  **Common pitfalls:**
109
322
 
@@ -124,6 +337,9 @@ to an existing page.
124
337
  - **Reusing a stale etag across many writes.** Every write returns a
125
338
  fresh etag in the response. Pass THAT etag into the next write —
126
339
  don't hold the one from the original `get_etag` call.
340
+ - **Calling page_save / page_publish by name.** Both are advanced
341
+ (L2) tools — call them through `yootheme_builder_advanced({ tool, input })`,
342
+ not directly. The first sign you forgot is "tool not found".
127
343
 
128
344
  **Worked example (tool-call snippet):**
129
345
 
@@ -138,6 +354,12 @@ yootheme_builder_element_add({
138
354
  })
139
355
  // Response: { path: "/0/children/3", etag: "def456" }
140
356
  // → next call uses etag "def456"
357
+
358
+ // Step 9 — page_save is L2; call via the gateway.
359
+ yootheme_builder_advanced({
360
+ tool: "yootheme_builder_page_save",
361
+ input: { template_id: "home", etag: "<latest>" }
362
+ })
141
363
  ```
142
364
 
143
365
  **Edge case:** YOOtheme allows nested sections (rare) — if the user
@@ -161,7 +383,7 @@ renders dynamic items.
161
383
 
162
384
  **Canonical tool-call sequence (real parameter names — snake_case):**
163
385
 
164
- 1. `yootheme_builder_health` — confirm plugin reachable.
386
+ 1. `yootheme_builder_health` — confirm host plugin reachable.
165
387
  2. `yootheme_builder_pages_list({ fields: ["id", "label"] })` and
166
388
  `yootheme_builder_page_get_layout({ template_id: "<id>", flat: false })`
167
389
  — locate the target Grid. Note its JSON-Pointer `path` (e.g.
@@ -172,20 +394,21 @@ renders dynamic items.
172
394
  4. `yootheme_builder_sources_list()` — enumerate available Sources.
173
395
  Each returns `{ name, label, origin, kind }`. Pick the one the
174
396
  user asked for.
175
- 5. `yootheme_builder_element_get_binding({ template_id, element_path })`
397
+ 5. `yootheme_builder_advanced({ tool: "yootheme_builder_element_get_binding", input: { template_id, element_path } })`
176
398
  — check whether the Grid is already bound (idempotency: skip step
177
399
  7 if `source_name` already matches the user's intent).
400
+ `element_get_binding` is an advanced (L2) tool — call via the gateway.
178
401
  6. `yootheme_builder_get_etag()` — fetch the optimistic-lock etag for
179
402
  the upcoming mutation.
180
- 7. `yootheme_builder_element_bind_source({ template_id, element_path, source_name: "<name>", etag: "<etag>" })`
403
+ 7. `yootheme_builder_advanced({ tool: "yootheme_builder_element_bind_source", input: { template_id, element_path, source_name: "<name>", etag: "<etag>" } })`
181
404
  — apply the binding. Returns `{ path, etag, has_binding: true }`.
182
405
  Pass `source_id: "<origin>:<name>"` as well **only** when two
183
406
  plugins register a source with the same `source_name` (the server
184
407
  surfaces the ambiguity as an elicitation prompt; if the host
185
408
  doesn't support elicitation you'll see a structured error listing
186
- the candidates).
187
- 8. `yootheme_builder_page_save({ template_id, etag: "<fresh>" })`
188
- then `yootheme_builder_page_publish({ template_id, etag: "<fresh>" })`.
409
+ the candidates). Also an advanced tool.
410
+ 8. `yootheme_builder_advanced({ tool: "yootheme_builder_page_save", input: { template_id, etag: "<fresh>" } })`
411
+ then `yootheme_builder_advanced({ tool: "yootheme_builder_page_publish", input: { template_id, etag: "<fresh>" } })`.
189
412
 
190
413
  **Common pitfalls:**
191
414
 
@@ -207,23 +430,29 @@ renders dynamic items.
207
430
  - **Forgetting `etag`.** Every write requires the optimistic-lock
208
431
  etag. On `412 Precondition Failed` re-fetch via
209
432
  `yootheme_builder_get_etag` and retry.
433
+ - **Calling bind/unbind directly.** Both `element_bind_source` and
434
+ `element_get_binding` are L2 advanced — wrap in
435
+ `yootheme_builder_advanced({ tool, input })`.
210
436
 
211
437
  **Worked example (tool-call snippet):**
212
438
 
213
439
  ```jsonc
214
- // Step 7 — bind a Posts source onto a Grid element.
215
- yootheme_builder_element_bind_source({
216
- template_id: "home",
217
- element_path: "/0/children/2/children/0",
218
- source_name: "wp_posts",
219
- etag: "abc123"
220
- // source_id: "wordpress:wp_posts" // pass ONLY when name collides
440
+ // Step 7 — bind a Posts source onto a Grid element via the gateway.
441
+ yootheme_builder_advanced({
442
+ tool: "yootheme_builder_element_bind_source",
443
+ input: {
444
+ template_id: "home",
445
+ element_path: "/0/children/2/children/0",
446
+ source_name: "wp_posts",
447
+ etag: "abc123"
448
+ // source_id: "wordpress:wp_posts" // pass ONLY when name collides
449
+ }
221
450
  })
222
451
  // Response: { path: "/0/children/2/children/0", etag: "def456", has_binding: true }
223
- // Verify:
224
- yootheme_builder_element_get_binding({
225
- template_id: "home",
226
- element_path: "/0/children/2/children/0"
452
+ // Verify (via gateway):
453
+ yootheme_builder_advanced({
454
+ tool: "yootheme_builder_element_get_binding",
455
+ input: { template_id: "home", element_path: "/0/children/2/children/0" }
227
456
  })
228
457
  // → { source_name: "wp_posts", source_config: { ... }, ... }
229
458
  ```
@@ -232,12 +461,12 @@ yootheme_builder_element_get_binding({
232
461
  search filter). The bind call still succeeds; the front-end Grid just
233
462
  shows the YOOtheme "no items" placeholder. Don't treat empty render
234
463
  as a binding failure — verify by re-reading
235
- `yootheme_builder_element_get_binding`.
464
+ `yootheme_builder_element_get_binding` through the gateway.
236
465
 
237
466
  **Success criterion:** After publish, the Grid on the front-end shows
238
467
  items from the Source (verify by item count and at least one
239
468
  field-value spot-check). `yootheme_builder_element_get_binding`
240
- returns the new `source_name`.
469
+ (via gateway) returns the new `source_name`.
241
470
 
242
471
  ---
243
472
 
@@ -256,16 +485,17 @@ right after the source. To move the clone elsewhere in the SAME
256
485
  template, call `yootheme_builder_element_move` afterwards. To
257
486
  duplicate into a DIFFERENT template, flag to the user that
258
487
  cross-template clone is not currently supported and suggest a
259
- WordPress-level template duplication.
488
+ CMS-level template duplication (in wp-admin or Joomla administrator).
260
489
 
261
490
  **Canonical tool-call sequence (real parameter names — snake_case):**
262
491
 
263
- 1. `yootheme_builder_health` — confirm plugin reachable.
492
+ 1. `yootheme_builder_health` — confirm host plugin reachable.
264
493
  2. `yootheme_builder_pages_list({ fields: ["id", "label"] })` —
265
494
  locate the template by `label`. Note its `id`.
266
- 3. `yootheme_builder_page_get_schema({ template_id })` — flat schema
267
- view (lighter than `page_get_layout`) showing every element path
268
- + type. Pick the JSON-Pointer path of the section to clone.
495
+ 3. `yootheme_builder_advanced({ tool: "yootheme_builder_page_get_schema", input: { template_id } })`
496
+ — flat schema view (lighter than `page_get_layout`) showing every
497
+ element path + type. Pick the JSON-Pointer path of the section
498
+ to clone. `page_get_schema` is L2; call via the gateway.
269
499
  4. `yootheme_builder_get_etag()` — fetch the optimistic-lock etag.
270
500
  5. `yootheme_builder_element_clone({ template_id, element_path: "<src-path>", etag: "<etag>" })`
271
501
  — clone as sibling. Returns `{ path: "<new-path>", etag: "<fresh>" }`.
@@ -274,30 +504,31 @@ WordPress-level template duplication.
274
504
  — re-parent the clone within the same template if needed.
275
505
  7. `yootheme_builder_element_update_settings({ template_id, element_path: "<final-path>", props: { ... }, etag: "<fresh>" })`
276
506
  — replace the `props` on the clone. **Existing props NOT in the
277
- request are removed** (update_settings is a full replace, not a
278
- merge). Read the current props first via
279
- `yootheme_builder_element_get` if you only want to tweak a subset.
280
- 8. `yootheme_builder_page_save({ template_id, etag })` then
281
- `yootheme_builder_page_publish({ template_id, etag })`.
507
+ request are removed** (update_settings is a full replace by default;
508
+ pass `merge: true` to apply a server-side deep-merge instead).
509
+ Read the current props first via `yootheme_builder_element_get`
510
+ if you only want to tweak a subset.
511
+ 8. `yootheme_builder_advanced({ tool: "yootheme_builder_page_save", input: { template_id, etag } })`
512
+ then `yootheme_builder_advanced({ tool: "yootheme_builder_page_publish", input: { template_id, etag } })`.
282
513
 
283
514
  **Common pitfalls:**
284
515
 
285
516
  - **Inventing destination parameters.** `element_clone` does NOT
286
517
  accept `destPageId`, `destParentPath`, or any cross-template
287
518
  argument. It's sibling-only within ONE template.
288
- - **Treating `element_update_settings` as a merge.** The handler
289
- REPLACES the entire `props` object on the element; any key you
290
- don't include is removed. Use `element_get` first if you need to
291
- preserve siblings of the field you're changing.
519
+ - **Treating `element_update_settings` as a merge by default.** The handler
520
+ REPLACES the entire `props` object on the element unless you pass
521
+ `merge: true`. Read the existing shape via `yootheme_builder_element_get`
522
+ first if you only want to tweak a subset and prefer not to use merge.
292
523
  - **Clone-then-update path drift.** The clone returns a path that's
293
524
  correct at the moment of the call. If you fire off many ops in
294
525
  parallel, a concurrent edit may shift indices — refresh via
295
- `get_etag` + `page_get_schema` between independent batches.
526
+ `get_etag` + `page_get_schema` (via gateway) between independent batches.
296
527
  - **Cloning a bound element keeps the binding.** `element_clone`
297
528
  copies the entire element including `props.source`. If the user
298
529
  wanted a "data-free" copy, call
299
- `yootheme_builder_element_unbind_source` on the new path
300
- afterwards.
530
+ `yootheme_builder_advanced({ tool: "yootheme_builder_element_unbind_source", input: { ... } })`
531
+ on the new path afterwards.
301
532
  - **Wrong parameter names.** Use `template_id`, `element_path`,
302
533
  `etag` (NOT `pageId`, `srcPath`, `ifMatch`).
303
534
 
@@ -312,8 +543,7 @@ yootheme_builder_element_clone({
312
543
  })
313
544
  // Response: { path: "/0/children/3", etag: "def456" }
314
545
 
315
- // Step 7 — tweak the clone (replace props entirely).
316
- // First read the current shape so you can preserve siblings:
546
+ // Step 7 — tweak the clone (replace props entirely, or pass merge: true).
317
547
  const current = yootheme_builder_element_get({
318
548
  template_id: "home",
319
549
  element_path: "/0/children/3",
@@ -328,12 +558,13 @@ yootheme_builder_element_update_settings({
328
558
 
329
559
  **Edge case:** When cloning a Grid with a source binding, the binding
330
560
  is preserved (same `source_name`). If the user wants a "data-free"
331
- copy, follow up with `yootheme_builder_element_unbind_source` on the
332
- new path. Verify with `yootheme_builder_element_get_binding`.
561
+ copy, follow up with
562
+ `yootheme_builder_advanced({ tool: "yootheme_builder_element_unbind_source", input: { ... } })`
563
+ on the new path. Verify with the gateway `element_get_binding` call.
333
564
 
334
565
  **Success criterion:** After publish,
335
- `yootheme_builder_page_get_schema({ template_id })` shows the new
336
- section at the cloned path with the user's tweaks reflected in
566
+ `yootheme_builder_advanced({ tool: "yootheme_builder_page_get_schema", input: { template_id } })`
567
+ shows the new section at the cloned path with the user's tweaks reflected in
337
568
  `element_get` on that path.
338
569
 
339
570
  ---
@@ -348,32 +579,39 @@ guessing — and without rotating the user's key unnecessarily.
348
579
  1. `yootheme_builder_diagnose` — single probe that hits `/health` (no
349
580
  auth) and then `/etag` (Bearer auth). Returns
350
581
  `{ plugin_reachable, plugin_version, yootheme_loaded, yootheme_version,
351
- endpoint_count, bearer_valid, bearer_error?, summary? }`. Call this
352
- **before** any other tool when you see auth errors. (Takes no
353
- arguments — the schema is `{}`.)
582
+ endpoint_count, bearer_valid, bearer_error?, site_url?, home_url?,
583
+ summary? }`. Call this **before** any other tool when you see
584
+ auth errors. (Takes no arguments — the schema is `{}`.)
354
585
  2. **Interpret the result:**
355
- - `plugin_reachable: false` → the WordPress install is down OR the
356
- plugin is deactivated. Send the user to wp-admin → Plugins →
357
- activate "YT Builder MCP". Do not retry until they confirm.
586
+ - `plugin_reachable: false` → the WordPress / Joomla install is down
587
+ OR the host plugin is deactivated. Send the user to **wp-admin →
588
+ Plugins → activate "YT Builder MCP"** (WordPress) or **Joomla
589
+ administrator → Extensions → Plugins → enable "System - YT Builder
590
+ MCP" and the matching webservices + component entries** (Joomla).
591
+ Do not retry until they confirm.
358
592
  - `plugin_reachable: true, bearer_valid: false` → the Bearer key is
359
593
  wrong (typo, revoked, or wrong key for this install). The
360
594
  `bearer_error` field carries the upstream HTTP status. Send the
361
- user to wp-admin → Tools → "YT Builder MCP" → Bearer Keys → either
362
- copy the existing key into their MCP client config, or generate
363
- a new one. Then they must restart the AI client.
595
+ user to:
596
+ - **WordPress:** wp-admin Tools "YT Builder MCP" Bearer Keys
597
+ copy the existing key into their MCP client config, or
598
+ generate a new one.
599
+ - **Joomla:** Components → YT Builder MCP → Bearer Keys → same.
364
600
  - `plugin_reachable: true, bearer_valid: true` but the original
365
601
  tool returned a 403 → the key works but the scope is too low for
366
602
  the tool's required scope (`write` for mutations, `admin` for
367
603
  destructive operations). Ask the user to regenerate the key with
368
604
  a higher scope and restart the AI client.
369
605
  3. **Walk the user through key rotation if needed:**
370
- - "Go to wp-admin → Tools → YT Builder MCP → Bearer Keys."
606
+ - WordPress: "wp-admin → Tools → YT Builder MCP → Bearer Keys."
607
+ Joomla: "Components → YT Builder MCP → Bearer Keys."
371
608
  - "Click 'Generate New Key', pick the scope (admin for full access)."
372
609
  - "Copy the key — it's shown ONCE; you cannot recover it later."
373
610
  - "Update your AI client config: replace `YTB_MCP_BEARER_TOKEN`
374
611
  with the new key. The fastest way is to re-run
375
612
  `npx -y @wootsup/yt-builder-mcp setup`."
376
- - "Restart Claude / Cursor / Zed / Continue / Cline / Roo Code."
613
+ - "Restart Claude / Cursor / Zed / Continue / Cline / Roo Code /
614
+ Claude Code / Codex CLI."
377
615
  - "Confirm with `yootheme_builder_diagnose` that
378
616
  `bearer_valid: true` before retrying the original task."
379
617
 
@@ -403,22 +641,25 @@ yootheme_builder_diagnose({})
403
641
  // Response shape:
404
642
  // {
405
643
  // plugin_reachable: true,
406
- // plugin_version: "0.1.0-alpha.1",
644
+ // plugin_version: "1.1.0",
407
645
  // yootheme_loaded: true,
408
646
  // yootheme_version: "5.0.22",
409
647
  // endpoint_count: 16,
410
648
  // bearer_valid: false, // ← key is bad
411
- // bearer_error: "HTTP 401: invalid_token"
649
+ // bearer_error: "HTTP 401: invalid_token",
650
+ // site_url: "https://example.com",
651
+ // home_url: "https://example.com"
412
652
  // }
413
- // → diagnosis: rotate the key. Send user to wp-adminSettings.
653
+ // → diagnosis: rotate the key. Send user to Tools/ComponentsYT Builder MCP.
414
654
  ```
415
655
 
416
656
  **Edge case:** `plugin_reachable: true` but `yootheme_loaded: false`
417
- — the user installed the MCP plugin but YOOtheme itself isn't
418
- active. The MCP server still answers, but every tool that touches
419
- the YOOtheme layout returns an empty/error response. Surface the
420
- mismatch ("YOOtheme is not active on this install") instead of
421
- retrying.
657
+ — the user installed the MCP host plugin but YOOtheme Pro itself
658
+ isn't active. The MCP server still answers, but every tool that
659
+ touches the YOOtheme layout returns an empty/error response. Surface
660
+ the mismatch ("YOOtheme Pro is not active on this install") instead
661
+ of retrying. On Joomla this can also surface as a "YOOtheme Pro
662
+ required" admin notice in the component dashboard.
422
663
 
423
664
  **Success criterion:** A subsequent `yootheme_builder_diagnose`
424
665
  returns `plugin_reachable: true` AND `bearer_valid: true`. The
@@ -454,10 +695,11 @@ an instance with a sensible default props payload.
454
695
  returns a structured `validation` error with a per-field issue
455
696
  list if anything is missing or malformed.
456
697
  7. (Optional) `yootheme_builder_element_update_settings({ template_id, element_path: "<new-path>", props: { ... }, etag })`
457
- — iterate on the props. **Note: this REPLACES `props` entirely**
458
- include every key you want to keep.
459
- 8. `yootheme_builder_page_save({ template_id, etag })` then
460
- `yootheme_builder_page_publish({ template_id, etag })`.
698
+ — iterate on the props. **Note: this REPLACES `props` entirely by
699
+ default; pass `merge: true` for a server-side deep-merge.** When
700
+ replacing, include every key you want to keep.
701
+ 8. `yootheme_builder_advanced({ tool: "yootheme_builder_page_save", input: { template_id, etag } })`
702
+ then `yootheme_builder_advanced({ tool: "yootheme_builder_page_publish", input: { template_id, etag } })`.
461
703
 
462
704
  **Common pitfalls:**
463
705
 
@@ -468,10 +710,11 @@ an instance with a sensible default props payload.
468
710
  (not `pageId`), `parent_path` (not `parentPath`), `element_type`
469
711
  (not `type` / `name`), `props` (not `settings`), `etag` (not
470
712
  `ifMatch`).
471
- - **`element_update_settings` is a full replace, not a merge.** Any
472
- key NOT in the request is REMOVED from `props`. Read the existing
473
- shape via `yootheme_builder_element_get` first if you only want
474
- to tweak a subset.
713
+ - **`element_update_settings` is a full replace by default.** Any
714
+ key NOT in the request is REMOVED from `props` unless you set
715
+ `merge: true`. Read the existing shape via
716
+ `yootheme_builder_element_get` first if you only want to tweak a
717
+ subset.
475
718
  - **Custom elements without a schema.** A poorly-built third-party
476
719
  element may not register a prop schema. In that case
477
720
  `yootheme_builder_element_type_get_schema` returns an empty/sparse
@@ -535,53 +778,69 @@ and the props payload you passed.
535
778
  destroying state when `confirm` is omitted. On hosts without
536
779
  elicitation, it returns a preview-with-confirm-required response;
537
780
  call again with `confirm: true`.
538
- - **Unbind a source**: use `yootheme_builder_element_unbind_source({
539
- template_id, element_path, etag, confirm: true })`. Same
540
- elicitation flow as delete.
781
+ - **Unbind a source**: call through the gateway:
782
+ `yootheme_builder_advanced({ tool: "yootheme_builder_element_unbind_source", input: { template_id, element_path, etag, confirm: true } })`.
783
+ Same elicitation flow as delete.
541
784
  - **Flat schema inspection** (e.g. enumerate every element path +
542
- type without fetching the whole nested tree): use
543
- `yootheme_builder_page_get_schema({ template_id })`.
785
+ type without fetching the whole nested tree): call through the
786
+ gateway: `yootheme_builder_advanced({ tool: "yootheme_builder_page_get_schema", input: { template_id } })`.
544
787
  - **Etag-only fetch** (e.g. polling for concurrent edits): use
545
788
  `yootheme_builder_get_etag()` (takes no arguments) — cheaper than
546
789
  fetching the full layout.
790
+ - **Find a public/front-end URL for a template** (404 test page,
791
+ homepage URL, etc.): call
792
+ `yootheme_builder_pages_list({ fields: ["id", "label", "frontend_url", "frontend_url_template", "frontend_url_description"] })`,
793
+ match by label, and read `frontend_url` (resolved) or
794
+ `frontend_url_template` (with placeholders the user fills in).
795
+ - **Find out which site / install you are connected to**: call
796
+ `yootheme_builder_health` (Bearer-authenticated payload includes
797
+ `site_url` + `home_url`) or `yootheme_builder_diagnose`.
798
+ - **Strip legacy `implode` directives** from an element binding (audit-clean
799
+ source props that pre-date the wrapper-source refactor): call through the
800
+ gateway:
801
+ `yootheme_builder_advanced({ tool: "yootheme_builder_clean_implode_directives", input: { template_id, element_path, etag } })`.
802
+ Returns the audit log + a fresh ETag; idempotent (`cleaned_count: 0` when
803
+ there is nothing to remove).
547
804
 
548
805
  If the user asks for something none of the above covers (e.g. global
549
806
  theme settings, menu management, media library), tell them clearly:
550
807
  "This MCP server only covers the YOOtheme Page Builder surface. For
551
- <X> you'll need <YOOtheme MCP / WP REST / direct wp-admin>." Don't
552
- fabricate tool calls.
808
+ <X> you'll need the relevant CMS REST API or direct wp-admin /
809
+ Joomla administrator access." Don't fabricate tool calls.
553
810
 
554
811
  ## Appendix: Tool Catalog (auto-generated)
555
812
 
556
813
  <!-- TOOL-CATALOG:BEGIN -->
557
814
 
558
- **24 tools** — generated by `scripts/extract-tools.mjs` from the compiled `buildAllTools()` registry. Do not hand-edit this section; re-run `npm run build && node scripts/extract-tools.mjs` after changing tool definitions.
815
+ **26 tools** — generated by `scripts/extract-tools.mjs` from the compiled `buildAllTools()` registry. Do not hand-edit this section; re-run `npm run build && node scripts/extract-tools.mjs` after changing tool definitions.
559
816
 
560
817
  | Tool | Kind | Input keys | Description |
561
818
  | --- | --- | --- | --- |
562
- | `yootheme_builder_clean_implode_directives` | idempotent | `element_path`, `etag`, `template_id` | Strips `props.source.props.*.implode` directives from an element binding. Returns audit log + new ETag. Idempotent (cleaned_count: 0 when nothing to remove). Requires ETag. |
563
- | `yootheme_builder_diagnose` | read+idempotent | _(none)_ | Run a full diagnostic: hit /health (no auth), then attempt an authenticated call (/etag) to confirm the Bearer key is valid. Use when health passes but tools return 401/403. |
564
- | `yootheme_builder_element_add` | mutating | `children`, `element_type`, `etag`, `parent_path`, `props`, `template_id` | Add a new element to a template. Provide `parent_path` (or "" for root), `element_type` (e.g. "headline", "text", "grid"), and optional `props` / `children`. Returns the new element's JSON-Pointer path. Requires ETag. |
565
- | `yootheme_builder_element_bind_source` | idempotent | `bindingLevel`, `element_path`, `etag`, `field_mappings`, `source_id`, `source_name`, `template_id` | Binds a Builder source to an element (sets `props.source`). Use bindingLevel "item" on Multi-Items containers (grid/slideshow/switcher/…) to bind on the first *_item child instead of the container itself. Requires ETag. |
566
- | `yootheme_builder_element_clone` | mutating | `element_path`, `etag`, `template_id` | Clone an element as a sibling (same parent, immediately after the source). Returns the new element's path. Requires ETag. |
567
- | `yootheme_builder_element_delete` | destructive | `confirm`, `element_path`, `etag`, `template_id` | PERMANENTLY delete an element and all its children. Cannot be undone. Always ask the user to confirm first, then call again with `confirm: true`. Requires ETag. |
568
- | `yootheme_builder_element_get` | read+idempotent | `element_path`, `template_id` | Get the full element object at a specific JSON-Pointer path, including props and children. Use yootheme_builder_element_list to discover paths. |
569
- | `yootheme_builder_element_get_binding` | read+idempotent | `element_path`, `template_id` | Read the source binding (and source_config/source_args/etc.) attached to an element. Returns the empty object if the element is not bound. |
570
- | `yootheme_builder_element_list` | read+idempotent | `fields`, `template_id` | List all elements in a template as a flat array with JSON-Pointer paths + element types. Best starting-point for "find the element I want to edit". Pass `fields:["path","element_type"]` to narrow each row. |
571
- | `yootheme_builder_element_move` | idempotent | `element_path`, `etag`, `template_id`, `to_index`, `to_parent_path` | Move an element to a new parent + index in the tree. Useful for reordering or reparenting (e.g. moving a card from one grid column to another). Requires ETag. |
572
- | `yootheme_builder_element_type_get_schema` | read+idempotent | `type_name` | Get the prop/field schema for a single element type. Use the result to discover valid keys for `props` when calling yootheme_builder_element_add or _update_settings. |
573
- | `yootheme_builder_element_types_list` | read+idempotent | `fields` | List element types registered on this site (built-ins + YOOessentials/uEssentials extras). Names feed `element_type` of element_add. Pass `fields[]` to narrow each row. |
574
- | `yootheme_builder_element_unbind_source` | destructive | `confirm`, `element_path`, `etag`, `template_id` | Remove the source binding from an element. Clears `props.source`. Destructive in the sense that it may break dynamic-content rendering — always ask the user to confirm. Requires ETag. |
575
- | `yootheme_builder_element_update_settings` | idempotent | `element_path`, `etag`, `merge`, `props`, `template_id` | Update `props` on an element. Default replaces all props; pass `merge:true` for server-side deep-merge (only request keys overwritten, others survive — avoids read-modify-write races). Requires ETag. |
576
- | `yootheme_builder_get_etag` | read+idempotent | _(none)_ | Get the current top-level state ETag. Pass this back via the `etag` parameter on any write tool to prevent overwriting concurrent edits. |
577
- | `yootheme_builder_health` | read+idempotent | _(none)_ | Check that the YT Builder MCP plugin is installed and reachable. Returns plugin version, YOOtheme Pro version (if loaded), and the list of available REST endpoints. Unauthenticated probe call this first when troubleshooting connectivity. |
578
- | `yootheme_builder_inspect_multi_items_binding` | read+idempotent | `element_path`, `template_id` | Reports Multi-Items binding state: container/item pair (grid↔grid_item, slideshow↔slideshow_item, …), current binding level (none\|container\|item), and a recommended_fix when the binding sits on the container instead of the child. |
579
- | `yootheme_builder_page_get_layout` | read+idempotent | `fields`, `flat`, `template_id` | Get full layout tree for one template. Default nested `{layout, etag}`. Set `flat:true` for depth-first array `{elements:[...], etag}`; combine with `fields[]` to project per-element. |
580
- | `yootheme_builder_page_get_schema` | read+idempotent | `template_id` | Get the flat schema for a template — a list of nodes with their JSON-Pointer paths and element types. Best entry-point for navigation: lighter than page_get_layout, sufficient to locate elements before editing. |
581
- | `yootheme_builder_page_publish` | idempotent | `etag`, `template_id` | Publish a template — persist state, flush YT + WP caches, snapshot the published-state ETag. ETag optional — when provided, 412 on conflict; when omitted, last-write-wins. Recommended for collaborative edits. |
582
- | `yootheme_builder_page_save` | idempotent | `etag`, `template_id` | Re-run save-transforms and persist. ETag optional — when provided, 412 on conflict; when omitted, last-write-wins. Recommended for collaborative edits. No-op when state is byte-identical (returns `no_changes:true`, ETag unchanged). |
583
- | `yootheme_builder_pages_list` | read+idempotent | `fields` | List all YOOtheme templates ("pages") on the site. Returns id, label and usage metadata for each. Use this first to discover template IDs. Pass `fields:["id","label"]` to project per-item to a smaller shape. |
584
- | `yootheme_builder_sources_list` | read+idempotent | `fields` | List Builder sources grouped by origin (apimapper/wordpress/essentials). Returns name+label per source pick one for `element_bind_source`. Pass `fields[]` to narrow each row. |
585
- | `yootheme_builder_template_summary` | read+idempotent | `template_id` | Token-efficient template overview: element counts by type, binding count, max nesting depth, and named landmark sections computed server-side in one call. Use this to grasp a large template before pulling element_list or page_get_layout. |
819
+ | `yootheme_builder_clean_implode_directives` | idempotent | `element_path`, `etag`, `site_id`, `template_id` | Strips `props.source.props.*.implode` directives from an element binding. Returns audit log + new ETag. Idempotent (cleaned_count: 0 when nothing to remove). Requires ETag. Operates on the default site unless site_id is provided. |
820
+ | `yootheme_builder_diagnose` | read+idempotent | `site_id` | Full diagnostic: /health + authenticated /etag probe. Returns site_url, home_url, plugin reachability, Bearer validity in one call. First call when you need to know where the site lives. For per-template URLs see pages_list. Operates on the default site unless site_id is provided. |
821
+ | `yootheme_builder_element_add` | mutating | `children`, `element_type`, `etag`, `parent_path`, `props`, `site_id`, `template_id` | Add a new element to a template. Provide `parent_path` (or "" for root), `element_type` (e.g. "headline", "text", "grid"), and optional `props` / `children`. Returns the new element's JSON-Pointer path. Requires ETag. Operates on the default site unless site_id is provided. |
822
+ | `yootheme_builder_element_bind_source` | idempotent | `bindingLevel`, `element_path`, `etag`, `field_mappings`, `site_id`, `source_id`, `source_name`, `template_id` | Binds a Builder source to an element (sets `props.source`). Use bindingLevel "item" on Multi-Items containers (grid/slideshow/switcher/…) to bind on the first *_item child instead of the container itself. Requires ETag. Operates on the default site unless site_id is provided. |
823
+ | `yootheme_builder_element_clone` | mutating | `element_path`, `etag`, `site_id`, `template_id` | Clone an element as a sibling (same parent, immediately after the source). Returns the new element's path. Requires ETag. Operates on the default site unless site_id is provided. |
824
+ | `yootheme_builder_element_delete` | destructive | `confirm`, `element_path`, `etag`, `site_id`, `template_id` | PERMANENTLY delete an element and all its children. Cannot be undone. Always ask the user to confirm first, then call again with `confirm: true`. Requires ETag. Operates on the default site unless site_id is provided. |
825
+ | `yootheme_builder_element_get` | read+idempotent | `element_path`, `site_id`, `template_id` | Get the full element object at a specific JSON-Pointer path, including props and children. Use yootheme_builder_element_list to discover paths. Operates on the default site unless site_id is provided. |
826
+ | `yootheme_builder_element_get_binding` | read+idempotent | `element_path`, `site_id`, `template_id` | Read the source binding attached to an element — the bound source name, the field-mappings (which source field feeds which element prop) and the query arguments/directives. Returns the empty object if the element is not bound. Operates on the default site unless site_id is provided. |
827
+ | `yootheme_builder_element_list` | read+idempotent | `cursor`, `depth`, `fields`, `limit`, `root_path`, `site_id`, `template_id` | List elements in a template as a flat array with JSON-Pointer paths + types. Scope with `root_path`/`depth` for a subtree, paginate with `limit`/`cursor` for large templates. `fields[]` narrows each row. Operates on the default site unless site_id is provided. |
828
+ | `yootheme_builder_element_move` | idempotent | `element_path`, `etag`, `site_id`, `template_id`, `to_index`, `to_parent_path` | Move an element to a new parent + index in the tree. Useful for reordering or reparenting (e.g. moving a card from one grid column to another). Requires ETag. Operates on the default site unless site_id is provided. |
829
+ | `yootheme_builder_element_type_get_schema` | read+idempotent | `element_type`, `site_id`, `type_name` | **Call before every `element_add` / `_update_settings`** unknown prop keys are silently dropped server-side, so guessing fails quietly. Returns `{name,type,label?}` field descriptors. Use `element_type`; `type_name` is DEPRECATED. Operates on the default site unless site_id is provided. |
830
+ | `yootheme_builder_element_types_list` | read+idempotent | `fields`, `site_id` | List element types registered on this site (built-ins + YOOessentials/uEssentials extras). Names feed `element_type` of element_add. Pass `fields[]` to narrow each row. Operates on the default site unless site_id is provided. |
831
+ | `yootheme_builder_element_unbind_source` | destructive | `confirm`, `element_path`, `etag`, `site_id`, `template_id` | Remove the source binding from an element. Clears `props.source`. Destructive in the sense that it may break dynamic-content rendering — always ask the user to confirm. Requires ETag. Operates on the default site unless site_id is provided. |
832
+ | `yootheme_builder_element_update_settings` | idempotent | `element_path`, `etag`, `merge`, `props`, `site_id`, `template_id` | Update `props` on an element. Default replaces all props; pass `merge:true` for server-side deep-merge (only request keys overwritten, others survive — avoids read-modify-write races). Requires ETag. Operates on the default site unless site_id is provided. |
833
+ | `yootheme_builder_get_etag` | read+idempotent | `site_id` | Get the current top-level state ETag. Pass it back via `etag` on any write tool (page_save/page_publish/element_set/binding_set) to enforce optimistic-locking the server returns 412 when the ETag has changed since you read it. Operates on the default site unless site_id is provided. |
834
+ | `yootheme_builder_health` | read+idempotent | `site_id` | Check plugin installed/reachable. Returns plugin version, YT Pro version, REST endpoints. Authenticated payload adds site_url + home_url for deep-linking. See yootheme_builder_diagnose for Bearer-validity + connectivity summary. Operates on the default site unless site_id is provided. |
835
+ | `yootheme_builder_inspect_multi_items_binding` | read+idempotent | `element_path`, `site_id`, `template_id` | Reports Multi-Items binding state: container/item pair (grid↔grid_item, slideshow↔slideshow_item, …), current binding level (none\|container\|item), and a recommended_fix when the binding sits on the container instead of the child. Operates on the default site unless site_id is provided. |
836
+ | `yootheme_builder_page_get_layout` | read+idempotent | `fields`, `flat`, `site_id`, `template_id` | Get full layout tree for one template. Default nested `{layout, etag}`. Set `flat:true` for depth-first array `{elements:[...], etag}`; combine with `fields[]` to project per-element. Operates on the default site unless site_id is provided. |
837
+ | `yootheme_builder_page_get_schema` | read+idempotent | `site_id`, `template_id` | Get the flat schema for a template — a list of nodes with their JSON-Pointer paths and element types. Best entry-point for navigation: lighter than page_get_layout, sufficient to locate elements before editing. Operates on the default site unless site_id is provided. |
838
+ | `yootheme_builder_page_publish` | idempotent | `etag`, `site_id`, `template_id` | Publish a template — persist state, flush YT + WP caches, snapshot the published-state ETag. ETag optional — when provided, 412 on conflict; when omitted, last-write-wins. Recommended for collaborative edits. Operates on the default site unless site_id is provided. |
839
+ | `yootheme_builder_page_save` | idempotent | `etag`, `site_id`, `template_id` | Re-run save-transforms and persist. ETag optional — when provided, 412 on conflict; when omitted, last-write-wins. Recommended for collaborative edits. No-op when state is byte-identical (returns `no_changes:true`, ETag unchanged). Operates on the default site unless site_id is provided. |
840
+ | `yootheme_builder_pages_list` | read+idempotent | `fields`, `site_id` | List YT templates. Returns id, label, usage meta + per-row `frontend_url` (permalink when public) and `frontend_url_template` (pattern for search / 404 / ID-based templates). Pass `fields:["id","label"]` to slim. Site URL: diagnose. Operates on the default site unless site_id is provided. |
841
+ | `yootheme_builder_sites_list` | read+idempotent | `site_id` | List every site configured in this MCP server (site_id, URL, platform, default flag, bearer source). Platform-agnostic. Never calls a REST endpoint, never resolves a bearer. Useful when the agent needs to discover available site_ids before targeting one with `site_id: "<id>"`. (`site_id` is accepted for schema-uniformity but ignored by this tool.) |
842
+ | `yootheme_builder_sites_test` | read+idempotent | `site_id` | Verify connectivity to ONE configured site: probes `/health` (unauthenticated) and `/etag` (authenticated) in parallel and returns plugin_reachable + bearer_valid in a single call. `site_id` is REQUIRED (this tool exists to test a specific id, never the default). Use `yootheme_builder_sites_list` to discover available IDs first. |
843
+ | `yootheme_builder_sources_list` | read+idempotent | `fields`, `site_id` | List Builder sources grouped by origin (apimapper/wordpress/essentials). Returns name+label per source — pick one for `element_bind_source`. Pass `fields[]` to narrow each row. Operates on the default site unless site_id is provided. |
844
+ | `yootheme_builder_template_summary` | read+idempotent | `site_id`, `template_id` | Token-efficient template overview: element counts by type, binding count, max nesting depth, and named landmark sections — computed server-side in one call. Use this to grasp a large template before pulling element_list or page_get_layout. Operates on the default site unless site_id is provided. |
586
845
 
587
846
  <!-- TOOL-CATALOG:END -->