Yuppsy template builder
Create customer templates using the Yuppsy MCP tools. For template structure,
DSL syntax, component design, editor behavior, assets, and validation, use the
yuppsy-template-development
skill and the relevant official documentation.
Before starting
- Confirm the Yuppsy MCP server is connected and that the
template_builder_*tools are available. If they are not discoverable, stop and report that the connected deployment does not expose them. - Load
yuppsy-template-development. If it is unavailable, stop and ask for access to it; do not guess the template language or structure. - Establish the template name, purpose, target website types, required pages and components, visual direction, source material, and approved assets. Ask for missing information that would materially affect the design.
- Determine whether the user wants a new template or changes to an existing one. For an existing template, ask for its head ID.
- Confirm authorization before changing an existing template, uploading assets, deleting files, or publishing. Creating a template does not by itself authorize publication.
- Agree on a plan for host preview and validation. If no suitable preview or website environment is available, explain that full rendering and editor behavior cannot be verified through these tools alone.
The tools operate on customer templates in the authenticated user’s company. Access to another user’s template depends on template-builder permissions. Never put credentials or access tokens in tool arguments or template files.
Identifiers and results
templateIdidentifies the underlying template.headIdidentifies the editable template head.versionIdidentifies a particular version.
These IDs are not interchangeable. On successful creation, obtain the head ID
from data.version.headId, and retain data.templateId and
data.version.id separately. Use the actual discovered response schema if
property casing differs.
Check success after every tool call. On failure, inspect error,
errorDetails, and any data before proceeding. An operation may partially
succeed. Do not retry creation, publication, upload, or deletion blindly.
Workflow
1. Create or inspect the template
For a new template, call template_builder_create_template with the agreed
name and optional description:
{
"name": "Modern Agent Template",
"description": "A responsive template for agent websites."
}
Record the returned template ID, head ID, and version ID. If creation fails, report the error and any cleanup or partial-result details before retrying.
For an existing template, call template_builder_get_versions using its
head ID. Do not assume a 404 proves the template does not exist: it may be
inaccessible to the current user.
Use template_builder_get_items to inspect the root and relevant folders.
Read existing text with template_builder_get_item_content before replacing
it. A missing stored file can read as empty content, so an empty result alone
does not prove a file exists.
2. Design the template
Follow yuppsy-template-development for the template shell, component
registrations, layouts, DSL, responsive styles, scripts, editor lifecycle,
assets, and thumbnails.
Use the supplied source material and user requirements. Preserve existing identifiers and user content when editing an existing template. Do not invent unsupported fields, record-specific facts, or functionality.
Plan the template as a coordinated set of files and registrations, including the master page, appropriate components, website presets, styles, scripts, editor integration, and approved assets.
3. Create and save template content
Use template_builder_save_item for text files. The data argument is an
object containing another data property:
{
"headId": 123,
"filePath": "/styles/site.css",
"data": {
"data": "body { margin: 0; }"
}
}
Use template_builder_create_directory for ordinary storage directories
when needed. Do not try to create directories inside virtual template
folders; those are managed by the template system.
Save the master page, components, presets, styles, and scripts in a logical
order. Files under templates and templateItems, and the master page,
are processed as template items rather than simple file writes. Check the
returned data.items and errors after each save; one save can affect more
than one registered item.
Do not overwrite existing files or registrations without authorization. Stop on a failed operation, inspect the returned details, and reconcile any partial changes before continuing.
4. Upload assets
For each authorized binary asset, use template_builder_upload_file with a
nonempty base64-encoded fileData value:
{
"headId": 123,
"path": "/images",
"fileName": "example.jpg",
"fileData": "<base64-encoded-file-bytes>"
}
Do not substitute placeholder bytes for a real asset. Uploads can replace existing files; inspect the destination first and obtain confirmation before overwriting. Follow the design skill’s rules for asset licensing, imagery, thumbnails, and editor behavior.
5. Verify the draft
- List relevant folders and read back saved text where supported.
- Check returned item paths and registrations against the intended components and presets.
- Review DSL structure, component IDs, references, asset paths, accessibility, responsive behavior, and editor lifecycle according to the design skill.
- Use available host previews or a suitable test website to verify rendering, interactions, and editing. A successful save does not prove that the template renders correctly.
- Report missing assets, unavailable previews, unverified host behavior, and any placeholders requiring user action.
Do not claim a complete end-to-end verification if the host, editor, or required test data was unavailable.
6. Publish only when authorized
Publication creates a public version. Ask for explicit confirmation before
calling template_builder_create_public_version, even if the tool is not
marked destructive.
Use versionTag of major, minor, or revision; when omitted it defaults
to minor. After publication, record the returned version ID and use
template_builder_get_versions, template_builder_view_items, and
template_builder_view_item_content as appropriate to inspect the published
version.
Do not publish while required checks are unverified without explaining the limitations and obtaining the user’s informed approval.
Deletion and recovery
Do not delete a template head, version, or item unless the user explicitly
authorizes that deletion. Deletion may be blocked by references or active use.
For template_builder_delete_item, the server treats the final path segment
as a file if it contains a dot; otherwise, it treats it as a directory.
If an operation fails, report what succeeded, what may have changed, and the returned error. Do not assume a failed multi-step operation rolled back.
Completion report
Report the template name and head ID, relevant template/version IDs, files and components created or changed, publication status, verified behavior, and remaining limitations or required user action.