templates_tool
Site templates, global blocks, menus, mail forms, and pages on the selected site (call select_site first). Proxies to /uapi/templates, /uapi/gblocks, /uapi/menus, /uapi/mail, /uapi/pages with a server-minted Bearer key.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Global block id (gblock_create). | |
| pda | No | PDA flag for gblock_create/gblock_delete. | |
| items | No | Menu items tree (menu_update_items). | |
| title | No | Menu title (menu_create, menu_update). | |
| action | Yes | Template actions use module_id + template_id. Destructive actions need confirm: true. update_template / patch_template make an automatic backup (source mcp, rotated) after validation and before saving; the save is refused if that backup fails, and the result carries backup.id. validate_template checks content (or code_search + code_paste) with the same rules as a save, without saving or backing up. create_backup makes a manual backup (source cp, never rotated, refused with LIMIT_REACHED when full) and returns backup.id. | |
| layout | No | Menu layout: 0 horizontal, 1 vertical. | |
| confirm | No | Required for delete_backup, restore_backup, gblock_delete, menu_delete, mail_delete_form, mail_delete_field, page_delete after user approval. | |
| content | No | Global block HTML (gblock_create) or full template body to check (validate_template; html_content is accepted too). | |
| menu_id | No | Menu id (menu_get, menu_update, menu_delete, menu_update_items). | |
| page_id | No | Site page id (page_get, page_update, page_delete; cannot delete id=1). | |
| mail_rez | No | Success message text for mail form. | |
| backup_id | No | Template backup id (delete_backup, restore_backup). | |
| gblock_id | No | Global block id (gblock_delete). | |
| mail_name | No | Mail form name (create/update) or field label (mail_add_field, mail_update_field). | |
| mail_tmpl | No | Mail notification HTML template (mail_save_template). | |
| module_id | No | Module id (get_variables, read_template, update_template, patch_template). | |
| page_name | No | Page title (page_add/update). | |
| page_page | No | List page number (page_list). | |
| page_tmpl | No | Custom template code. | |
| code_paste | No | Replacement fragment (patch_template / validate_template; empty string deletes match). | |
| code_search | No | Exact fragment to find (patch_template, or validate_template to check a patch). | |
| mail_emails | No | Recipient emails (string or array). | |
| mail_values | No | Options for select/radio mail fields. | |
| page_other1 | No | Extra field 1. | |
| page_other2 | No | Extra field 2. | |
| page_other3 | No | Extra field 3. | |
| page_other4 | No | Extra field 4. | |
| page_other5 | No | Extra field 5. | |
| page_ownurl | No | Custom URL slug. | |
| template_id | No | Template id within module. | |
| html_content | No | Full template HTML (update_template only; use patch_template for edits). | |
| mail_form_id | No | Mail form id. | |
| page_message | No | Page HTML content. | |
| page_owntmpl | No | Use custom template flag. | |
| page_pending | No | Pending/moderation flag. | |
| mail_field_id | No | Mail field id. | |
| mail_required | No | Required flag for mail field. | |
| page_per_page | No | List page size (page_list). | |
| mail_direction | No | 0 = move field up, non-zero = down (mail_move_field). | |
| page_parent_id | No | Parent page id. | |
| mail_field_type | No | Mail field type code. | |
| page_access_all | No | Visible to all groups. | |
| page_images_alt | No | Image alt strings (page_add/update). | |
| page_meta_title | No | SEO title. | |
| page_image_paths | No | Local image paths for page_add/page_update (multipart; npm-mcp only until Site::Proxy supports it). | |
| include_variables | No | npm-mcp only: account MCP always returns variables in read_template JSON when available. | |
| page_images_title | No | Image title strings (page_add/update). | |
| page_meta_keywords | No | SEO keywords. | |
| page_del_image_slots | No | Image slot numbers to delete on page_update. | |
| page_access_group_ids | No | Group ids when page_access_all is off. | |
| page_meta_description | No | SEO description. |