Skip to main content
Glama

wp_set_page_template

Set a page's WordPress template. Use 'canvas' for a full-bleed design with NO theme header/title/footer (clones, landing pages) — otherwise the design renders wrapped inside the theme's page layout. 'full_width' keeps theme header/footer; 'default' is the theme template. Requires writes enabled.

Input Schema

NameRequiredDescriptionDefault
post_idYesThe page ID
site_idYesThe WordPress site ID
templateYescanvas | full_width | default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, non-idempotent), so the bar is lower. The description still adds real context: the write-enable precondition and the rendering consequence of choosing the wrong value ('the design renders wrapped inside the theme's page layout'), which annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action, then value semantics, then the precondition. No filler, no restating of the tool name, and each clause carries actionable information.

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 3-parameter, no-output-schema mutation tool, the description supplies the precondition and the value semantics an agent needs to call it correctly. It omits what the call returns and whether existing content is preserved, but those gaps are minor given the annotations cover the safety profile.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description goes beyond the bare enum 'canvas | full_width | default' by explaining the layout behavior each value produces — genuinely useful semantics for the one parameter that carries risk of a wrong choice. site_id and post_id get no extra detail, which is fine given they are self-documented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Set a page's WordPress template') and immediately defines what the operation controls (theme layout wrapping). It is clearly distinct from sibling tools such as wp_set_page_status, wp_set_homepage, and wp_update_template.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the selection criteria for each template value — 'canvas' for clones/landing pages with no header/title/footer, 'full_width' to keep theme chrome, 'default' for the theme template. It also states the precondition 'Requires writes enabled.' It stops short of naming a sibling alternative, but the value-level routing is explicit.

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.

Resources