Skip to main content
Glama
WebCake Storefront MCP

WebCake Storefront MCP

by vuluu2k

cms_function

Read, edit, version, and run CMS files and HTTP backend functions using action-based operations; use help to view full documentation and argument schema.

Instructions

CMS files and HTTP functions (backend code): read, edit, version, run. Pick the operation with action and pass that action's arguments (help:true returns its full documentation and schema).

  • get_http_function: Get the main HTTP function file.

  • get_http_function_snippet: Read specific function(s) by name.

  • edit_http_function: Edit the HTTP function file by function name — best for targeted changes (fix a bug, rename, add one function).

  • update_http_function: Write the FULL HTTP function file content.

  • create_cms_file: Create a new CMS file.

  • update_cms_file: Update the code content of an existing CMS file

  • save_file_version: Save a version snapshot of a CMS file for rollback

  • restore_file_version: Roll a CMS file back to a saved version in one step: reads the version's content and writes it back to the file.

  • run_function: Run a deployed HTTP function.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cms_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoCMS file ID [update_cms_file]
codeNoNew function code (for replace_function and add) or new import block (for update_imports) [edit_http_function]
helpNoReturn the action's full documentation and argument schema instead of running it
nameNoFile name [create_cms_file, update_cms_file]
typeNoFile type [create_cms_file]
actionNoEdit action [edit_http_function]
methodNoHTTP method [run_function]
paramsNoParameters [run_function]
contentNoFull JS code content [update_http_function, create_cms_file, update_cms_file, save_file_version]
overviewNotrue=function list only, false=full code (default) [get_http_function]
is_publicNoMark as public version [save_file_version]
version_idNoWhich version to restore (api_find 'file versions' → api_get). [restore_file_version]
cms_file_idNoCMS file ID [save_file_version, restore_file_version]
function_nameNoTarget function name (for replace_function and remove) [edit_http_function, run_function]
include_guideNoInclude coding guide (only needed once) [get_http_function]
function_namesNoFunction names (e.g. [get_http_function_snippet]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.8.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only supply readOnlyHint=false, so the description must carry the behavior burden, and it does partially: restore_file_version is spelled out as a read-then-write in one step, and run_function is scoped to 'a deployed' function, implying deployment happens elsewhere. However, nothing is said about whether edits are reversible, whether writes affect a live site, permission/auth requirements, or what a run/read returns, leaving meaningful gaps for a tool with ten mutating operations.

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 summary sentence followed by a scannable, consistent bullet list where each entry is verb-first and one line long — well structured for a ten-operation dispatcher. A few bullets are near-duplicates (get_http_function vs get_http_function_snippet) and the parenthetical help note could be folded in, but there is little waste overall.

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

Completeness3/5

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

Sixteen parameters, three enums, a nested object, no output schema, and only a single annotation mean the description has to do a lot, and enumerating all ten operations is the right move. Still missing: a correct statement of how the operation is actually selected (the `action` enum contradicts the described dispatch), the version workflow end-to-end (version_id comes from api_find/api_get per the schema, not from the description), and any notion of return shape for reads or runs.

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 description coverage is 100%, so the schema already tags every parameter with its owning operation, and the baseline is 3. The description does add the dispatch model ('Pick the operation with `action` and pass that action's arguments'), but that instruction conflicts with the schema, where `action`'s enum is limited to the four edit_http_function sub-actions (replace_function/add/remove/update_imports) and does not include get_http_function, run_function, etc., so the guidance may actively mislead.

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 opening sentence names a specific resource (CMS files and HTTP functions / backend code) and enumerates concrete verbs (read, edit, version, run), then lists each of the ten operations by name so the agent can see exactly what is covered. What it lacks is any differentiation from sibling tools such as site_code, app, or api_get, which an agent could plausibly confuse with this one.

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?

The edit_http_function bullet explicitly contrasts itself with update_http_function ('best for targeted changes (fix a bug, rename, add one function)' vs 'Write the FULL HTTP function file content'), which is exactly the kind of selection guidance that matters. It also points to help:true for per-action docs, but it never says when to use this tool at all versus the site_code/api_* siblings, and gives no prerequisites for the mutating operations.

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