@respira/wordpress-mcp-server 8.3.6 → 8.3.8

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 (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/__tests__/429299b5-delete-post-empty-envelope.test.d.ts +46 -0
  3. package/dist/__tests__/429299b5-delete-post-empty-envelope.test.d.ts.map +1 -0
  4. package/dist/__tests__/429299b5-delete-post-empty-envelope.test.js +360 -0
  5. package/dist/__tests__/429299b5-delete-post-empty-envelope.test.js.map +1 -0
  6. package/dist/__tests__/agent-signature-clientinfo.test.js +11 -0
  7. package/dist/__tests__/agent-signature-clientinfo.test.js.map +1 -1
  8. package/dist/__tests__/stale-build-and-refresh-silence.test.d.ts +2 -0
  9. package/dist/__tests__/stale-build-and-refresh-silence.test.d.ts.map +1 -0
  10. package/dist/__tests__/stale-build-and-refresh-silence.test.js +76 -0
  11. package/dist/__tests__/stale-build-and-refresh-silence.test.js.map +1 -0
  12. package/dist/agent-signature.d.ts.map +1 -1
  13. package/dist/agent-signature.js +13 -0
  14. package/dist/agent-signature.js.map +1 -1
  15. package/dist/server.d.ts +14 -0
  16. package/dist/server.d.ts.map +1 -1
  17. package/dist/server.js +116 -20
  18. package/dist/server.js.map +1 -1
  19. package/dist/setup.d.ts.map +1 -1
  20. package/dist/setup.js +52 -3
  21. package/dist/setup.js.map +1 -1
  22. package/dist/types/index.d.ts +9 -0
  23. package/dist/types/index.d.ts.map +1 -1
  24. package/dist/version-checker.d.ts +8 -0
  25. package/dist/version-checker.d.ts.map +1 -1
  26. package/dist/version-checker.js +39 -0
  27. package/dist/version-checker.js.map +1 -1
  28. package/dist/wordpress-client.d.ts +52 -6
  29. package/dist/wordpress-client.d.ts.map +1 -1
  30. package/dist/wordpress-client.js +107 -7
  31. package/dist/wordpress-client.js.map +1 -1
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agent-signature.js","sourceRoot":"","sources":["../src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AAC,SAAS;QAChD,wBAAwB,EAAE,SAAS,CAAC,MAAM;KAC3C,CAAC;IAEF,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACrC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,yBAAyB,CAAC,GAAG,OAAO,CAAC;IAC/C,CAAC;IAED,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,yBAAyB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;IACzD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/dist/server.d.ts CHANGED
@@ -81,6 +81,11 @@ export declare class RespiraWordPressServer {
81
81
  private versionWarningShown;
82
82
  /** Epoch ms of the last site-list self-heal against respira.press (throttle). */
83
83
  private lastSiteRefreshAt;
84
+ /**
85
+ * Why the last site refresh produced what it produced. Surfaced by
86
+ * list_sites so "your new site is not here" always comes with a reason.
87
+ */
88
+ private lastSiteRefreshStatus;
84
89
  /** Dedupe concurrent self-heals so parallel list_sites calls share one fetch. */
85
90
  private siteRefreshInFlight;
86
91
  /**
@@ -201,6 +206,15 @@ export declare class RespiraWordPressServer {
201
206
  * @returns number of newly added sites.
202
207
  */
203
208
  private maybeSelfHealSiteList;
209
+ /**
210
+ * Explain a site refresh that did not confirm the list, or stay quiet.
211
+ *
212
+ * Returns null on the happy path, so a healthy response carries no noise.
213
+ * Every other branch names the cause and the one action that resolves it,
214
+ * because the symptom the user reports is always the same sentence: the site
215
+ * I added is not here.
216
+ */
217
+ private describeSiteRefreshStatus;
204
218
  private performSiteRefresh;
205
219
  /** Normalize a site URL for cross-config dedupe: scheme/host only, no www, lowercase. */
206
220
  private normalizeSiteUrl;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAwCzE,MAAM,MAAM,eAAe,G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C,6BAA6B;IA6CrC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,yBAAyB;IA+BjC,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAmQP,kBAAkB;YAsClB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;IA8nHtB;;;;;;OAMG;IACH;;;;;;;;;;;;;oDAagD;IAChD,OAAO,CAAC,mBAAmB,CAAoD;IAC/E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAU;IAClD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,CAAU;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAS;IAC1D;;mDAE+C;IAC/C,OAAO,CAAC,0BAA0B,CAAoC;IAEtE;;;;;;;;OAQG;YACW,0BAA0B;YAyC1B,oBAAoB;YA6CpB,2BAA2B;IAQzC;;;;OAIG;YACW,cAAc;IAQ5B,OAAO,CAAC,mBAAmB;IA09C3B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAe3C;IAEF;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YAmCpB,cAAc;IAuH5B,oEAAoE;IACpE,OAAO,CAAC,iBAAiB;IAoBzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IA68C9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA+azB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA+UxB,GAAG;CA+CV"}
package/dist/server.js CHANGED
@@ -380,6 +380,11 @@ export class RespiraWordPressServer {
380
380
  versionWarningShown = false;
381
381
  /** Epoch ms of the last site-list self-heal against respira.press (throttle). */
382
382
  lastSiteRefreshAt = 0;
383
+ /**
384
+ * Why the last site refresh produced what it produced. Surfaced by
385
+ * list_sites so "your new site is not here" always comes with a reason.
386
+ */
387
+ lastSiteRefreshStatus = 'never_run';
383
388
  /** Dedupe concurrent self-heals so parallel list_sites calls share one fetch. */
384
389
  siteRefreshInFlight = null;
385
390
  /**
@@ -1402,6 +1407,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
1402
1407
  */
1403
1408
  async maybeSelfHealSiteList(force = false) {
1404
1409
  if (process.env.RESPIRA_DISABLE_SITE_REFRESH === '1') {
1410
+ this.lastSiteRefreshStatus = 'disabled';
1405
1411
  return 0;
1406
1412
  }
1407
1413
  const throttleMs = Number(process.env.RESPIRA_SITE_REFRESH_THROTTLE_MS) || 60_000;
@@ -1416,6 +1422,42 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
1416
1422
  });
1417
1423
  return this.siteRefreshInFlight;
1418
1424
  }
1425
+ /**
1426
+ * Explain a site refresh that did not confirm the list, or stay quiet.
1427
+ *
1428
+ * Returns null on the happy path, so a healthy response carries no noise.
1429
+ * Every other branch names the cause and the one action that resolves it,
1430
+ * because the symptom the user reports is always the same sentence: the site
1431
+ * I added is not here.
1432
+ */
1433
+ describeSiteRefreshStatus() {
1434
+ switch (this.lastSiteRefreshStatus) {
1435
+ case 'no_account_token':
1436
+ return {
1437
+ status: 'no_account_token',
1438
+ detail: 'The site list could not be checked against your account, because none of the configured sites holds a dashboard-issued token (respira_site_...). Sites added on the dashboard will not appear here until this config is refreshed. Run: npx @respira/wordpress-mcp-server --setup, or reconnect a site from https://www.respira.press/dashboard/sites.',
1439
+ };
1440
+ case 'unreachable':
1441
+ return {
1442
+ status: 'unreachable',
1443
+ detail: 'respira.press could not be reached to confirm the site list, so this is the list this server started with. A site added recently may be missing. Usually a network, proxy, or firewall issue; it retries by itself.',
1444
+ };
1445
+ case 'backend_error':
1446
+ return {
1447
+ status: 'backend_error',
1448
+ detail: 'respira.press was reached but did not return a usable site list, so this is the list this server started with. A site added recently may be missing.',
1449
+ };
1450
+ case 'disabled':
1451
+ return {
1452
+ status: 'disabled',
1453
+ detail: 'Automatic site-list refresh is switched off by RESPIRA_DISABLE_SITE_REFRESH=1, so newly added sites will not appear here until this server restarts with an updated config.',
1454
+ };
1455
+ case 'never_run':
1456
+ case 'ok':
1457
+ default:
1458
+ return null;
1459
+ }
1460
+ }
1419
1461
  async performSiteRefresh() {
1420
1462
  // Any one live dashboard site token identifies the account. OAuth
1421
1463
  // per-site tokens (rsp_at_) are not account-wide and are skipped.
@@ -1431,6 +1473,11 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
1431
1473
  // retry the loop on every single list_sites call.
1432
1474
  this.lastSiteRefreshAt = Date.now();
1433
1475
  if (!token) {
1476
+ // Returning 0 here used to be indistinguishable from "checked, nothing
1477
+ // new". On an OAuth-only or hand-edited config that silence is permanent:
1478
+ // the list can never grow and nothing ever says why. Record it so
1479
+ // list_sites can explain instead of just looking wrong.
1480
+ this.lastSiteRefreshStatus = 'no_account_token';
1434
1481
  return 0;
1435
1482
  }
1436
1483
  const apiBase = process.env.RESPIRA_API_BASE || 'https://www.respira.press';
@@ -1445,18 +1492,24 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
1445
1492
  signal: AbortSignal.timeout(timeoutMs),
1446
1493
  });
