Skip to main content
Glama

Get a block template

get_template
Read-only

Retrieve a block template or template part with its full block markup to inspect or edit the layout of any page type.

Instructions

Get one block template or template part, including its block markup, so you can inspect or edit the layout of an entire page type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTemplate id, usually "theme//slug", e.g. "twentytwentyfour//single".
kindNoWhether the id names a template or a template part.template
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds that the response includes block markup and represents a whole page type's layout, but does not describe error behavior, response structure, or other edge cases. Given the annotations, this is acceptable but not extensive.

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?

The description is a single sentence with no filler. It front-loads the action and resource, then adds the key output detail ('block markup') and the intended use case, earning its place.

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 simple read-only tool with a fully documented schema, the description adequately covers what the tool returns (block markup) and why it would be used. A slightly more explicit statement about the exact response shape or behavior for a missing id would improve completeness, but it is not essential given annotations.

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?

The schema already provides 100% description coverage for all three parameters, including an example for id and enum values for kind. The description adds no additional parameter-level meaning, so the baseline score of 3 is appropriate.

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?

The description states a specific verb and resource ('Get one block template or template part') and explains the output includes block markup for inspecting or editing a page type's layout. This clearly distinguishes it from siblings like list_templates and get_template_for_url.

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

Usage Guidelines3/5

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

The description implies the tool is used when you need a specific block template or part by ID and its block markup, but it does not explicitly discuss when to prefer alternatives such as list_templates or get_template_for_url. It provides context but no exclusions or direct sibling comparison.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools