Skip to main content
Glama

validate_layout

Validates a layout without saving and returns errors, warnings, and stats; optionally evaluates expressions against a sample record to surface runtime failures.

Instructions

Validate a layout without saving: returns {ok, errors[], warnings[], stats}. Each issue has a JSON path (slots[3].row_template[1].content), a code and a message. With evaluate=true every expression is also run against a sample record; runtime failures come back as warnings.

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": {
      "layout": "<layout>"
    },
    "name": "validate_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNotemplate
modelNo
layoutYes
mappingNo
evaluateNo
record_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.7/5.0
Behavior5/5

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

Without annotations, the description carries the full behavioral burden, which it handles exceptionally well. It discloses the complete return structure ({ok, errors[], warnings[], stats}), the granularity of error reporting (JSON path, code, message), and the crucial operational behavior of the 'evaluate=true' flag.

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

Conciseness5/5

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

The definition is highly efficient. It front-loads the key operational characteristic ('without saving') and reserves the second sentence for the most complex execution detail regarding expression evaluation.

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?

Given the complexity of layout validation (handling schemas, expressions, and various error states), the description provides a complete picture of the input expectations and the precise format of the output, leaving no ambiguity for the AI agent.

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?

Although the schema coverage is 0%, the description adds significant value by explaining the functional constraints of the input parameters, such as how runtime failures (tied to 'evaluate') manifest as warnings, providing logic that isn't purely structural.

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?

The tool explicitly states its purpose: 'Validate a layout without saving'. This distinguishes it immediately from sibling tools like 'render_preview' or 'create_template' by specifying the non-destructive nature of the operation.

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 description guides the user on the specific use case—checking layout integrity before saving. By stating it runs 'without saving,' it defines a clear operational boundary for when this tool should be used compared to commit-based tools.

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