1447
1494
  if (!response.ok) {
1495
+ this.lastSiteRefreshStatus = 'backend_error';
1448
1496
  return 0;
1449
1497
  }
1450
1498
  payload = await response.json();
1451
1499
  }
1452
1500
  catch {
1501
+ this.lastSiteRefreshStatus = 'unreachable';
1453
1502
  // Offline / proxy / firewall / timeout: never block list_sites on this.
1454
1503
  return 0;
1455
1504
  }
1456
1505
  const sites = payload?.config?.sites;
1457
1506
  if (!Array.isArray(sites)) {
1507
+ this.lastSiteRefreshStatus = 'backend_error';
1458
1508
  return 0;
1459
1509
  }
1510
+ // Reached the account inventory. Anything not added past this point is
1511
+ // genuinely "nothing new", which is a different thing from "could not look".
1512
+ this.lastSiteRefreshStatus = 'ok';
1460
1513
  const knownUrls = new Set();
1461
1514
  for (const client of this.sites.values()) {
1462
1515
  knownUrls.add(this.normalizeSiteUrl(client.getSiteUrl()));
@@ -1876,12 +1929,20 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
1876
1929
  if (!update) {
1877
1930
  return result;
1878
1931
  }
1932
+ // Lead with what this build is missing, not with the fact that a number
1933
+ // changed. A customer on 7.1.2 received the old generic sentence on every
1934
+ // call for weeks while fighting a bug that a newer build had already fixed,
1935
+ // and neither she nor her AI had any reason to connect the two.
1936
+ const message = update.missingFixes.length > 0
1937
+ ? `This MCP build (${update.currentVersion}) is behind ${update.latestVersion} and is missing behaviour you may be working around right now: ${update.missingFixes.join(' ')} Update with: npm i -g @respira/wordpress-mcp-server@latest`
1938
+ : `A newer MCP version is available (${update.currentVersion} -> ${update.latestVersion}). Please update your local MCP package.`;
1879
1939
  const noticePayload = {
1880
1940
  package: update.packageName,
1881
1941
  current_version: update.currentVersion,
1882
1942
  latest_version: update.latestVersion,
1883
1943
  checked_at: update.checkedAt,
1884
- message: `A newer MCP version is available (${update.currentVersion} -> ${update.latestVersion}). Please update your local MCP package.`,
1944
+ ...(update.missingFixes.length > 0 ? { missing_fixes: update.missingFixes } : {}),
1945
+ message,
1885
1946
  upgrade_command: 'npm i -g @respira/wordpress-mcp-server@latest',
1886
1947
  rerun_setup_command: 'npx @respira/wordpress-mcp-server --setup',
1887
1948
  };
@@ -2350,7 +2411,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2350
2411
  },
