Skip to main content
Glama
vuluu2k

WebCake Storefront MCP

by vuluu2k

create_global_section

Create reusable global sections like headers, footers, or shared blocks, then embed them into page sources for site-wide rendering. Preview changes before an atomic save.

Instructions

Create a reusable global section (Header / Footer / shared block) the way the builder does: persists a global_section record AND embeds the same section node into page sources so it actually renders across the site (header → top of every page, footer → bottom). Build the section first with new_section (give it a real bg/padding + logo/menu/links), then pass it here. Two-step safety: dry_run=true (default) previews which pages change; dry_run=false performs the atomic save.

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name in the editor (e.g. 'Header', 'Footer')
typeYesheader = top chrome (logo/nav/cart), footer = bottom chrome, section = reusable content block
dry_runNoPreview which pages would change (true) or perform the atomic save (false).
sectionNoA section node from new_section (object or JSON string) — the content of the header/footer.
page_idsNoPages to embed into. Omit to apply to ALL pages of the site (typical for header/footer).

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 declare readOnlyHint=false and destructiveHint=false, so the description carries most of the behavioral burden and delivers: it discloses the dual persist+embed side effect, the render consequence (header to top, footer to bottom), and the two-step dry_run safety model with an atomic save. This is substantial context beyond the annotations.

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 with the core action in the first sentence, followed by ordering and safety details. Dense but every clause is informative; the multi-line layout is slightly heavy but not wasteful.

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 non-read-only, side-effecting write tool with no output schema and thin annotations, the description covers prerequisites, side effects, and the dry_run safety model. It falls just short of full completeness by not addressing failure behavior or permission requirements, but nothing essential for correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description adds real value: it clarifies that the section param should be the node produced by new_section, that page_ids defaults to every page for header/footer, and that dry_run defaults to preview. These mappings go beyond the schema text.

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

Purpose5/5

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

States a specific verb+resource (create a reusable global section: Header/Footer/shared block) and explains the dual effect of persisting a record plus embedding into page sources. It clearly distinguishes this from siblings like new_section by presenting that tool as a prerequisite rather than an alternative.

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?

Explicitly says to build the section first with new_section and then pass it here, and describes the dry_run preview-vs-commit workflow. It lacks an explicit contrast against ambiguous siblings such as add_section, but the when-to-use and ordering guidance is strong.

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