Skip to main content
Glama
WebCake Landing MCP

WebCake Landing MCP

by vuluu2k

validate_page

Read-only

Validates landing page source against JSON schema and semantic rules, applies layout corrections, and returns blocking errors plus visible layout warnings before saving.

Instructions

Validates a page source against the JSON schema and semantic rules: unique ids, dangling event targets, children only on container types, missing field_name, top-level types, and form-data bindings (duplicate field_name within one form; dangling promoId / connectedSurvey / connectedForm / set_field_value targets). Before validating it applies deterministic layout corrections (off-canvas boxes moved on-canvas, elements below wrapped text moved down) and lists them in auto_fixed. Returns errors (structural problems that block saving) and warnings (visible layout defects such as overlapping text, off-canvas bounds, or empty bands).

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": {
      "page": "<page>"
    },
    "name": "validate_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageYesThe page source object { page:[...], settings:{} } OR a JSON string of it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.11
    • addedInput schema / properties / page / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • addedInput schema / required
      Added value: +[
      +  "page"
      +]
  2. First observedv1.5.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, but the description adds substantive behavior: it discloses the hidden side effect of applying deterministic layout corrections and reporting them in auto_fixed, and it explains the severity model of the returned errors and warnings. This is well beyond what the annotations convey, though it omits any note on performance or whether auto-fixes are persisted.

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, then rule categories, then auto-fix behavior, then return semantics — a sensible order. The parenthetical rule enumerations are dense but each clause carries distinct information; the only cost is a long single paragraph that could be split for scannability.

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?

With no output schema, the description carries the burden of explaining returns and does so via the errors/warnings/auto_fixed triad. For a validator with this many semantic rules and only one input, that is close to complete; a brief note on whether corrections mutate stored pages would close the last gap.

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?

Only one parameter exists and its schema description already covers both accepted forms (object or JSON string) at 100% coverage, so the baseline of 3 applies. The description does not restate or enrich the parameter, which is acceptable given the schema does the work.

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 ("Validates a page source") and then enumerates the exact rule families checked: unique ids, dangling event targets, children only on containers, missing field_name, top-level types, form-data bindings. The scope is unambiguous. It does not, however, differentiate itself from siblings such as get_page_schema or layout, so it falls short of a 5.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the errors-vs-warnings split ("structural problems that block saving" vs "visible layout defects") tells the agent when results matter, but there is no explicit "call this before saving/publishing" instruction and no named alternative to use instead (e.g., render_preview for visual inspection).

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