2351
2412
  {
2352
2413
  name: 'wordpress_create_theme_builder_template',
2353
- description: 'Create a Divi global header, footer, or body Theme Builder template, with optional page assignments. Snapshot-protected (reversible within a session). Pass structure as a Divi 4 shortcode string, or a Divi 5 block/node array. Works on Divi 4 and Divi 5.',
2414
+ description: 'Create a Divi global header, footer, or body Theme Builder template. WHERE IT APPLIES IS NEVER GUESSED: omit `assignments` and the template is created UNASSIGNED, so nothing on the site renders it until someone assigns it (in Divi > Theme Builder, or by re-sending with assignments). Site-wide happens only when you pass {"all_pages": true}, and if that would fill an empty slot on the site\'s existing default Theme Builder template the first call is refused with respira_tb_default_slot_confirmation_required until you re-send with confirm_live_edit=true. The response states `scope` (unassigned / conditional / site_wide) and returns rollback.snapshot_uuid for restore_snapshot. Pass structure as a Divi 4 shortcode string, or a Divi 5 block/node array. Works on Divi 4 and Divi 5.',
2354
2415
  inputSchema: {
2355
2416
  type: 'object',
2356
2417
  properties: {
@@ -2358,9 +2419,13 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2358
2419
  name: { type: 'string', description: 'Template name.' },
2359
2420
  assignments: {
2360
2421
  type: 'object',
2361
- description: 'Where it applies. {"all_pages": true} for site-wide, or {"post_types": ["page"], "excluded_ids": [12, 34]}.',
2422
+ description: 'Where it applies. Omit for unassigned (safe: renders nowhere). {"all_pages": true} for site-wide. {"post_types": ["page"], "excluded_ids": [12, 34]} for conditional. Those three keys are the whole vocabulary; anything else is refused by name. Divi\'s Theme Builder UI also supports taxonomy and post-type archive conditions, author/date/search archives and singular ids, which this tool cannot express yet: set those by hand in Divi > Theme Builder, then fill the layout with wordpress_update_theme_builder_template using the layout_id from wordpress_list_theme_builder_templates.',
2362
2423
  },
2363
2424
  structure: { description: 'Divi 4 shortcode string, or a Divi 5 block/node array.' },
2425
+ confirm_live_edit: {
2426
+ type: 'boolean',
2427
+ description: 'Only needed for a site-wide assignment that fills an empty slot on the site\'s existing default Theme Builder template. Set true to acknowledge that every page on the site starts rendering this layout immediately (for kind "body", instead of its own content). Tell the user what is about to change before setting it.',
2428
+ },
2364
2429
  },
2365
2430
  required: ['kind', 'name'],
2366
2431
  },
@@ -2521,7 +2586,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2521
2586
  },
