Skip to main content
Glama
WebCake Storefront MCP

WebCake Storefront MCP

by vuluu2k

site_code

Read, update, or append custom CSS, JavaScript, head, and body code for an entire WebCake storefront or one page, with validation and native-first safeguards.

Instructions

Custom code, site-wide or for ONE page (native first: refused when an element can do it). Pick the operation with action and pass that action's arguments (help:true returns its full documentation and schema).

  • get_site_custom_code: Get custom code of the site (CSS/JS).

  • update_site_custom_code: Update custom code (CSS/JS) for the entire site.

  • append_site_custom_code: Append or prepend code to a custom code field.

  • get_page_custom_code: Read the custom code of ONE page (CSS / JS / head / body slots in page.settings.custom_code), its budget usage, the element ids and custom classes the code can target on that pa…

  • update_page_custom_code: Save custom code for ONE page — only when the element schema can't do what the user asked (NATIVE FIRST: element → its settings/events/bindings → an app → code).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "site_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoCode to add [append_site_custom_code]
helpNoReturn the action's full documentation and argument schema instead of running it
modeNoreplace (default): set the given slots; append: add after the current code [update_page_custom_code]
fieldNoWhich code field to modify [append_site_custom_code]
actionYesWhich operation to run
fieldsNoOnly return specific fields (e.g. [get_site_custom_code]
dry_runNoValidate and show what would be saved, without saving (default: on in confirm mode) [update_page_custom_code]
page_idNoPage ID (list_pages) [get_page_custom_code, update_page_custom_code]
positionNoAdd to end (append) or beginning (prepend) [append_site_custom_code]
native_gapNoOnly when the code was refused and no native way exists: the need, the elements/apps you checked,… [update_site_custom_code, append_site_custom_code, update_page_custom_code]
allow_shrinkNoAllow removing more than half of a field: set it when native elements or the CMS replaced that co… [update_site_custom_code, update_page_custom_code]
include_guideNoInclude the custom code coding guide (only needed on first call) [get_site_custom_code]
code_custom_cssNoCustom CSS for the site [update_site_custom_code, update_page_custom_code]
code_before_bodyNoHTML/script to insert before </body> [update_site_custom_code, update_page_custom_code]
code_before_headNoHTML/script to insert in <head> [update_site_custom_code, update_page_custom_code]
code_custom_javascriptNoCustom JavaScript for the site [update_site_custom_code, update_page_custom_code]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.8.0

TDQS

A4.1/5.0
Behavior4/5

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

With only `readOnlyHint:false` available, the description adds meaningful behavioral context: native-first refusal, `native_gap` justification, `allow_shrink` guard for large removals, and `dry_run` validation. It does not cover publishing implications or permissions, but it goes well beyond the annotation.

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?

The definition is dense but appropriately front-loaded with the native-first rule and an action list. The truncated `get_page_custom_code` and `update_page_custom_code` descriptions slightly reduce clarity and polish.

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

Completeness4/5

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

For a 16-parameter multi-action tool with no output schema, the description supplies the operation list, the native-first policy, and the `help` escape hatch. It could be more complete about return values or publish requirements, but the action list and parameter tags make it workable.

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

Parameters3/5

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

Schema coverage is 100%, so parameter meanings are already documented in structured fields. The description adds the action-dispatch model and `help:true` behavior, but it does not add syntax or constraints beyond what the schema already provides.

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?

The description clearly states that the tool manages custom code site-wide or for one page, and enumerates five concrete operations. It distinguishes itself from element-based editing by emphasizing the native-first policy, though two action descriptions are visibly truncated.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: custom code is refused when a native element can do the job, and the preferred order is element → settings/events/bindings → app → code. It also explains the `action` dispatch model and points agents to `help:true` for action-specific documentation.

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