Inicio - Documentación - POM AI - 20 MCP - POM Theme template tools - POM Theme template tool reference

POM Theme template tool reference

Seven tools for POM Theme's custom HTML templates: the markup that renders archives, single posts and result feeds.

The tools

Tool Does Write
pom_theme_list_html_templates List every template
pom_theme_get_html_template Read one template
pom_theme_upsert_html_template Create or replace a template Yes
pom_theme_delete_html_template Delete a template Yes
pom_theme_get_template_assignments Which template renders what
pom_theme_assign_template Point a target at a template Yes
pom_theme_configure_content_model Build post types, fields and templates together Yes

Registered only when POM Theme is available. Check with pom_theme_get_status.

Permissions

Requires
Scopes, reads mcp:read, pom_theme:read
Scopes, writes mcp:write, pom_theme:write
Capability, reads edit_theme_options
Capability, writes manage_options
Write gate Allow POM Theme writes

Three template types

Type Renders
archive The page that lists posts of a type
single One post of that type
feed The repeating result item inside an archive

Every tool that takes a template_type accepts only these three. Anything else returns pom_ai_mcp_invalid_template_type.

The archive and feed distinction is the one people get wrong: the archive is the page around the results, and the feed is the card repeated for each result. An archive template usually contains {{archive_results}} where the feed template renders.

Creating a template does not display it

Templates and assignments are separate. A template you create renders nothing until something is pointed at it with pom_theme_assign_template.

That two-step design is deliberate — it lets you build and review a template before it goes live — and it is the most common reason a new template "does not work".

Merge tags are the template language

Templates are HTML plus merge tags: {{title}}, {{archive_results}}, {{if}} blocks. The available tags differ by template type.

They are documented as MCP resources, one per type:

Read the right one before writing markup. A tag that does not exist for that type fails validation.

Templates are validated before they save

Unlike CSS, template markup is genuinely checked: unknown merge tags, unbalanced {{if}} blocks and empty markup are errors that block the write; inline <script> and <style> are warnings.

PHP tags are refused outright with pom_ai_mcp_template_php_denied. Failed validation returns pom_ai_mcp_template_validation_failed with the specific issues.

That makes templates the one part of POM Theme where a bad write is usually caught before it reaches the site.

Assignments validate too

You cannot assign a template that does not exist, or one of the wrong type, or point at a post type that is not registered. Each has its own error, listed on the assignment page.

Related