2522
2587
  {
2523
2588
  name: 'wordpress_delete_post',
2524
- description: 'Delete a post. IMPORTANT: By default, this only works on Respira-created duplicates. The force parameter only works if "Allow Direct Editing" is enabled in Respira settings (disabled by default for safety).\n\nApproval flow: destructive — the first call may return `code: respira_approval_required` with `data.approval_request.approval_token`. Pass that token back via the `approval_token` param on the next call to complete the delete.',
2589
+ description: 'Delete a post. IMPORTANT: By default, this only works on Respira-created duplicates. To delete an original: pass `force=true` AND `confirm_live_edit=true`. The "Allow Direct Editing" setting in Respira must also be enabled (disabled by default for safety).\n\nApproval flow: destructive — the FIRST call returns `code: respira_approval_required` with `data.approval_request.approval_token`, and deletes nothing. Pass that exact token back via the `approval_token` param on the next call to complete the delete. Deleting a Respira-created duplicate still takes both calls; the approval gate runs before the duplicate check.\n\nFixed in 8.3.7 (ticket 429299b5): this tool used to discard the response body, so the approval token, the refusal reason and the success flag were all invisible and every call looked like an empty response. It now always returns the site\'s answer.',
2525
2590
  inputSchema: {
2526
2591
  type: 'object',
2527
2592
  properties: {
@@ -2531,11 +2596,15 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2531
2596
  },
2532
2597
  force: {
2533
2598
  type: 'boolean',
2534
- description: 'Force delete even if not a duplicate',
2599
+ description: 'Force delete even if not a duplicate. Requires confirm_live_edit=true.',
2600
+ },
2601
+ confirm_live_edit: {
2602
+ type: 'boolean',
2603
+ description: 'Operator confirmation that a force-delete of an original post is intended. The plugin has always required this alongside force=true; before 8.3.7 the delete_post schema did not expose it, and the error asking for it was thrown away with the rest of the response body.',
2535
2604
  },
2536
2605
  approval_token: {
2537
2606
  type: 'string',
2538
- description: 'One-time token from a prior respira_approval_required response. Omit on the first call; the tool will reject with a token if approval is required, then re-call with this parameter set to that token to confirm and execute.',
2607
+ description: 'Approval token from a prior respira_approval_required response (data.approval_request.approval_token). Omit on the first call; re-call with this parameter set to that exact token to confirm and execute. The token is bound to this tool and expires after 10 minutes.',
2539
2608
  },
2540
2609
  },
2541
2610
  required: ['id'],
@@ -3514,7 +3583,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
3514
3583
  properties: {
3515
3584
  identifier: {
3516
3585
  type: 'object',
3517
- description: 'Element identifier. Provide exactly one of id / admin_label / path / type. match_content disambiguates duplicates of the same type.',
3586
+ description: 'Element identifier. Provide exactly one of id / admin_label / path / type. match_content disambiguates duplicates of the same type. `path` accepts both dialects: the index form respira_find_element emits ("1.0.1") and the key-interleaved form ("1.children.0.children.1"). They name the same element.',
3518
3587
  properties: {
3519
3588
  id: { type: 'string', description: 'Builder element ID (Divi 5 _nodeId, Elementor element id, Bricks id, etc).' },
3520
3589
  admin_label: { type: 'string', description: 'Admin label / navigator label.' },
@@ -7466,6 +7535,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
7466
7535
  // started shows up here without a reinstall or re-paste (throttled,
7467
7536
  // best-effort, never throws).
7468
7537
  await this.maybeSelfHealSiteList();
7538
+ const refreshNotice = this.describeSiteRefreshStatus();
7469
7539
  const allSites = Array.from(this.sites.values());
7470
7540
  const visibleSites = allSites.filter((site) => this.isSiteAllowed(site));
7471
7541
  // v6.17.2: surface hidden sites so the AI can explain
@@ -7484,6 +7554,11 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
7484
7554
  filter_note: `${hiddenSites.length} site${hiddenSites.length === 1 ? '' : 's'} hidden by RESPIRA_SITES env var (allow-list: ${this.allowedSites ? [...this.allowedSites].join(', ') : 'none'}). To show, remove or update RESPIRA_SITES in claude_desktop_config.json.`,
7485
7555
  }
7486
7556
  : {}),
7557
+ // Present only when the list could NOT be confirmed against the
7558
+ // account. "A site I just added is missing" and "the refresh never
7559
+ // ran" look identical without this, and the user is left concluding
7560
+ // the connector is broken when it simply never looked.
7561
+ ...(refreshNotice ? { site_refresh: refreshNotice } : {}),
7487
7562
  };
7488
7563
  }
