@wootsup/yt-builder-mcp 1.6.1 → 1.7.1
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.
- package/README.md +1 -1
- package/dist/catalog/tool-catalog-markdown.d.ts +55 -0
- package/dist/catalog/tool-catalog-markdown.d.ts.map +1 -0
- package/dist/catalog/tool-catalog-markdown.js +84 -0
- package/dist/catalog/tool-catalog-markdown.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/install-skill.d.ts +23 -2
- package/dist/install-skill.d.ts.map +1 -1
- package/dist/install-skill.js +35 -3
- package/dist/install-skill.js.map +1 -1
- package/dist/setup-cli.d.ts +7 -3
- package/dist/setup-cli.d.ts.map +1 -1
- package/dist/setup-cli.js +82 -13
- package/dist/setup-cli.js.map +1 -1
- package/dist/skill-manifest.d.ts +35 -0
- package/dist/skill-manifest.d.ts.map +1 -0
- package/dist/skill-manifest.js +91 -0
- package/dist/skill-manifest.js.map +1 -0
- package/dist/tools/elements/handlers-write.d.ts.map +1 -1
- package/dist/tools/elements/handlers-write.js +55 -0
- package/dist/tools/elements/handlers-write.js.map +1 -1
- package/dist/tools/elements/schema-validation.d.ts +78 -0
- package/dist/tools/elements/schema-validation.d.ts.map +1 -0
- package/dist/tools/elements/schema-validation.js +205 -0
- package/dist/tools/elements/schema-validation.js.map +1 -0
- package/dist/tools/format/source-schema-format.d.ts +10 -0
- package/dist/tools/format/source-schema-format.d.ts.map +1 -1
- package/dist/tools/format/source-schema-format.js +50 -3
- package/dist/tools/format/source-schema-format.js.map +1 -1
- package/dist/tools/inspection.js +6 -5
- package/dist/tools/inspection.js.map +1 -1
- package/dist/tools/sources/builders.d.ts.map +1 -1
- package/dist/tools/sources/builders.js +4 -3
- package/dist/tools/sources/builders.js.map +1 -1
- package/dist/tools/sources/handlers.d.ts +2 -0
- package/dist/tools/sources/handlers.d.ts.map +1 -1
- package/dist/tools/sources/handlers.js +8 -0
- package/dist/tools/sources/handlers.js.map +1 -1
- package/dist/uninstall-skill.d.ts +6 -0
- package/dist/uninstall-skill.d.ts.map +1 -1
- package/dist/uninstall-skill.js +20 -2
- package/dist/uninstall-skill.js.map +1 -1
- package/dist/uninstall.d.ts +2 -0
- package/dist/uninstall.d.ts.map +1 -1
- package/dist/uninstall.js +1 -1
- package/dist/uninstall.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/skills/yt-builder-mcp/SKILL.md +76 -48
|
@@ -17,10 +17,16 @@ export interface UninstallSkillOptions {
|
|
|
17
17
|
readonly targetSkillsDir?: string;
|
|
18
18
|
/** AGENTS.md file the marker block was appended to. Default `~/AGENTS.md`. */
|
|
19
19
|
readonly targetAgentsFile?: string;
|
|
20
|
+
/** Remove even a locally-modified skill. Default `false`: a modified skill is kept + reported. */
|
|
21
|
+
readonly force?: boolean;
|
|
22
|
+
/** Override the manifest file location (tests). Default: beside the skills dir. */
|
|
23
|
+
readonly manifestPath?: string;
|
|
20
24
|
}
|
|
21
25
|
export interface UninstallSkillResult {
|
|
22
26
|
/** True when at least one skill directory was removed. */
|
|
23
27
|
readonly skillRemoved: boolean;
|
|
28
|
+
/** True when removal was SKIPPED because the skill is locally modified. */
|
|
29
|
+
readonly skillModifiedKept: boolean;
|
|
24
30
|
/** Absolute path of the canonical skill dir that was targeted. */
|
|
25
31
|
readonly skillTargetDir: string;
|
|
26
32
|
/** True when the marker block was stripped from AGENTS.md. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-skill.d.ts","sourceRoot":"","sources":["../src/uninstall-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"uninstall-skill.d.ts","sourceRoot":"","sources":["../src/uninstall-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsBH,MAAM,WAAW,qBAAqB;IAClC,gFAAgF;IAChF,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,kGAAkG;IAClG,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB;IACjC,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,kEAAkE;IAClE,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC/B;AAUD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,qBAA0B,GAAG,OAAO,CAc1E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoD5D;AAED,wBAAsB,cAAc,CAChC,OAAO,GAAE,qBAA0B,GACpC,OAAO,CAAC,oBAAoB,CAAC,CAmD/B"}
|
package/dist/uninstall-skill.js
CHANGED
|
@@ -16,6 +16,7 @@ import { existsSync, readFileSync, rmSync, writeFileSync, } from 'node:fs';
|
|
|
16
16
|
import { homedir } from 'node:os';
|
|
17
17
|
import { join } from 'node:path';
|
|
18
18
|
import { MARKER_LINE } from './install-skill.js';
|
|
19
|
+
import { detectModification, manifestPathFor, readInstallManifest, removeInstallManifest, } from './skill-manifest.js';
|
|
19
20
|
/** Skill folder names this package has ever installed (canonical first). */
|
|
20
21
|
const SKILL_DIR_NAMES = ['yt-builder-mcp', 'yootheme-builder'];
|
|
21
22
|
function resolveSkillsDir(opts) {
|
|
@@ -116,6 +117,21 @@ export async function uninstallSkill(options = {}) {
|
|
|
116
117
|
const skillsDir = resolveSkillsDir(options);
|
|
117
118
|
const agentsFile = resolveAgentsFile(options);
|
|
118
119
|
const skillTargetDir = join(skillsDir, SKILL_DIR_NAMES[0]);
|
|
120
|
+
const force = options.force ?? false;
|
|
121
|
+
const manifestPath = options.manifestPath ?? manifestPathFor(skillsDir);
|
|
122
|
+
// ── Modified-Schutz (Spec §8) ─────────────────────────────────────────
|
|
123
|
+
// Vergleich gegen das Manifest. 'modified' + !force → Skill behalten +
|
|
124
|
+
// warnen (NICHT löschen), Marker NICHT strippen (das Skill bleibt ja).
|
|
125
|
+
const manifest = readInstallManifest(manifestPath);
|
|
126
|
+
if (!force && detectModification(skillTargetDir, manifest) === 'modified') {
|
|
127
|
+
return {
|
|
128
|
+
skillRemoved: false,
|
|
129
|
+
skillModifiedKept: true,
|
|
130
|
+
skillTargetDir,
|
|
131
|
+
markerRemoved: false,
|
|
132
|
+
agentsFile,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
119
135
|
// 1. Remove skill directories (canonical + legacy).
|
|
120
136
|
let skillRemoved = false;
|
|
121
137
|
for (const name of SKILL_DIR_NAMES) {
|
|
@@ -125,7 +141,9 @@ export async function uninstallSkill(options = {}) {
|
|
|
125
141
|
skillRemoved = true;
|
|
126
142
|
}
|
|
127
143
|
}
|
|
128
|
-
// 2.
|
|
144
|
+
// 2. Remove the install-manifest (best-effort; no error when absent).
|
|
145
|
+
removeInstallManifest(manifestPath);
|
|
146
|
+
// 3. Strip the marker block from AGENTS.md.
|
|
129
147
|
let markerRemoved = false;
|
|
130
148
|
if (existsSync(agentsFile)) {
|
|
131
149
|
let body = '';
|
|
@@ -141,6 +159,6 @@ export async function uninstallSkill(options = {}) {
|
|
|
141
159
|
markerRemoved = true;
|
|
142
160
|
}
|
|
143
161
|
}
|
|
144
|
-
return { skillRemoved, skillTargetDir, markerRemoved, agentsFile };
|
|
162
|
+
return { skillRemoved, skillModifiedKept: false, skillTargetDir, markerRemoved, agentsFile };
|
|
145
163
|
}
|
|
146
164
|
//# sourceMappingURL=uninstall-skill.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-skill.js","sourceRoot":"","sources":["../src/uninstall-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,UAAU,EACV,YAAY,EACZ,MAAM,EACN,aAAa,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall-skill.js","sourceRoot":"","sources":["../src/uninstall-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EACH,UAAU,EACV,YAAY,EACZ,MAAM,EACN,aAAa,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EACH,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,4EAA4E;AAC5E,MAAM,eAAe,GAAsB,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AA0BlF,SAAS,gBAAgB,CAAC,IAA2B;IACjD,OAAO,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAA2B;IAClD,OAAO,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CA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CAAC;QACjC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YAClB,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9C,YAAY,GAAG,IAAI,CAAC;QACxB,CAAC;IACL,CAAC;IAED,sEAAsE;IACtE,qBAAqB,CAAC,YAAY,CAAC,CAAC;IAEpC,4CAA4C;IAC5C,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QACzB,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,IAAI,CAAC;YACD,IAAI,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAC7C,CAAC;QAAC,MAAM,CAAC;YACL,IAAI,GAAG,EAAE,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACnB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5C,aAAa,GAAG,IAAI,CAAC;QACzB,CAAC;IACL,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AACjG,CAAC"}
|
package/dist/uninstall.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface UninstallSelection {
|
|
|
36
36
|
readonly clientIds: readonly string[];
|
|
37
37
|
/** Also remove the installed skill (+ AGENTS.md marker)? */
|
|
38
38
|
readonly removeSkill: boolean;
|
|
39
|
+
/** Override the uninstall modified-protection in `uninstallSkill`. */
|
|
40
|
+
readonly force?: boolean;
|
|
39
41
|
}
|
|
40
42
|
/** Per-client outcome of a removal. */
|
|
41
43
|
export interface ClientUninstallResult {
|
package/dist/uninstall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACH,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,EACvC,KAAK,oBAAoB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CACxC,OAAO,GAAE,SAAS,YAAY,EAAgB,GAC/C,OAAO,CAAC,eAAe,EAAE,CAAC,CAY5B;AAED,0CAA0C;AAC1C,MAAM,WAAW,kBAAkB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACH,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,EACvC,KAAK,oBAAoB,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,E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;IACtD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,uBAAuB,CAAC;CAC7D;AAED,eAAO,MAAM,sBAAsB,EAAE,aAIpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,YAAY,CAC9B,SAAS,EAAE,kBAAkB,EAC7B,IAAI,GAAE,aAAsC,GAC7C,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
|
package/dist/uninstall.js
CHANGED
|
@@ -75,7 +75,7 @@ export async function runUninstall(selection, deps = DEFAULT_UNINSTALL_DEPS) {
|
|
|
75
75
|
}
|
|
76
76
|
let skillResult;
|
|
77
77
|
if (selection.removeSkill) {
|
|
78
|
-
skillResult = await deps.uninstallSkill();
|
|
78
|
+
skillResult = await deps.uninstallSkill({ force: selection.force ?? false });
|
|
79
79
|
}
|
|
80
80
|
return { clientResults, ...(skillResult !== undefined ? { skillResult } : {}) };
|
|
81
81
|
}
|
package/dist/uninstall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAqB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACH,gBAAgB,IAAI,uBAAuB,EAC3C,cAAc,IAAI,qBAAqB,GAE1C,MAAM,sBAAsB,CAAC;AAW9B;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CACxC,UAAmC,WAAW;IAE9C,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,GAAG,CAChC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CACnE,CAAC;IACF,OAAO,UAAU;SACZ,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GA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,UAAU,EAAE;gBAC/B,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,EAAE;gBACf,KAAK;aACR,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAED,IAAI,WAA6C,CAAC;IAClD,IAAI,SAAS,CAAC,WAAW,EAAE,CAAC;QACxB,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACpF,CAAC"}
|
package/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"dxt_version": "0.1",
|
|
3
3
|
"name": "@wootsup/yt-builder-mcp",
|
|
4
4
|
"display_name": "YT Builder MCP for YOOtheme Pro (unofficial)",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.7.1",
|
|
6
6
|
"description": "Drive your YOOtheme Pro Page Builder programmatically from Claude, Cursor, Codex, Gemini and 5 other MCP-capable AI assistants — read layouts, edit settings, add elements, bind dynamic sources. Works on WordPress and Joomla 5/6. Built for YOOtheme Pro 4.0+. Independent third-party project, not affiliated with YOOtheme GmbH.",
|
|
7
7
|
"long_description": "YT Builder MCP gives AI assistants a typed, scoped, and idempotent surface for your YOOtheme Pro Page Builder, on either WordPress or Joomla 5/6. Tools cover page discovery, layout inspection, element CRUD, source binding, and diagnostics. Bearer auth, optimistic locking via ETag, scope hierarchy (read < write < admin), and structured-error responses keep the agent safe and the workflow correct on first try. Independent third-party project — YOOtheme® is a registered trademark of YOOtheme GmbH (yootheme.com); YT Builder MCP is built by WootsUp (getimo productions) and is not affiliated with, endorsed by, or sponsored by YOOtheme.",
|
|
8
8
|
"icon": "icon.png",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wootsup/yt-builder-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "YT Builder MCP — drive your page builder from Claude, Cursor, Codex, Gemini and 5 other MCP-capable AI assistants. Built for YOOtheme Pro 4.0+. Independent third-party project, not affiliated with YOOtheme GmbH.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -122,7 +122,12 @@ The server exposes:
|
|
|
122
122
|
- To render-check a saved page over the authenticated channel (F5+N5 — does
|
|
123
123
|
it render, with how many items, or is it silently blank? where an external
|
|
124
124
|
cURL 401s behind staging Basic-Auth), call the now-L1
|
|
125
|
-
`yootheme_builder_render_preview({ template_id })` directly.
|
|
125
|
+
`yootheme_builder_render_preview({ template_id })` directly. It takes no
|
|
126
|
+
post/term target: it renders YOOtheme's implicit fallback context, so a
|
|
127
|
+
source-bound template comes back non-empty. Treat a non-empty render as the
|
|
128
|
+
success signal, not "blank despite a binding". Pass `expect: "<substring>"`
|
|
129
|
+
to confirm a specific edit reached the HTML in one call (the response adds
|
|
130
|
+
`matched` + `snippet`).
|
|
126
131
|
- To surgically SET a precomposed `source` + the native item-level
|
|
127
132
|
`source_extended.props` carrier on one element at a pointer, ETag-locked,
|
|
128
133
|
leaving the rest of the layout byte-unchanged (F2 — the one-call source edit
|
|
@@ -485,17 +490,23 @@ renders dynamic items.
|
|
|
485
490
|
|
|
486
491
|
**Common pitfalls:**
|
|
487
492
|
|
|
488
|
-
- **Inventing `fieldMap`.**
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
493
|
+
- **Inventing `fieldMap`.** There is no `fieldMap` arg. Field mapping IS
|
|
494
|
+
an MCP parameter: pass `field_mappings` (`{<element_prop>: <source_field>}`)
|
|
495
|
+
in the SAME bind call. The bind tool also takes `bindingLevel`,
|
|
496
|
+
`relation`/`field`, `arguments` and `directives`; see the Tool Catalog
|
|
497
|
+
appendix for the full `element_bind_source` input-key list rather than
|
|
498
|
+
guessing a subset.
|
|
492
499
|
- **Wrong parameter names.** Use `template_id` (not `pageId`),
|
|
493
500
|
`element_path` (not `path`), `source_name` (not `sourceName`),
|
|
494
501
|
`etag` (not `ifMatch`).
|
|
495
502
|
- **Source not in the list.** API Mapper sources only appear once
|
|
496
|
-
they're PUBLISHED in API Mapper (not just saved). If
|
|
497
|
-
`
|
|
498
|
-
|
|
503
|
+
they're PUBLISHED in API Mapper (not just saved). If you bind an
|
|
504
|
+
unknown `source_name`, `element_bind_source` rejects it and the error
|
|
505
|
+
context ALWAYS lists `all_published_sources` (the full list, your
|
|
506
|
+
guaranteed anchor), plus a `did_you_mean` (closest matches) only when a
|
|
507
|
+
near name exists. Read those from the error and retry with a real name;
|
|
508
|
+
only send the user to API Mapper to publish when the source genuinely
|
|
509
|
+
does not exist yet.
|
|
499
510
|
- **Binding non-list elements.** Only multi-item element types
|
|
500
511
|
(Accordion, Button, Description List, Gallery, Grid, List, Map, Nav,
|
|
501
512
|
Overlay-Slider, Panel-Slider, Popover, Slideshow, Social, Subnav,
|
|
@@ -798,19 +809,22 @@ an instance with a sensible default props payload.
|
|
|
798
809
|
2. `yootheme_builder_element_types_list({ fields: ["name", "label", "origin"] })`
|
|
799
810
|
narrows the catalogue with sparse-fields. Returns rows like
|
|
800
811
|
`{ name: "headline", label: "Headline", origin: "core", ... }`.
|
|
801
|
-
3. `yootheme_builder_element_type_get_schema({
|
|
812
|
+
3. `yootheme_builder_element_type_get_schema({ element_type: "<picked>" })`
|
|
802
813
|
fetches the prop schema for the chosen type. Returns the field
|
|
803
|
-
definitions you can pass via `props`.
|
|
804
|
-
`type_name
|
|
814
|
+
definitions you can pass via `props`. The canonical argument is
|
|
815
|
+
`element_type` (`type_name` is a DEPRECATED alias, kept only for
|
|
816
|
+
1.0.x back-compatibility).
|
|
805
817
|
4. `yootheme_builder_pages_list({ fields: ["id", "label"] })` and
|
|
806
818
|
`yootheme_builder_page_get_layout({ template_id, flat: false })`
|
|
807
819
|
locate the `parent_path` (JSON-Pointer) where the new element
|
|
808
820
|
should land.
|
|
809
821
|
5. `yootheme_builder_get_etag()`: fetch the optimistic-lock etag.
|
|
810
822
|
6. `yootheme_builder_element_add({ template_id, parent_path: "<path>", element_type: "<picked-name>", props: { ... }, etag })`
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
823
|
+
validates `props` against the live type schema. On a type with a
|
|
824
|
+
known schema, an unknown prop key is HARD-REJECTED (not silently
|
|
825
|
+
dropped): the error always lists `valid_prop_keys`, plus a
|
|
826
|
+
`did_you_mean` suggestion when a close field exists (e.g. `contnet`
|
|
827
|
+
to `content`). Read those from the error and retry; do not re-guess.
|
|
814
828
|
7. (Optional) `yootheme_builder_element_update_settings({ template_id, element_path: "<new-path>", props: { ... }, etag })`
|
|
815
829
|
iterates on the props. **Note: this REPLACES `props` entirely by
|
|
816
830
|
default; pass `merge: true` for a server-side deep-merge.** When
|
|
@@ -820,9 +834,18 @@ an instance with a sensible default props payload.
|
|
|
820
834
|
|
|
821
835
|
**Common pitfalls:**
|
|
822
836
|
|
|
823
|
-
- **
|
|
824
|
-
|
|
825
|
-
|
|
837
|
+
- **Pass the canonical `element_type` arg to the type-schema tool.**
|
|
838
|
+
It takes `element_type` (e.g. `element_type: "headline"`). `type_name`
|
|
839
|
+
still works as a DEPRECATED alias, but prefer `element_type` to match
|
|
840
|
+
every other tool in this domain. The server's Zod schema rejects any
|
|
841
|
+
other key.
|
|
842
|
+
- **Unknown prop key = hard reject, not a silent drop.** On a type with a
|
|
843
|
+
known schema, a prop key that is not a real field is REJECTED before the
|
|
844
|
+
write. The error ALWAYS lists `valid_prop_keys` (your guaranteed anchor),
|
|
845
|
+
plus a `did_you_mean` suggestion only when a close field exists. The
|
|
846
|
+
reserved binding keys `source` / `source_extended` / `source_node` are
|
|
847
|
+
rejected too (bind a source with `yootheme_builder_element_bind_source`,
|
|
848
|
+
never via `props`). Correct from the error instead of retrying blind.
|
|
826
849
|
- **Wrong parameter names on `element_add`.** Use `template_id`
|
|
827
850
|
(not `pageId`), `parent_path` (not `parentPath`), `element_type`
|
|
828
851
|
(not `type` / `name`), `props` (not `settings`), `etag` (not
|
|
@@ -841,7 +864,7 @@ an instance with a sensible default props payload.
|
|
|
841
864
|
- **Type name vs. label confusion.** The `name` field on the
|
|
842
865
|
catalogue row is the machine identifier (e.g. `pro_slider`); the
|
|
843
866
|
`label` is the human display string ("Pro Slider"). Always pass
|
|
844
|
-
the `name`
|
|
867
|
+
the machine `name` value as `element_type`.
|
|
845
868
|
- **Pro-only types on a Free install.** YOOtheme Free does not
|
|
846
869
|
register `pro_*` element types. Surface that to the user instead
|
|
847
870
|
of retrying with a different filter.
|
|
@@ -855,8 +878,8 @@ yootheme_builder_element_types_list({
|
|
|
855
878
|
})
|
|
856
879
|
// Rows: [{ name: "headline", label: "Headline", origin: "core" }, ...]
|
|
857
880
|
|
|
858
|
-
// Step 3. Fetch the schema (
|
|
859
|
-
yootheme_builder_element_type_get_schema({
|
|
881
|
+
// Step 3. Fetch the schema (canonical arg: element_type).
|
|
882
|
+
yootheme_builder_element_type_get_schema({ element_type: "headline" })
|
|
860
883
|
// Returns the field definitions for the headline's `props`.
|
|
861
884
|
|
|
862
885
|
// Step 6. Place the element.
|
|
@@ -941,21 +964,24 @@ Every element is addressed by a JSON-Pointer `path` (RFC-6901-style).
|
|
|
941
964
|
The read tools hand you the path; the write tools consume it. Learn the
|
|
942
965
|
grammar once and you never guess an address again.
|
|
943
966
|
|
|
944
|
-
**The shape.**
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
- **
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
967
|
+
**The shape.** The canonical address is index-first: the first segment is a
|
|
968
|
+
bare child index, then `/children/<index>` for each level down. A two-level
|
|
969
|
+
path is `/0/children/1` (child 0 of the layout root, then child 1 of that); a
|
|
970
|
+
three-level path is `/0/children/2/children/0`. Every Worked example in this
|
|
971
|
+
skill and every write-tool response uses this index-first form.
|
|
972
|
+
|
|
973
|
+
- **Relative (rel_path):** `/0/children/2/children/0` is the path FROM the
|
|
974
|
+
layout root. Each `/children/N` descends one level into the Nth child
|
|
975
|
+
(0-based).
|
|
976
|
+
- **Fully-qualified:** `/templates/<template_id>/layout/children/0/...` is the
|
|
977
|
+
same address with the template prefix.
|
|
978
|
+
|
|
979
|
+
**Both forms are accepted.** `element_list` / `page_get_schema` emit `path`
|
|
980
|
+
fully-qualified and `rel_path` with a leading `/children/0/...` (a `/children`
|
|
981
|
+
prefix on the first segment too); write-tool responses use the index-first
|
|
982
|
+
`/0/children/...` form. You may pass EITHER back as `element_path` /
|
|
983
|
+
`parent_path`: the server normalizes them (the `normalizeElementPath` rule),
|
|
984
|
+
and a leading slash is optional (`0/children/1` works too).
|
|
959
985
|
|
|
960
986
|
**The two special roots:**
|
|
961
987
|
|
|
@@ -965,11 +991,10 @@ slash is optional on the relative form (`children/0` works too).
|
|
|
965
991
|
layout node itself, which is not an addressable element. Use `""` for
|
|
966
992
|
"the top".
|
|
967
993
|
|
|
968
|
-
**Reading the index.** In `/
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
below).
|
|
994
|
+
**Reading the index.** In `/0/children/2/children/1`: child 0 of the layout,
|
|
995
|
+
then child 2 of THAT, then child 1 of THAT. Indices are positional and shift
|
|
996
|
+
when siblings are added or removed; re-read after a structural mutation before
|
|
997
|
+
reusing a path (see the ETag handshake below).
|
|
973
998
|
|
|
974
999
|
**Don't hand-build deep paths.** Enumerate with
|
|
975
1000
|
`yootheme_builder_element_list` (flat `{path, rel_path, element_type}`
|
|
@@ -1003,14 +1028,17 @@ the element at the path you sent, the `element_not_found` error does NOT
|
|
|
1003
1028
|
just say "not found" — it carries:
|
|
1004
1029
|
|
|
1005
1030
|
- `given` — the exact pointer you sent, echoed back so you see what was rejected.
|
|
1006
|
-
- `nearest_path` — the closest VALID element pointer
|
|
1007
|
-
distance, so an off-by-one index like `/children/9`
|
|
1008
|
-
sibling `/children/0`)
|
|
1031
|
+
- `nearest_path` — the closest VALID element pointer WHEN one exists
|
|
1032
|
+
(path-aware distance, so an off-by-one index like `/children/9`
|
|
1033
|
+
suggests the real sibling `/children/0`); retry with it. It is `null`
|
|
1034
|
+
when nothing is close enough (a legitimate "no candidate" signal); in
|
|
1035
|
+
that case fall back to `available_paths`.
|
|
1009
1036
|
- `nearest_path_label` — a HUMAN breadcrumb of that path
|
|
1010
1037
|
(`Hero ▸ row ▸ column ▸ headline`), so you (and the user) can see WHAT
|
|
1011
1038
|
the suggestion points at without decoding the pointer.
|
|
1012
1039
|
- `available_paths` — a small bounded list of the nearest valid pointers
|
|
1013
|
-
(not a full dump)
|
|
1040
|
+
(not a full dump); pick from it when `nearest_path` is `null` or not the
|
|
1041
|
+
one you want.
|
|
1014
1042
|
|
|
1015
1043
|
Use the suggestion to fix your NEXT call in-loop — you almost never need
|
|
1016
1044
|
to re-read the entire layout after a wrong-path error.
|
|
@@ -1091,7 +1119,7 @@ styles, the `#parent` bindings) survives untouched.
|
|
|
1091
1119
|
| `yootheme_builder_element_list` | read+idempotent | `cursor`, `depth`, `fields`, `limit`, `max_chars`, `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; `max_chars` bounds the text output. Operates on the default site unless site_id is provided. |
|
|
1092
1120
|
| `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. |
|
|
1093
1121
|
| `yootheme_builder_element_set_source` | idempotent | `element_path`, `etag`, `site_id`, `source`, `source_extended`, `template_id` | Surgically SET a precomposed `source` (+ optional `source_extended.props`) on ONE element at a pointer, ETag-locked, leaving every OTHER node unchanged (no 14 KB page_save). Use this — not element_bind_source — when you have the exact source shape OR need `source_extended.props`, the native Multi-Items item-mapping carrier bind_source cannot write. E.g. an FAQ accordion scoped to the term: source.query.name="categoryFaqs.taxonomyCategoryFaq", field={name:"faq"}, source_extended.props maps title/content to #node. ETag req. Operates on the default site unless site_id is provided. |
|
|
1094
|
-
| `yootheme_builder_element_type_get_schema` | read+idempotent | `element_type`, `site_id`, `type_name` |
|
|
1122
|
+
| `yootheme_builder_element_type_get_schema` | read+idempotent | `element_type`, `site_id`, `type_name` | Fetch a type's prop schema before `element_add`/`element_update_settings`: an unknown prop key on a known schema is hard-rejected (not silently dropped); the error always lists `valid_prop_keys`, plus a `did_you_mean` hint when a close field exists. Returns `{name,type,label?}`. Use `element_type` (`type_name` is a deprecated alias). Operates on the default site unless site_id is provided. |
|
|
1095
1123
|
| `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. Keywords: "slider"/"carousel" → `slideshow`/`panel-slider`/`overlay-slider`. Prop keys differ per element (grid_item `title` vs headline `content`) — use element_type_get_schema before element_add/bind. Operates on the default site unless site_id is provided. |
|
|
1096
1124
|
| `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. |
|
|
1097
1125
|
| `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. |
|
|
@@ -1108,13 +1136,13 @@ styles, the `#parent` bindings) survives untouched.
|
|
|
1108
1136
|
| `yootheme_builder_pages_create` | idempotent | `dry_run`, `layout`, `menu_item`, `published`, `site_id`, `slug`, `status`, `title` | Create a page (WordPress) or article (Joomla 5/6) with a YOOtheme per-page layout. Required: title. Optional: slug, status (default draft), published (default false → live on true: WP publish / Joomla state 1), layout (JSON), menu_item (Joomla SEF route), dry_run (preflight, no persist). Returns page_id (WP) / article_id (Joomla), slug, template_id (page:{id} or article:{id}), etag, warnings. Joomla: a published article has NO SEF route until a menu item points at it — pass menu_item, else frontend_url may 404. Operates on the default site unless site_id is provided. |
|
|
1109
1137
|
| `yootheme_builder_pages_delete` | idempotent | `confirm`, `force`, `post_id`, `site_id` | Delete a page (WordPress) or article (Joomla 5/6) with its YOOtheme per-page layout. Requires confirm:true (gate against accidental deletion). Default: trash (recoverable). force:true: permanent delete. Refuses non-page/article types with 403 (Layer 9 defense). Returns deleted:true, page_id (WP) / article_id (Joomla), force_deleted, bumped etag. Operates on the default site unless site_id is provided. |
|
|
1110
1138
|
| `yootheme_builder_pages_list` | read+idempotent | `cursor`, `fields`, `label_contains`, `limit`, `max_chars`, `site_id` | List pages, templates, and layouts in the YOOtheme Pro builder (template_id, label, type, element count, frontend_url, builder_url per row). CALL THIS FIRST to discover template IDs before page_get_layout / element_list / page_get_schema. Paginates: up to `limit` rows (default 50) plus `total` and a `next_cursor` (pass it back as `cursor`) when more remain. Filter with `label_contains`. Slim rows with `fields:["id","label"]`; bound output with `max_chars`. Operates on the default site unless site_id is provided. |
|
|
1111
|
-
| `yootheme_builder_pages_resolve` | read+idempotent | `site_id`, `url` | Resolve a public page/article URL to the template_id that renders it — paste a URL, get a layout-addressable id in one call.
|
|
1139
|
+
| `yootheme_builder_pages_resolve` | read+idempotent | `site_id`, `url` | Resolve a public page/article OR archive URL to the template_id that renders it — paste a URL, get a layout-addressable id in one call. A singular page resolves to its per-page layout; a CPT archive (/faq/), taxonomy/category/tag term, or author archive resolves to the governing THEME TEMPLATE. Returns {template_id, post_id (null for theme templates), type, frontend_url, context (matched YT type), resolved_via (per_page\|theme_template)}. Only home/search/date 404 (use pages_list). page_get_layout/page_get_schema also accept `url`. Operates on the default site unless site_id is provided. |
|
|
1112
1140
|
| `yootheme_builder_rename_source` | idempotent | `etag`, `field_map`, `from`, `site_id`, `source_map`, `template_id`, `to` | Template-wide RENAME of a source / type / field name across EVERY binding in a template, in ONE ETag-locked write (not a whole-layout page_save) — preserving each binding's arguments, props and field_mappings. Use after a taxonomy/CPT rename (faq→help) breaks every bound layout. Pass `from`/`to` for one source, and/or `source_map`/`field_map` to rename a relation + its field tokens together; the dotted "<source>.<relation>" form is rewritten segment-by-segment. Returns {replaced_count, changed_paths, new_etag}. ETag req. Operates on the default site unless site_id is provided. |
|
|
1113
|
-
| `yootheme_builder_render_preview` | read+idempotent | `site_id`, `template_id`, `url` | Render-check a saved template over the authenticated channel — does it actually render, with how many items, or is it blank? Address by `template_id` (from pages_list) OR `url` (
|
|
1141
|
+
| `yootheme_builder_render_preview` | read+idempotent | `expect`, `site_id`, `template_id`, `url` | Render-check a saved template over the authenticated channel — does it actually render, with how many items, or is it blank? Address by `template_id` (from pages_list) OR `url` (resolved for you). Returns {rendered, item_count, empty, error?, cache_purge_hint}; with `expect`, also {matched, snippet}. Use AFTER a page_save / element_bind_source to catch a silently-empty live page (a bad binding "saves" then renders blank); the swallowed YOOtheme render error is surfaced in `error`. Read-only — renders without persisting. Operates on the default site unless site_id is provided. |
|
|
1114
1142
|
| `yootheme_builder_scaffold_section` | mutating | `columns`, `etag`, `site_id`, `template_id` | Create a VALID section → row → column hull in ONE atomic call and return the column JSON-Pointer path(s) to drop content into. This is the EASIEST correct way to start a new layout block: YOOtheme content must live in section → row → column, and adding content anywhere else (root, bare section, bare row) is rejected. Pass `columns` (1-12, default 1) for a multi-column row. Requires ETag. Operates on the default site unless site_id is provided. |
|
|
1115
1143
|
| `yootheme_builder_sites_list` | read+idempotent | `site_id` | List all sites configured in this multi-site MCP installation. Returns site_id + URL + platform (wordpress\|joomla) + default flag per row. CALL THIS FIRST when working with a fresh MCP connection to discover available site_ids before targeting one with any other tool. Read-only, no REST calls. Keywords: list sites, list connections, list installations, discover site_id, available sites, configured sites, what sites exist, multi-site index. (site_id is accepted for schema-uniformity but ignored by this tool.) |
|
|
1116
1144
|
| `yootheme_builder_sites_test` | read+idempotent | `site_id` | Verify connectivity to ONE site: probes /health (no auth) + /etag (auth) in parallel; returns plugin_reachable + bearer_valid. `site_id` is REQUIRED. Use sites_list to find IDs. |
|
|
1117
|
-
| `yootheme_builder_source_get_schema` | read+idempotent | `max_chars`, `name`, `site_id` | Introspect ONE data source: its query methods + arguments + RELATIONS (e.g. Term→Posts: categoryFaqs.taxonomyCategoryFaq → field "faq") + a provides_archive_context flag (id:0 = current archive term, auto-scoped). CALL BEFORE binding on an archive/category template — turns a ~25-call code-dive into one. Keywords: source schema,
|
|
1145
|
+
| `yootheme_builder_source_get_schema` | read+idempotent | `max_chars`, `name`, `site_id` | Introspect ONE data source: its query methods + arguments + RELATIONS (e.g. Term→Posts: categoryFaqs.taxonomyCategoryFaq → field "faq") + a provides_archive_context flag (id:0 = current archive term, auto-scoped). Each argument may carry `enum_values` (allowed values, e.g. ["asc","desc"]); pick from those, don't guess. CALL BEFORE binding on an archive/category template — turns a ~25-call code-dive into one. Keywords: source schema, relations, archive context, enum values. Get `name` from yootheme_builder_sources_list. Operates on the default site unless site_id is provided. |
|
|
1118
1146
|
| `yootheme_builder_sources_list` | read+idempotent | `cursor`, `fields`, `group`, `kind`, `limit`, `max_chars`, `name_contains`, `site_id` | List all data sources, feeds, and dynamic content sources available in the YOOtheme Pro builder. Returns name + label + origin (apimapper / wordpress / joomla / essentials) per source. CALL THIS BEFORE binding any element to a data source. Then bind directly with yootheme_builder_element_bind_source. Keywords: list sources, list feeds, list bindings, dynamic content, what sources exist. Paginates (`limit`/`cursor`/`total`); scope with `group`/`kind`/`name_contains`; slim with `fields[]`; bound output with `max_chars`. Operates on the default site unless site_id is provided. |
|
|
1119
1147
|
| `yootheme_builder_template_set_type` | idempotent | `etag`, `site_id`, `template_id`, `type` | Reassign which archive/single a YOOtheme THEME template applies to — set its `type` condition (the value pages_list shows) in ONE ETag-locked write. Use after a taxonomy/CPT rename orphans a template (e.g. re-type "taxonomy-category_faq" → "taxonomy-category_help", "single-gloeckle_faq" → "single-gloeckle_help"). Returns {type, previous_type, new_etag} — previous_type is the read of the prior assignment, folded in. THEME templates only: a page:/article: layout is refused (422). ETag req. Operates on the default site unless site_id is provided. |
|
|
1120
1148
|
| `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. Example: yootheme_builder_template_summary({ template_id: "default" }). Operates on the default site unless site_id is provided. |
|