Manage Templates
templateManage reusable HTML UI templates with versioning, search, and publishing. Create once, use multiple times via pane creation.
Instructions
Manage reusable, versioned UI templates (author once, instance many times via create_pane's template_id). ONE tool with an action enum: create | version | update | search | list | show | get_version | delete | publish | unpublish | search_public | set_icon. Required fields per action are documented on the action parameter. A template is HTML + an event schema (+ optional input/record/template-record schemas); a pane is one use of one version of it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Template id or slug. Required for version/update/show/get_version/delete/publish/unpublish/set_icon. | |
| html | No | HTML template body / source (required for create + version). | |
| name | No | Template display name (required for create). | |
| slug | No | Stable agent-chosen handle (create/update). | |
| tags | No | Search keywords (create/update). | |
| clear | No | set_icon: clear both the emoji and image icon. | |
| limit | No | search_public page size (1..50). | |
| query | No | Free-text search (for search / search_public). | |
| action | Yes | Which template operation to run. create: a new named template (needs name+html). version: append a new immutable version to an existing template (id+html). update: patch head metadata (name/slug/description/tags). search/list: find the agent's templates (search takes an optional query). show: full template + version list (id). get_version: one version's content (id+version). delete: remove the template + all versions (id, requires confirm:true). publish/unpublish: public catalog (id). search_public: the public catalog across all agents (optional query). set_icon: set/clear a template's icon (id + one of emoji / icon_attachment_id / clear). | |
| offset | No | search_public offset. | |
| scopes | No | verb:noun permission scopes for publish (e.g. ['read:agent']). Empty array clears them. | |
| confirm | No | Required (true) for the destructive `delete` action. | |
| version | No | Version number (required for get_version). | |
| icon_emoji | No | set_icon: a single-emoji icon. | |
| description | No | Prose description (create/update). | |
| event_schema | No | Event schema (create/version). Omit for a view-only template. | |
| input_schema | No | Per-pane input_data JSON Schema (create/version). | |
| record_schema | No | Per-pane record collections schema (create/version). | |
| template_type | No | Source kind. Default html-inline; html-ref treats html as a URL. | |
| icon_attachment_id | No | set_icon: a ready template-scoped raster-image attachment id. | |
| template_record_schema | No | Template-level (shared) record collections schema (create/version). Set this before using the template_records tool. |