Skip to main content
Glama

Edit site design

templates_write
Destructive

Creates and edits design data of the active site: templates (full replace or fragment patch), template backups, global blocks, menus, mail forms and their fields, site pages.

Input Schema

NameRequiredDescriptionDefault
idNoGlobal block id (synonym for gblock_id).
pdaNoMobile (PDA) version flag of a global block.
itemsNoMenu items tree; replaces the current items. Item fields: title (item text), url, target, class, children; other keys are refused.
titleNoMenu title.
actionYesOperation to run. Each oneOf entry describes one action and lists its parameters.
layoutNoMenu layout: 0 horizontal, 1 vertical.
contentNoGlobal block HTML (gblock_create) or full template body to check (validate_template; html_content is accepted too).
menu_idNoMenu id from menu_list.
page_idNoSite page id. Page 1 cannot be deleted.
mail_rezNoMessage shown after the form is sent.
gblock_idNoGlobal block id.
mail_nameNoMail form name, or field label for field actions.
mail_tmplNoHTML template of the notification email.
module_idNoNumeric module id of the template, from list_modules.
page_nameNoPage title.
page_tmplNoCode of the page own template.
code_pasteNoReplacement for code_search; an empty string deletes the fragment.
code_searchNoExact template fragment to find.
mail_emailsNoRecipient emails (string or array).
mail_valuesNoOptions of a select or radio field.
page_other1NoExtra field 1.
page_other2NoExtra field 2.
page_other3NoExtra field 3.
page_other4NoExtra field 4.
page_other5NoExtra field 5.
page_ownurlNoCustom URL slug.
template_idNoTemplate id within the module, from list_modules.
html_contentNoFull template HTML. For small edits use patch_template.
mail_form_idNoMail form id from mail_list_forms.
page_messageNoPage HTML content. It is saved as HTML whatever editor the site uses.
page_owntmplNoUse the page own template.
page_pendingNoPending (moderation) flag.
mail_field_idNoMail form field id from mail_list_fields.
mail_requiredNoThe field must be filled in.
mail_directionNo0 moves the field up, any other value moves it down.
page_parent_idNoParent page id.
mail_field_typeNoMail form field type code.
page_access_allNoPage is visible to all groups.
page_meta_titleNoSEO title.
page_meta_keywordsNoSEO keywords.
page_meta_descriptionNoSEO description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / action / oneOf
      Previous value: -[
      -  {
      -    "const": "update_template",
      -    "description": "Replaces the whole template. After validation an automatic backup (rotated) is made; the save is refused if the backup fails, and the result carries backup.id. Required: module_id, template_id, html_content."
      -  },
      -  {
      -    "const": "patch_template",
      -    "description": "Replaces one exact fragment of a template with code_paste. Makes the same automatic backup as update_template. Required: module_id, template_id, code_search, code_paste."
      -  },
      -  {
      -    "const": "create_backup",
      -    "description": "Makes a manual template backup (never rotated; refused with LIMIT_REACHED when the limit is reached) and returns backup.id."
      -  },
      -  {
      -    "const": "gblock_create",
      -    "description": "Creates or replaces a global block (block id in id or gblock_id). Optional: id, gblock_id, content, pda."
      -  },
      -  {
      -    "const": "menu_create",
      -    "description": "Creates a menu. Required: title. Optional: layout."
      -  },
      -  {
      -    "const": "menu_update",
      -    "description": "Changes the title or layout of a menu. Required: menu_id. Optional: title, layout."
      -  },
      -  {
      -    "const": "menu_update_items",
      -    "description": "Replaces the items of a menu. The text of an item goes in title. Required: menu_id, items."
      -  },
      -  {
      -    "const": "mail_create_form",
      -    "description": "Creates a mail form. Required: mail_name, mail_emails. Optional: mail_rez."
      -  },
      -  {
      -    "const": "mail_update_form",
      -    "description": "Updates a mail form. Required: mail_form_id. Optional: mail_name, mail_emails, mail_rez."
      -  },
      -  {
      -    "const": "mail_add_field",
      -    "description": "Adds a field to a mail form. Required: mail_form_id, mail_field_type, mail_name. Optional: mail_required, mail_values."
      -  },
      -  {
      -    "const": "mail_update_field",
      -    "description": "Updates a mail form field. Required: mail_form_id, mail_field_id. Optional: mail_field_type, mail_name, mail_required, mail_values."
      -  },
      -  {
      -    "const": "mail_move_field",
      -    "description": "Moves a mail form field up or down. Required: mail_form_id, mail_field_id, mail_direction."
      -  },
      -  {
      -    "const": "mail_save_template",
      -    "description": "Saves the notification email template of a mail form. Required: mail_form_id, mail_tmpl."
      -  },
      -  {
      -    "const": "page_add",
      -    "description": "Creates a site page. Optional: page_name, page_message, page_parent_id, page_pending, page_owntmpl, page_tmpl, page_ownurl, page_access_all, page_meta_title, page_meta_description, page_meta_keywords, page_other1, page_other2, page_other3, page_other4, page_other5."
      -  },
      -  {
      -    "const": "page_update",
      -    "description": "Updates a site page. Required: page_id. Optional: page_name, page_message, page_parent_id, page_pending, page_owntmpl, page_tmpl, page_ownurl, page_access_all, page_meta_title, page_meta_description, page_meta_keywords, page_other1, page_other2, page_other3, page_other4, page_other5."
      -  }
      -]New value: +[
      +  {
      +    "const": "update_template",
      +    "description": "Replaces the whole template. After validation an automatic backup (rotated) is made; the save is refused if the backup fails, and the result carries backup.id. Required: module_id, template_id, html_content."
      +  },
      +  {
      +    "const": "patch_template",
      +    "description": "Replaces one exact fragment of a template with code_paste. Makes the same automatic backup as update_template. Required: module_id, template_id, code_search, code_paste."
      +  },
      +  {
      +    "const": "create_backup",
      +    "description": "Makes a manual template backup (never rotated; refused with LIMIT_REACHED when the limit is reached) and returns backup.id."
      +  },
      +  {
      +    "const": "gblock_create",
      +    "description": "Creates a global block (block id in id or gblock_id: Latin letters, cut to 10 and upper-cased). Without content the block is created empty. A block that already exists is refused (ALREADY_EXISTS). Required: id or gblock_id. Optional: content, pda."
      +  },
      +  {
      +    "const": "menu_create",
      +    "description": "Creates a menu. Required: title. Optional: layout."
      +  },
      +  {
      +    "const": "menu_update",
      +    "description": "Changes the title or layout of a menu. Required: menu_id. Optional: title, layout."
      +  },
      +  {
      +    "const": "menu_update_items",
      +    "description": "Replaces the items of a menu. The text of an item goes in title. Required: menu_id, items."
      +  },
      +  {
      +    "const": "mail_create_form",
      +    "description": "Creates a mail form. Required: mail_name, mail_emails. Optional: mail_rez."
      +  },
      +  {
      +    "const": "mail_update_form",
      +    "description": "Updates a mail form. Required: mail_form_id. Optional: mail_name, mail_emails, mail_rez."
      +  },
      +  {
      +    "const": "mail_add_field",
      +    "description": "Adds a field to a mail form. Required: mail_form_id, mail_field_type, mail_name. Optional: mail_required, mail_values."
      +  },
      +  {
      +    "const": "mail_update_field",
      +    "description": "Updates a mail form field. Required: mail_form_id, mail_field_id. Optional: mail_field_type, mail_name, mail_required, mail_values."
      +  },
      +  {
      +    "const": "mail_move_field",
      +    "description": "Moves a mail form field up or down. Required: mail_form_id, mail_field_id, mail_direction."
      +  },
      +  {
      +    "const": "mail_save_template",
      +    "description": "Saves the notification email template of a mail form. Required: mail_form_id, mail_tmpl."
      +  },
      +  {
      +    "const": "page_add",
      +    "description": "Creates a site page. Required: page_name. Optional: page_message, page_parent_id, page_pending, page_owntmpl, page_tmpl, page_ownurl, page_access_all, page_meta_title, page_meta_description, page_meta_keywords, page_other1, page_other2, page_other3, page_other4, page_other5."
      +  },
      +  {
      +    "const": "page_update",
      +    "description": "Updates a site page. Required: page_id. Optional: page_name, page_message, page_parent_id, page_pending, page_owntmpl, page_tmpl, page_ownurl, page_access_all, page_meta_title, page_meta_description, page_meta_keywords, page_other1, page_other2, page_other3, page_other4, page_other5."
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / page_message / description
      Previous value: -"Page HTML content."New value: +"Page HTML content. It is saved as HTML whatever editor the site uses."
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, so the safety profile is covered. The description adds mutation scope (it writes live design data of the active site) but does not mention the automatic rotated backup, the LIMIT_REACHED refusal, or ALREADY_EXISTS conflicts — those important behavioral details live only in the schema's oneOf entries, not in the description.

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?

A single front-loaded sentence with no filler, and the resource enumeration is a compact way to convey the tool's breadth. It is slightly list-heavy but every clause maps to a real action family.

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 41-parameter, 15-action multiplexer with no output schema, the description stays minimal because the action enum's oneOf entries do the heavy lifting (required fields, backup behavior, error codes). What is missing from the description itself is a warning that operations act on the currently selected site and that most writes are destructive — but the annotations and schema largely compensate.

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% and the action enum's oneOf entries document required/optional parameters per action in detail, so the schema carries the burden. The description only contributes the '(full replace or fragment patch)' framing for the two template actions; it does not explain the action multiplexing or the id/gblock_id synonym.

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 gives a specific verb pair ('Creates and edits') plus the concrete resources it touches (templates, backups, global blocks, menus, mail forms, pages) and scopes it to the 'active site'. It does not name the sibling tools it competes with (templates_read, templates_delete), so an agent must infer the read/delete split from names alone.

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 only implied: it is clearly the write-side counterpart to templates_read, and the parenthetical '(full replace or fragment patch)' hints at choosing between the two template actions. There is no explicit when-to-use/when-not, no prerequisite (select_site, list_modules) guidance, and no routing advice for the 15 action values.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.