7489
7564
  case 'wordpress_get_active_site':
@@ -7576,6 +7651,8 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
7576
7651
  name: args.name,
7577
7652
  assignments: args.assignments ?? null,
7578
7653
  structure: args.structure ?? null,
7654
+ // Same three spellings the plugin normalises for the update tool.
7655
+ confirm_live_edit: args.confirm_live_edit ?? args.confirmLiveEdit ?? args.confirmed,
7579
7656
  });
7580
7657
  case 'wordpress_update_theme_builder_template':
7581
7658
  return await client.updateThemeBuilderTemplate({
@@ -7616,7 +7693,11 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
7616
7693
  };
7617
7694
  }
7618
7695
  case 'wordpress_delete_post':
7619
- return await client.deletePost(args.id, args.force, args.approval_token);
7696
+ // Ticket 429299b5: `deletePost` used to be `Promise<void>`, so this
7697
+ // `return` handed `undefined` to withSiteContext and the agent got a
7698
+ // bare `{"site":{...}}` — approval token, refusal reason and success
7699
+ // flag all thrown away. The client now returns the plugin body.
7700
+ return await client.deletePost(args.id, args.force, args.approval_token, args.confirm_live_edit);
7620
7701
  case 'wordpress_list_media':
7621
7702
  return await client.listMedia(args);
