@seldonframe/mcp 1.10.0 → 1.11.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 (3) hide show
  1. package/package.json +3 -1
  2. package/src/tools.js +191 -15
  3. package/src/welcome.js +25 -10
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@seldonframe/mcp",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
+ "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.11.0: STRUCTURAL PRIMITIVES — three new tools that cut landing-page restructuring time from minutes to seconds, with index-based addressing that handles duplicate section types. WHY: v1.10's reorder_landing_sections used type-based addressing ('hero', 'services-grid', 'faq', ...) which breaks when types repeat (smoke test 2026-05-05: a workspace had two 'services-grid' sections — one grid-3 services, one stats — and the reorder API correctly refused as ambiguous, but the agent had no way to disambiguate without fetching + PowerShell-parsing landing_pages.blueprintJson, which took 8+ minutes). WHAT SHIPS: (1) get_landing_structure({workspace_id}) — returns ordered sections with index (0..N-1) + type + 1-line preview ('Vancouver's Trusted HVAC Family — Same-Day Service' for hero, '3 services (grid-3)' vs 'stats — 4 numbers' for services-grid duplicates). Cheap one-DB-read. Replaces the v1.10 fetch-and-parse workflow. (2) move_section({workspace_id, from_index, to_index}) — atomic single-section move with splice semantics (section at from_index is removed, then inserted at to_index in the result). Handles duplicate types because index is unambiguous. Existing reorder_landing_sections stays as the bulk path for clean cases. (3) delete_section({workspace_id, index}) — atomic single-section remove. Refuses to leave 0 sections (minimum is 1). Use to clean up unintended duplicates from v2 generation artifacts. (4) 22 new unit tests covering applyMove (forward / backward / no-op / immutability / out-of-range), applyDelete (boundary indices / minimum-1-section guard / immutability), and derivePreview (each section type emits a useful 1-liner; services-grid grid-3 vs stats are distinguishable; long text truncates). DESIGN PRINCIPLES: thin harness (server only does mechanical reorder/delete + re-render; no LLM judgment), fat skill (agent's LLM picks WHICH section based on operator intent + preview text), antifragile (as LLMs improve at intent-mapping, output quality rises with zero harness changes). Test count: 2407 (was 2385). Time-to-restructure: 8 min → ~3 sec. NO migrations, NO env vars, NO new deps. Backward compatible. v1.12 candidate: add_section + new section primitives (comparison block, pricing-table, gallery) — separate larger work.",
5
+ "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.10.1: HOTFIX — upload_workspace_image now accepts image_url + local_file_path, eliminating the agent-side base64 round-trip that v1.10.0 forced. WHY: v1.10.0's image_data_b64-only design made the agent base64-encode bytes into the JSON tool argument; the encoded string had to fit in the agent's tool-input token budget (~16 KB base64 ≈ ~12 KB raw). A 100 KB logo forced the agent into manual resize loops (verified 2026-05-05 smoke test: 7m 31s for one Cloudinary URL upload — 4 resize iterations before bytes fit). WHAT SHIPS: (1) image_url body field — SF backend fetches the URL directly via fetch + streamed read with running byte counter (5 MB cap, 5s timeout). SSRF guards: HTTPS-only, loopback / RFC1918 private / link-local IPv4 (incl. 169.254.169.254 cloud metadata) / IPv6 ::1 rejected. file_name + content_type auto-derived from URL path extension; falls back to response Content-Type header for extensionless URLs. (2) local_file_path MCP-client branch — reads the file in the npm-package process (which runs on the operator's machine, no agent token budget involved), base64-encodes for transport to the SF backend. file_name + content_type auto-derived from path extension. (3) image_data_b64 unchanged — kept as a backward-compatible fallback for callers that already have bytes in hand. (4) Tool descriptor explicitly ranks the three sources (image_url > local_file_path > image_data_b64) so the agent picks correctly. (5) 18 new unit tests covering URL validation (HTTPS-only enforcement, loopback / RFC1918 / link-local rejection, public IPv4 acceptance, malformed URL rejection), content-type derivation from URL extension (handles query strings), and file-name basename extraction. Test count: 2385 (was 2367). Time-to-upload-a-logo: ~7 min → ~3 sec (>99% reduction). NO migrations, NO new env vars, NO new dependencies. Backward compatible.",
4
6
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.10.0: TIER 2 CUSTOMIZE TOOLS — three new operator-driven block-customization tools that respect the thin-harness/fat-skill principle (server only assembles + persists; the IDE agent's LLM does all creative work, so quality compounds as models improve with zero MCP changes). (1) regenerate_block({ workspace_id, block_name, new_instructions? }) — bundles current_props + workspace_summary (business name, industry, services, voice from organizations.soul) + brain_patterns (cross-workspace patterns for this vertical) + customization_history + the operator's new_instructions, returns next_step prose telling the agent: fetch SKILL.md, generate new props, call persist_block with customization: { prompt: <new_instructions> }. Handles first_generation (block never persisted) AND regenerate (iterate from current_props) cases with the same flow. New endpoint GET /api/v1/workspace/v2/blocks/[name]/regenerate. (2) reorder_landing_sections({ workspace_id, new_order: string[] }) — purely mechanical reorder of Blueprint.landing.sections; new_order is the full ordered array of section types ([\"hero\", \"services-grid\", \"about\", \"mid-cta\", \"faq\"]); validates the multiset matches current sections (no add/remove); rejects empty new_order, duplicates, missing types, unknown types. New endpoint POST /api/v1/workspace/v2/landing/reorder. Operator says \"move FAQ to bottom\" → agent computes new_order → server reorders + re-renders. (3) upload_workspace_image({ workspace_id, slot, file_name, content_type, image_data_b64 }) — uploads a base64-encoded image to Vercel Blob and applies the URL to one of two slots: 'logo' (organizations.theme.logoUrl, surfaces in header/footer/og-image) or 'hero_background' (Blueprint.landing.sections[hero].imageUrl + landing re-render). 5 MB max, allowed types image/png|jpeg|webp|svg+xml|gif. Sanitized blob path with random uuid suffix so re-uploads don't overwrite previous URLs. New endpoint POST /api/v1/workspace/v2/images. WHAT SHIPS BESIDES THE TOOLS: 22 new unit tests (6 regenerate context assembly, 6 reorder validation, 11 upload validation + path sanitization). Pure-function-first design — DB integration left for the v1.10+ harness; what's tested here is the security-relevant + correctness-relevant logic that lives outside any DB. Test count: 2366 (was 2344; +22). NO migrations, NO env vars, NO new dependencies (Vercel Blob already used for portal documents). Backend redeploy auto-triggers via main-branch push. v1.11+ candidates: customize_theme advanced presets (palette generation from logo / industry-aware mood), additional image slots (og_image, gallery), section delete/insert (currently reorder is the only structural change supported).",
5
7
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.9.0: BEHAVIORAL CONTRACT TESTS — kills the handler-execution-state-drift bug class structurally. Three bugs in 7 days hit the same shape: a server-side function `throw new Error()`s for an edge user/workspace state (no users row, no Stripe customer, free tier, empty form_fields), and the throw cascades through the SSR boundary as 'This page couldn't load.' WHAT SHIPS: (1) static analysis test (tests/unit/contract-no-uncaught-throws.spec.ts) that scans designated directories — lib/billing/**, lib/auth/**, lib/page-blocks/persist.ts, app/(dashboard)/** — for `throw new Error()` patterns. Every throw must EITHER be wrapped in try/catch OR carry a `// contract:throw-ok: <reason>` annotation. CI fails if any throw is unannotated. (2) 34 existing throws audited and annotated with semantic reasons (Stripe API errors, programmer-error sentinels, deployment config, form-submit error UX, etc.). Going forward, every NEW throw added to scoped directories must be annotated explicitly. (3) Behavioral runtime test (tests/unit/contract-booking-form-fields.spec.ts) for the v1.4.2 bug: 5 tests asserting mergeBookingFormFields always prepends standard fullName + email regardless of LLM input — preserves order, dedupes redundant LLM-supplied standards, sets required=true. mergeBookingFormFields exported from lib/page-blocks/persist.ts for testability. (4) docs/CONTRACTS.md documenting the rule, annotation pattern, scoped directories, when NOT to throw, how to add a new contract test. The MCP package itself didn't change in v1.9.0 — version bumps coupled with backend so they redeploy together. Test count: 2344 (was 2338; +1 static check + 5 booking contract tests). v1.10 candidate: integration test harness so we can write contract tests for the v1.7.3 + v1.8.1 fixes (currently documented in CONTRACTS.md but not yet runtime-asserted).",
6
8
  "description": "MCP server for SeldonFrame — AI-native Business OS platform. v1.8.1: HOTFIX for /settings/billing crashing when free-tier users click 'Manage subscription'. createBillingPortalSessionAction threw 'No Stripe customer is associated with this account' when the user had never completed a Stripe checkout — the throw cascaded through the SSR boundary and produced 'This page couldn't load — A server error occurred'. Two-layer fix: (1) UI conditionally hides 'Manage subscription' button for free tier, shows 'Upgrade' link instead. Free-tier operators see the right CTA. (2) The action gracefully redirects to /settings/billing?upgrade=needed instead of throwing — defense in depth in case a stale page state, direct form POST, or admin-token edge case still hits the action with no customer. New banner on /settings/billing surfaces the redirect reason ('No active subscription to manage yet — upgrade to manage'). No code changes to the MCP package itself; version bump is coupled with the backend redeploy.",
package/src/tools.js CHANGED
@@ -20,6 +20,13 @@ import {
20
20
  // drafts assumed VERSION leaked in via client.js's transitive import;
21
21
  // it doesn't. Direct import = no runtime "VERSION is not defined".
22
22
  import { FIRST_CALL_BANNER, VERSION } from "./welcome.js";
23
+ // v1.10.1 — upload_workspace_image local_file_path branch reads the file
24
+ // directly in the MCP-client process (which runs on the operator's
25
+ // machine via the npm package). Reading + base64-encoding here means
26
+ // the agent's tool-call body stays small (just a path string), bypassing
27
+ // the agent token budget that v1.10.0's image_data_b64 path was bound by.
28
+ import { readFileSync } from "node:fs";
29
+ import path from "node:path";
23
30
 
24
31
  const str = (description, extra = {}) => ({ type: "string", description, ...extra });
25
32
  const obj = (properties, required = []) => ({
@@ -2716,6 +2723,92 @@ export const TOOLS = [
2716
2723
  },
2717
2724
  },
2718
2725
 
2726
+ {
2727
+ name: "get_landing_structure",
2728
+ description:
2729
+ "Read the workspace's landing-page section list with INDEX as the addressing primitive. Returns each section's index (0..N-1, top-to-bottom on the rendered page), type ('hero', 'services-grid', 'about', 'faq', 'mid-cta', 'trust-strip', 'footer', etc.), and a 1-line preview ('Vancouver's Trusted HVAC Family — Same-Day Service' for hero, '3 services (grid-3)' vs 'stats — 4 numbers' for services-grid duplicates). " +
2730
+ "Use this BEFORE move_section / delete_section so you know which index to target. The preview disambiguates duplicate types (e.g. when a workspace has TWO services-grid sections — one with services, one with stats). " +
2731
+ "v1.11+ replaces the v1.10 workflow where the agent had to fetch landing_pages.blueprintJson manually and parse it client-side. Cheap server-side (one DB read).",
2732
+ inputSchema: obj(
2733
+ { workspace_id: str("Workspace id.") },
2734
+ ["workspace_id"],
2735
+ ),
2736
+ handler: async (args) => {
2737
+ const ws = args.workspace_id;
2738
+ const result = await api("GET", "/workspace/v2/landing/structure", {
2739
+ workspace_id: ws,
2740
+ });
2741
+ return result;
2742
+ },
2743
+ },
2744
+
2745
+ {
2746
+ name: "move_section",
2747
+ description:
2748
+ "Move ONE landing-page section atomically. Identifies sections by INDEX (run get_landing_structure first to find which index to move). Splice semantics: the section at from_index is removed, then inserted at to_index in the resulting array — so to_index is the section's NEW position in the result. " +
2749
+ "Examples: 'put hero below FAQ' → from_index=<hero index>, to_index=<faq's current index>. 'Move services to the top' → from_index=<services index>, to_index=0. " +
2750
+ "Handles duplicate types correctly (the case reorder_landing_sections refused) — index identity is unambiguous even when two services-grid or two mid-cta sections exist. " +
2751
+ "Use reorder_landing_sections instead when you want to express the entire new order at once AND types are unique. Use move_section for single-step moves OR when types repeat.",
2752
+ inputSchema: obj(
2753
+ {
2754
+ workspace_id: str("Workspace id."),
2755
+ from_index: {
2756
+ type: "integer",
2757
+ description:
2758
+ "0-based index of the section to move (from the get_landing_structure response).",
2759
+ minimum: 0,
2760
+ },
2761
+ to_index: {
2762
+ type: "integer",
2763
+ description:
2764
+ "0-based index where the section should END UP in the result. Splice semantics — equivalent to: remove from from_index, then insert at to_index.",
2765
+ minimum: 0,
2766
+ },
2767
+ },
2768
+ ["workspace_id", "from_index", "to_index"],
2769
+ ),
2770
+ handler: async (args) => {
2771
+ const ws = args.workspace_id;
2772
+ const result = await api("POST", "/workspace/v2/landing/move-section", {
2773
+ body: {
2774
+ workspace_id: ws,
2775
+ from_index: args.from_index,
2776
+ to_index: args.to_index,
2777
+ },
2778
+ workspace_id: ws,
2779
+ });
2780
+ return result;
2781
+ },
2782
+ },
2783
+
2784
+ {
2785
+ name: "delete_section",
2786
+ description:
2787
+ "Remove ONE landing-page section atomically. Identifies the section by INDEX (run get_landing_structure first). Refuses to leave 0 sections — minimum is 1 — so you can't accidentally wipe the page. " +
2788
+ "Use when the workspace has a duplicate section type (e.g. two services-grid sections, one of which was an unintended generation artifact) and the operator wants the duplicate gone. Disambiguate WHICH duplicate via the preview text from get_landing_structure (e.g. 'stats — 4 numbers' vs '3 services (grid-3)'). " +
2789
+ "For content edits, use update_landing_section. For replacing a section's content, use persist_block. delete_section is structural — it removes the section from the page entirely.",
2790
+ inputSchema: obj(
2791
+ {
2792
+ workspace_id: str("Workspace id."),
2793
+ index: {
2794
+ type: "integer",
2795
+ description:
2796
+ "0-based index of the section to delete (from get_landing_structure response).",
2797
+ minimum: 0,
2798
+ },
2799
+ },
2800
+ ["workspace_id", "index"],
2801
+ ),
2802
+ handler: async (args) => {
2803
+ const ws = args.workspace_id;
2804
+ const result = await api("POST", "/workspace/v2/landing/delete-section", {
2805
+ body: { workspace_id: ws, index: args.index },
2806
+ workspace_id: ws,
2807
+ });
2808
+ return result;
2809
+ },
2810
+ },
2811
+
2719
2812
  {
2720
2813
  name: "reorder_landing_sections",
2721
2814
  description:
@@ -2749,9 +2842,12 @@ export const TOOLS = [
2749
2842
  description:
2750
2843
  "Upload an image to a workspace and apply it to one of two slots: 'logo' (replaces organizations.theme.logoUrl, surfaces in header / footer / og-image / favicon) or 'hero_background' (replaces the hero section's background image and re-renders the landing page). " +
2751
2844
  "Use when the operator says 'use this as my logo', 'replace the hero image with this photo', 'change the header logo'. " +
2752
- "Pass the image bytes as base64 in `image_data_b64`. The MCP server forwards them to Vercel Blob; SSL + CDN are auto-provisioned. Max 5 MB; allowed types: image/png, image/jpeg, image/webp, image/svg+xml, image/gif. " +
2845
+ "PICK ONE source the others are mutually exclusive: " +
2846
+ "(a) `image_url` (PREFERRED, v1.10.1+) — public HTTPS URL to the image. The SF backend fetches it directly. Best path for Cloudinary, Unsplash, S3, or any image already on the web. file_name + content_type are auto-derived from the URL — you don't need to pass them. " +
2847
+ "(b) `local_file_path` (v1.10.1+) — absolute path on the operator's machine. The MCP server (running locally) reads the file and forwards bytes to the backend. Best path for files on the operator's desktop. file_name + content_type derived from the path. " +
2848
+ "(c) `image_data_b64` (legacy v1.10.0) — image bytes base64-encoded. Use only when you've generated bytes yourself (e.g. dynamic image gen) and there's no URL or path. Be aware: the encoded string consumes your tool-call token budget; for files >~12 KB raw, prefer (a) or (b). " +
2849
+ "Max 5 MB across all paths. Allowed types: image/png, image/jpeg, image/webp, image/svg+xml, image/gif. " +
2753
2850
  "Returns the public Blob URL on success; that URL is now live on the workspace's public surface within seconds. " +
2754
- "If the operator gave you a local file path, read it as bytes and base64-encode it before calling this tool. If they gave you a URL, fetch it first then re-upload (we re-host so the asset is on our CDN, not theirs). " +
2755
2851
  "Antifragile design: server only validates file shape + applies URL to the right column. Your LLM picks which slot ('they said logo, that maps to slot=logo'). As you get better at intent-mapping, the harness doesn't change.",
2756
2852
  inputSchema: obj(
2757
2853
  {
@@ -2759,28 +2855,108 @@ export const TOOLS = [
2759
2855
  slot: str(
2760
2856
  "Image slot: 'logo' (workspace logo, used in header/footer/og-image) or 'hero_background' (hero section background image). Other slots may be added in future versions.",
2761
2857
  ),
2762
- file_name: str(
2763
- "Original filename (for the blob path). Sanitized server-side special chars stripped, path traversal blocked.",
2858
+ image_url: str(
2859
+ "Public HTTPS URL to the image. PREFERRED source. SF backend fetches directly (no base64 round-trip). file_name + content_type auto-derived. https:// only; loopback / private / link-local IPs rejected.",
2764
2860
  ),
2765
- content_type: str(
2766
- "MIME type. Must be one of: image/png, image/jpeg, image/webp, image/svg+xml, image/gif.",
2861
+ local_file_path: str(
2862
+ "Absolute path to a file on the operator's machine (the MCP server runs there). MCP reads the file and forwards bytes to the backend. file_name + content_type auto-derived from the path. Use when the operator gives you a local file rather than a URL.",
2767
2863
  ),
2768
2864
  image_data_b64: str(
2769
- "Image bytes, base64-encoded. Max 5 MB after decoding.",
2865
+ "Image bytes, base64-encoded. LEGACY path — prefer image_url or local_file_path because base64 consumes your tool-call token budget. Max 5 MB after decoding.",
2866
+ ),
2867
+ file_name: str(
2868
+ "Optional filename (auto-derived from image_url or local_file_path). REQUIRED with image_data_b64.",
2869
+ ),
2870
+ content_type: str(
2871
+ "Optional MIME type (auto-derived from image_url or local_file_path extension). REQUIRED with image_data_b64. Must be one of: image/png, image/jpeg, image/webp, image/svg+xml, image/gif.",
2770
2872
  ),
2771
2873
  },
2772
- ["workspace_id", "slot", "file_name", "content_type", "image_data_b64"],
2874
+ ["workspace_id", "slot"],
2773
2875
  ),
2774
2876
  handler: async (args) => {
2775
2877
  const ws = args.workspace_id;
2878
+
2879
+ // Resolve to ONE source. Reject ambiguous + missing input early so
2880
+ // the agent gets a clean error rather than a server-side 400.
2881
+ const sourceCount =
2882
+ (args.image_url ? 1 : 0) +
2883
+ (args.local_file_path ? 1 : 0) +
2884
+ (args.image_data_b64 ? 1 : 0);
2885
+ if (sourceCount === 0) {
2886
+ throw new Error(
2887
+ "upload_workspace_image: provide ONE of image_url, local_file_path, or image_data_b64.",
2888
+ );
2889
+ }
2890
+ if (sourceCount > 1) {
2891
+ throw new Error(
2892
+ "upload_workspace_image: provide ONE of image_url, local_file_path, or image_data_b64 — not multiple.",
2893
+ );
2894
+ }
2895
+
2896
+ const body = {
2897
+ workspace_id: ws,
2898
+ slot: args.slot,
2899
+ };
2900
+
2901
+ if (args.image_url) {
2902
+ body.image_url = args.image_url;
2903
+ if (args.file_name) body.file_name = args.file_name;
2904
+ if (args.content_type) body.content_type = args.content_type;
2905
+ } else if (args.local_file_path) {
2906
+ // Read the file in the MCP-client process. Path is absolute (per
2907
+ // the schema). Reject obvious dir-traversal — readFileSync would
2908
+ // succeed on any readable file but operators expect file paths,
2909
+ // not directories.
2910
+ const filePath = args.local_file_path;
2911
+ if (!path.isAbsolute(filePath)) {
2912
+ throw new Error(
2913
+ `upload_workspace_image: local_file_path must be absolute. Got: ${filePath}`,
2914
+ );
2915
+ }
2916
+ let buf;
2917
+ try {
2918
+ buf = readFileSync(filePath);
2919
+ } catch (err) {
2920
+ throw new Error(
2921
+ `upload_workspace_image: failed to read local_file_path "${filePath}" — ${err?.message ?? err}`,
2922
+ );
2923
+ }
2924
+ // Derive file_name + content_type from the path extension, mirroring
2925
+ // the server-side image_url logic so the two paths feel identical
2926
+ // to the operator.
2927
+ const baseName = path.basename(filePath);
2928
+ const ext = path.extname(filePath).toLowerCase().replace(/^\./, "");
2929
+ const extToContentType = {
2930
+ png: "image/png",
2931
+ jpg: "image/jpeg",
2932
+ jpeg: "image/jpeg",
2933
+ gif: "image/gif",
2934
+ webp: "image/webp",
2935
+ svg: "image/svg+xml",
2936
+ };
2937
+ const derivedContentType = extToContentType[ext] ?? null;
2938
+ body.image_data_b64 = buf.toString("base64");
2939
+ body.file_name = args.file_name || baseName;
2940
+ body.content_type = args.content_type || derivedContentType || "";
2941
+ if (!body.content_type) {
2942
+ throw new Error(
2943
+ `upload_workspace_image: could not infer content_type from extension "${ext}" — pass content_type explicitly. Allowed: image/png, image/jpeg, image/webp, image/svg+xml, image/gif.`,
2944
+ );
2945
+ }
2946
+ } else {
2947
+ // image_data_b64 — caller supplied bytes directly.
2948
+ body.image_data_b64 = args.image_data_b64;
2949
+ if (!args.file_name || !args.content_type) {
2950
+ throw new Error(
2951
+ "upload_workspace_image: file_name and content_type are required with image_data_b64. (image_url and local_file_path auto-derive them.)",
2952
+ );
2953
+ }
2954
+ body.file_name = args.file_name;
2955
+ body.content_type = args.content_type;
2956
+ }
2957
+
2776
2958
  const result = await api("POST", "/workspace/v2/images", {
2777
- body: {
2778
- workspace_id: ws,
2779
- slot: args.slot,
2780
- file_name: args.file_name,
2781
- content_type: args.content_type,
2782
- image_data_b64: args.image_data_b64,
2783
- },
2959
+ body,
2784
2960
  workspace_id: ws,
2785
2961
  });
2786
2962
  return result;
package/src/welcome.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // stripped. `create_full_workspace` is the only workspace-creation
9
9
  // path mentioned anywhere in this briefing.
10
10
 
11
- export const VERSION = "1.10.0";
11
+ export const VERSION = "1.11.0";
12
12
 
13
13
  export const WELCOME_MARKDOWN = `# SeldonFrame — create a real Business OS in one conversation
14
14
 
@@ -190,14 +190,29 @@ further natural-language requests ("change the headline to …",
190
190
  block re-generation ("make the hero punchier", "rewrite the FAQ to
191
191
  be less salesy"). Server only assembles context; YOUR LLM does the
192
192
  generation, then call persist_block with \`customization\`.
193
- - **\`reorder_landing_sections\`** (v1.10+) — reorder landing-page
194
- sections without changing content. Pass the full ordered array of
195
- section types; multiset must equal current. For content edits use
196
- update_landing_section; for regeneration use regenerate_block.
197
- - **\`upload_workspace_image\`** (v1.10+) upload a base64-encoded
198
- image to slot=logo (organizations.theme.logoUrl) or
199
- slot=hero_background (Blueprint.landing hero imageUrl + landing
200
- re-render). 5 MB max, image/* MIME types. Vercel Blob auto-CDN.
193
+ - **\`get_landing_structure\`** (v1.11+) — read the workspace's landing
194
+ section list with INDEX as the addressing primitive + 1-line preview
195
+ per section. Use BEFORE move/delete to find the right index;
196
+ preview text disambiguates duplicate types ('3 services' vs
197
+ 'stats4 numbers').
198
+ - **\`move_section\`** (v1.11+) — atomic single-section move by index.
199
+ Splice semantics: from_index → to_index in result. Works even when
200
+ section types repeat (the case reorder_landing_sections refuses).
201
+ - **\`delete_section\`** (v1.11+) — atomic single-section remove by
202
+ index. Refuses to leave 0 sections. Use to clean up unintended
203
+ duplicates.
204
+ - **\`reorder_landing_sections\`** (v1.10+) — bulk reorder by section
205
+ type when types are unique. Pass the full ordered type array. For
206
+ duplicate-type cases use move_section instead.
207
+ - **\`upload_workspace_image\`** (v1.10+, fast path in v1.10.1+) — set
208
+ the workspace logo (slot=logo → organizations.theme.logoUrl) or hero
209
+ background (slot=hero_background → Blueprint.landing hero imageUrl
210
+ + landing re-render). PREFERRED: pass \`image_url\` (HTTPS — server
211
+ fetches directly, no base64) or \`local_file_path\` (absolute path —
212
+ MCP reads the file). Auto-derives file_name + content_type. Legacy:
213
+ \`image_data_b64\` for caller-generated bytes, but base64 consumes
214
+ your tool-call token budget — avoid for files >~12 KB raw. 5 MB max,
215
+ image/png|jpeg|webp|svg+xml|gif. Vercel Blob auto-CDN.
201
216
  - **\`read_brain_path\`** / **\`list_brain_dir\`** — read the workspace's
202
217
  layer-1 brain (notes about THIS workspace's customers, voice, pipeline
203
218
  patterns). Use BEFORE generating blocks; reads tick the note's \`uses\`
@@ -257,4 +272,4 @@ admin dashboard. Pre-fills their email automatically.
257
272
  <https://seldonframe.com> · **Discord:** <https://discord.gg/sbVUu976NW>
258
273
  `;
259
274
 
260
- export const FIRST_CALL_BANNER = `🚀 SeldonFrame v1.10.0 is connected. PREFERRED workspace creation: create_workspace_v2 → IN PARALLEL for all 7 recommended_blocks (hero, services, about, faq, cta, booking, intake): get_block_skill + persist_block → complete_workspace_v2 → finalize_workspace({ workspace_id, email }). The v2 flow puts YOUR LLM in charge of every operator-facing surface using one SKILL.md per block. Each block's prop schema is server-validated. Run blocks in PARALLEL (Promise.all) — sequential takes 60+ seconds. v1.10+ TIER 2 CUSTOMIZE TOOLS: regenerate_block (re-do one block with operator instructions; thin-harness — server bundles context, your LLM generates), reorder_landing_sections (purely mechanical reorder by section type), upload_workspace_image (base64 image Vercel Blobapplied to slot=logo or slot=hero_background). Every URL is real. NEVER create local files. Skipping finalize_workspace leaves the operator with no admin login.`;
275
+ export const FIRST_CALL_BANNER = `🚀 SeldonFrame v1.11.0 is connected. PREFERRED workspace creation: create_workspace_v2 → IN PARALLEL for all 7 recommended_blocks (hero, services, about, faq, cta, booking, intake): get_block_skill + persist_block → complete_workspace_v2 → finalize_workspace({ workspace_id, email }). The v2 flow puts YOUR LLM in charge of every operator-facing surface using one SKILL.md per block. Each block's prop schema is server-validated. Run blocks in PARALLEL (Promise.all) — sequential takes 60+ seconds. v1.10+ TIER 2 CUSTOMIZE TOOLS: regenerate_block (re-do one block with operator instructions; thin-harness — server bundles context, your LLM generates), upload_workspace_image (set logo/hero_background; v1.10.1+ accepts image_url or local_file_path — DON'T base64 unless you have to, the encoded string eats your tool-call token budget). v1.11+ STRUCTURAL PRIMITIVES: get_landing_structure move_section delete_section. INDEX-based, handle duplicate section types, atomic. Use these for "put X below Y" and "delete the duplicate Z" — much simpler than reorder_landing_sections's full-array form (which still works for clean cases). Every URL is real. NEVER create local files. Skipping finalize_workspace leaves the operator with no admin login.`;