Skip to main content
Glama

Frontman for WordPress

wp_create_template

Destructive

Creates a new block template or part linked to the active theme. Never overwrites existing templates, including theme files. Use wp_update_template for existing slugs.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>",
      "slug": "<slug>",
      "type": "<type>",
      "title": "<title>",
      "content": "<content>"
    },
    "name": "wp_create_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoRegistered template-part area. Parts only; defaults to uncategorized.
slugYesCanonical template slug (no theme prefix).
typeYes
titleYesHuman-readable title.
contentYesBlock markup.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true; the description adds real value by stating the non-overwrite guarantee for existing templates and theme files, which materially lowers the perceived risk of a write to a live theme. It leaves a gap: it doesn't say whether a slug collision causes an error or a silent no-op, so the agent cannot predict the failure mode.

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?

Two tight sentences with the primary behavior front-loaded, the safety guarantee second, and the sibling redirect last. Nothing is redundant or restated from the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation with a destructive hint and no output schema, the description never says what the call returns (created template id/slug) or what capabilities are required, which matters for chaining a follow-up read or update. The core behavior and the collision guarantee are covered, but the post-call picture is missing.

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

Parameters3/5

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

Schema coverage is 83%, so the schema already documents site_id, slug, title, content, type, and area. The description only echoes slug semantics via "existing slugs" and adds no format or constraint detail beyond the structured fields, so the baseline applies.

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 ("Creates a new block template or part") plus the scope qualifier "linked to the active theme," so an agent can distinguish this from wp_update_template and from the other create_* siblings without opening the schema.

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?

Explicitly routes the agent: "Use wp_update_template for existing slugs" names the alternative and the condition that selects it. It also establishes a when-not boundary via "Never overwrites existing templates, including theme files," though it doesn't state prerequisites or capabilities needed to write theme-linked templates.

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.