7622
7703
  case 'wordpress_upload_media': {
@@ -7996,7 +8077,13 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
7996
8077
  case 'wordpress_update_media_batch':
7997
8078
  return await client.updateMediaBatch(args.items);
7998
8079
  case 'wordpress_delete_media':
7999
- return await client.deleteMedia(args.id);
8080
+ // Ticket 429299b5 (second defect): this line used to be
8081
+ // `client.deleteMedia(args.id)`. The schema advertises `force` and
8082
+ // `approval_token`, the client method forwards both, but the token
8083
+ // died here — so the plugin saw a fresh first call every time and
8084
+ // minted a new token forever. Ticket 927aa7ed fixed the client method
8085
+ // and tested the client method; the dispatcher was the broken link.
8086
+ return await client.deleteMedia(args.id, args.force, args.approval_token);
8000
8087
  // Menu Management
8001
8088
  case 'wordpress_list_menus':
8002
8089
  return await client.listMenus();
@@ -8580,13 +8667,13 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8580
8667
  post_id: { type: 'number', description: 'Page/post ID' },
8581
8668
  identifier_type: {
8582
8669
  type: 'string',
8583
- description: 'How to find the element',
8584
- enum: ['id', 'type', 'class', 'content', 'uncode_shortcode_id'],
8670
+ description: 'How to find the element. "path" takes an index path such as "1.0.1" (the `path_string` this tool returns) and names exactly one element.',
8671
+ enum: ['id', 'type', 'admin_label', 'class', 'content', 'text', 'path', 'uncode_shortcode_id'],
8585
8672
  },
8586
8673
  identifier_value: { type: 'string', description: 'Value to search for' },
8587
8674
  match_content: {
8588
8675
  type: 'string',
8589
- description: 'Optional text content to narrow results when searching by type/class',
8676
+ description: 'Optional text to narrow the result set to elements whose own text or attribute values contain it. Works for every identifier_type. It separates siblings; it cannot separate an element from an ancestor that contains it, so use identifier_type "path" when you need certainty.',
8590
8677
  },
8591
8678
  },
8592
8679
  required: ['post_id', 'identifier_type', 'identifier_value'],
@@ -8602,7 +8689,8 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8602
8689
  post_id: { type: 'number', description: 'Page/post ID' },
