Skip to main content
Glama
vuluu2k

WebCake Storefront MCP

by vuluu2k

update_global_source_element

Update a single element in a global source by previewing changes first, then applying after user confirmation; merges styles, configs, and event arrays.

Instructions

Update a single element within a global source. Two-step process: STEP 1: Call with dry_run=true (default) → returns diff of what will change. STEP 2: Show the diff to the user and ask for confirmation. NEVER proceed without explicit user approval. STEP 3: Only after user confirms, call again with dry_run=false to apply. IMPORTANT: You MUST show the diff to the user and get explicit "yes/ok/confirm" before calling with dry_run=false. Skipping confirmation risks data loss. Merge rules: style/config/specials = shallow merge, responsive = merge by bp key. events/bindings = REPLACE the whole array — pass the COMPLETE list (read it first); entries are auto-normalized (id + eventName filled in).

Input Schema

NameRequiredDescriptionDefault
styleNoCSS style properties to merge
configNoConfig properties to merge
eventsNoComplete events array (replaces existing)
dry_runNoPreview only (true) or apply changes (false). Defaults to confirm_mode setting. Use toggle_confirm_mode to change default.
bindingsNoComplete bindings array (replaces existing)
specialsNoSpecials to merge (text, custom_class, custom_css)
componentNoComponent hint for faster lookup
element_idYesElement ID to update (e.g. 'TEXT-3', 'BUTTON-1')
responsiveNoResponsive overrides (e.g. {bp1: {style: {...}}})
global_source_idYesGlobal source ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.31.8

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only supply readOnlyHint=false, so the description carries the rest and delivers well beyond it: mandatory dry-run-first workflow, confirmation requirement, data-loss risk if skipped, and explicit merge-vs-replace semantics for each field group. This is exactly the behavioral context an agent needs before invoking a destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and clearly structured with STEP markers and a merge-rules block. Slightly redundant in places — 'NEVER proceed without explicit user approval' and the IMPORTANT warning restate the same confirmation requirement — but the emphasis is warranted given the data-loss risk.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no output schema, the description covers the workflow, the return of STEP 1 (a diff), the confirmation gate, and the merge/replace rules for all the tricky object-array parameters. An agent has everything needed to call it safely in the correct order.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline would be 3, but the description adds non-obvious semantics the schema does not: style/config/specials shallow merge, responsive merges by bp key, and events/bindings fully REPLACE the array (requiring the complete list, auto-normalized with id + eventName). These are genuine per-parameter behaviors beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Update a single element within a global source.' The word 'single' implicitly distinguishes it from the plural sibling update_global_source_elements, but it never names that sibling explicitly, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives very explicit procedural guidance: dry_run first, show diff, confirm, then apply with dry_run=false. This is strong when-to-use context. However, it does not name alternatives (e.g., update_global_source_elements for batch edits, or update_global_source for the source itself), so the routing against sibling tools is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools