@diviops/mcp-server 1.5.47 → 1.5.48

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 (2) hide show
  1. package/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2759,15 +2759,21 @@ registerPluginTool("diviops_tb_template_create", {
2759
2759
  .optional()
2760
2760
  .default("")
2761
2761
  .describe("Footer block markup (empty = inherit from default template)"),
2762
+ body_content: z.string().optional().default("").describe("Body block markup (omitted/empty = existing no-custom-body behavior). Nonempty content requires plugin capability tb_template_create_body; returns body_layout_id. No global Theme Builder save or legacy cleanup."),
2762
2763
  dry_run: DRY_RUN_FIELD,
2763
2764
  },
2764
2765
  annotations: { idempotentHint: false },
2765
2766
  _meta: { idempotent: "false" },
2766
- }, async ({ title, condition, header_content, footer_content, dry_run }) => {
2767
- const isolationGate = writerIsolationErrorResult("diviops_tb_template_create", { header_content, footer_content });
2767
+ }, async ({ title, condition, header_content, footer_content, body_content, dry_run }) => {
2768
+ const bodyGate = conditionalCapabilityError("diviops_tb_template_create", "tb_template_create_body", body_content !== "", "Omit body_content only when no custom body layout is intended.");
2769
+ if (bodyGate)
2770
+ return bodyGate;
2771
+ const isolationGate = writerIsolationErrorResult("diviops_tb_template_create", { header_content, footer_content, body_content });
2768
2772
  if (isolationGate)
2769
2773
  return isolationGate;
2770
2774
  const body = { title, condition, header_content, footer_content };
2775
+ if (body_content !== "")
2776
+ body.body_content = body_content;
2771
2777
  if (dry_run)
2772
2778
  body.dry_run = true;
2773
2779
  const result = await authoringWrite("/theme-builder/template/create", "POST", body, "tb_template_create", dry_run === true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.47",
3
+ "version": "1.5.48",
4
4
  "description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",