8603
8690
  identifier_type: {
8604
8691
  type: 'string',
8605
- enum: ['id', 'type', 'class', 'content', 'uncode_shortcode_id'],
8692
+ enum: ['id', 'type', 'admin_label', 'class', 'content', 'text', 'path', 'uncode_shortcode_id'],
8693
+ description: 'How to locate the element. Accepts everything respira_find_element accepts, so any identifier it returns works here as-is. "path" takes a find_element `path_string` (e.g. "1.0.1"), names exactly one element, and is the reliable answer to a 422 respira_ambiguous_target.',
8606
8694
  },
8607
8695
  identifier_value: { type: 'string', description: 'Value to match' },
8608
8696
  updates: {
@@ -8616,6 +8704,10 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8616
8704
  },
8617
8705
  },
8618
8706
  },
8707
+ match_content: {
8708
+ type: 'string',
8709
+ description: 'Narrows a set of elements sharing identifier_type/identifier_value down to the ones whose own text or attribute values contain this string (e.g. two buttons of the same type, one saying "Buy"). It separates siblings; it cannot separate an element from an ancestor, since an ancestor contains its children\'s text. For that case use identifier_type "path".',
8710
+ },
8619
8711
  edit_target: {
8620
8712
  type: 'string',
8621
8713
  enum: ['live', 'duplicate'],
@@ -8633,7 +8725,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8633
8725
  on_ambiguous_match: {
8634
8726
  type: 'string',
8635
8727
  enum: ['reject', 'first'],
8636
- description: 'What to do when identifier_type/identifier_value match more than one element and match_content does not narrow it to exactly one. Default "reject" refuses the write with a 422 respira_ambiguous_target error and a candidate list, because guessing has silently edited the wrong element before. Pass "first" only when that is genuinely what you want: it means accepting whichever matching element comes first in document order, with no further confirmation.',
8728
+ description: 'What to do when identifier_type/identifier_value match more than one element and match_content does not narrow it to exactly one. Default "reject" refuses the write with a 422 respira_ambiguous_target error and a candidate list, because guessing has silently edited the wrong element before. "first" accepts whichever element respira_find_element resolves for this identifier. It does NOT mean the outermost match: for content and text lookups the resolver deliberately returns the DEEPEST (innermost) match, so the edit lands on the leaf module, not the section wrapping it; for other identifier types it is the first in document order. The 422 also returns `candidate_paths` — re-sending with identifier_type "path" and one of those values picks an exact element instead of accepting a default.',
8637
8729
  },
8638
8730
  },
8639
8731
  required: ['post_id', 'identifier_type', 'identifier_value', 'updates'],
@@ -8728,13 +8820,17 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8728
8820
  post_id: { type: 'number', description: 'Page/post ID' },
8729
8821
  identifier_type: {
8730
8822
  type: 'string',
8731
- enum: ['id', 'css_class', 'text', 'widget_type', 'global_id'],
8732
- description: 'How to locate the element: "id" (element ID), "css_class" (CSS class name), "text" (visible text content), "widget_type" (widget/module type), or "global_id" (cross-page global element ID).',
8823
+ enum: ['id', 'css_class', 'text', 'widget_type', 'global_id', 'type', 'admin_label', 'content', 'class', 'path'],
8824
+ description: 'How to locate the element: "id" (element ID), "css_class"/"class" (CSS class name), "text"/"content" (visible text content), "widget_type"/"type" (widget/module type), "admin_label", "global_id" (cross-page global element ID), or "path" (the `path_string` respira_find_element returns, e.g. "1.0.1", which names exactly one element and is the reliable answer to a 422 respira_ambiguous_target).',
8733
8825
  },
8734
8826
  identifier_value: {
8735
8827
  type: 'string',
8736
8828
  description: 'Value matching the chosen identifier_type (e.g. the element ID, the class name, the text to match).',
8737
8829
  },
8830
+ match_content: {
8831
+ type: 'string',
8832
+ description: 'Narrows a set of elements sharing identifier_type/identifier_value down to the ones whose own text or attribute values contain this string. It separates siblings; it cannot separate an element from an ancestor that contains it. For that case use identifier_type "path".',
8833
+ },
8738
8834
  edit_target: {
8739
8835
  type: 'string',
8740
8836
  enum: ['live', 'duplicate'],
@@ -8752,7 +8848,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8752
8848
  on_ambiguous_match: {
8753
8849
  type: 'string',
8754
8850
  enum: ['reject', 'first'],
8755
- description: 'What to do when identifier_type/identifier_value match more than one element and match_content does not narrow it to exactly one. Default "reject" refuses the removal with a 422 respira_ambiguous_target error and a candidate list, because guessing has silently deleted the wrong element before. Pass "first" only when that is genuinely what you want: it means removing whichever matching element comes first in document order, with no further confirmation.',
8851
+ description: 'What to do when identifier_type/identifier_value match more than one element and match_content does not narrow it to exactly one. Default "reject" refuses the removal with a 422 respira_ambiguous_target error and a candidate list, because guessing has silently deleted the wrong element before. "first" removes whichever element respira_find_element resolves for this identifier. It does NOT mean the outermost match: for content and text lookups the resolver deliberately returns the DEEPEST (innermost) match, so the removal takes the leaf module, not the section wrapping it; for other identifier types it is the first in document order. The 422 also returns `candidate_paths` — re-sending with identifier_type "path" and one of those values picks an exact element instead of accepting a default.',
8756
8852
  },
8757
8853
  },
8758
8854
  required: ['post_id', 'identifier_type', 'identifier_value'],
@@ -8886,7 +8982,7 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8886
8982
  },
8887
8983
  {
8888
8984
  name: 'wordpress_bulk_pages_operation',
8889
- description: 'Apply an operation across up to 100 pages. Supports strip_inline_styles, find_and_replace, and custom operations. Each page gets a snapshot for rollback. Rate limited to 3/hr.\n\nApproval flow: destructive — the first call may return `code: respira_approval_required` with `data.approval_request.approval_token`. Pass that token back via the `approval_token` param on the next call to complete the operation.',
8985
+ description: 'Apply an operation across up to 100 pages. Supports strip_inline_styles, find_and_replace, and custom operations. Each page gets a snapshot for rollback.\n\nRate limit: 20 write runs per hour per API key. Dry runs (`options.dry_run: true`) are NOT counted, so preview freely. find_and_replace also accepts an ARRAY of needles in one call — `find: ["a","b"], replace: ["x","y"]` (paired) or `find: ["a","b"], replace: "x"` (one replacement for all) — so a batch of rewrites costs one run instead of one each.\n\nApproval flow: destructive — the first call may return `code: respira_approval_required` with `data.approval_request.approval_token`. Pass that token back via the `approval_token` param on the next call to complete the operation.',
8890
8986
  inputSchema: {
8891
8987
  type: 'object',
8892
8988
  properties: {
@@ -8897,11 +8993,11 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
8897
8993
  },
8898
8994
  operation: {
8899
8995
  type: 'object',
8900
- description: 'Operation to apply: {type: "strip_inline_styles"|"find_and_replace"|"custom", options: {...}}',
8996
+ description: 'Operation to apply: {type: "strip_inline_styles"|"find_and_replace"|"custom", options: {...}}. For find_and_replace: options.find is a string OR an array of strings; options.replace is a string (applied to every needle) OR an array of the same length as find; options.regex treats every find entry as a pattern. A mismatched pair, an object, or a non-string entry is refused with a 400 before any page is touched.',
8901
8997
  },
8902
8998
  options: {
8903
8999
  type: 'object',
8904
- description: 'Execution options: {dry_run: boolean}',
9000
+ description: 'Execution options: {dry_run: boolean}. dry_run previews every page without writing, without taking a snapshot, and without spending a rate-limited run.',
8905
9001
  },
8906
9002
  approval_token: {
8907
9003
  type: 'string',