List Theme Templates
Lists a block theme's templates — the layouts WordPress uses for the home page, single posts, pages, archives, search, 404 and so on — with where each one's content currently comes from and whether a change to it is pending in the draft. Read-only.
Also known as: page templates, site templates, block templates, full site editing templates.
| Property | Value |
|---|---|
| Ability slug | mosmcp/theme-template-list |
| Wire tool name | mosmcp__theme-template-list |
| Category | Theme: Templates and Styles (mosmcp-theme-blocks) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_theme_options |
| Minimum default role | Administrator (Shop manager too when WooCommerce is active) |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| search | string | — | Optional. Only templates whose slug or title contains this. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| theme | string | ||
| count | integer | Yes | |
| customised | integer | ||
| items | object[] | Yes | |
| items[].slug | string | ||
| items[].id | string | ||
| items[].title | string | ||
| items[].description | string | ||
| items[].type | string | ||
| items[].area | string | ||
| items[].origin | string | "theme", "customised", "user" or "plugin". | |
| items[].can_reset | boolean | ||
| items[].modified | string | ||
| items[].pending | string | Pending draft change: "update", "reset" or empty. | |
| items[].content_length | integer | ||
| notes | string[] |
Example
Sample prompt
Which page templates does my theme have, and have any been customised?
Example request (json)
{
"jsonrpc": "2.0",
"id": 292,
"method": "tools/call",
"params": {
"name": "mosmcp__theme-template-list",
"arguments": {
"input": {}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 292,
"result": {
"isError": false,
"structuredContent": {
"theme": "twentytwentyfive",
"count": 2,
"customised": 1,
"items": [
{
"slug": "404",
"id": "twentytwentyfive//404",
"title": "Page: 404",
"description": "Displays when a visitor views a non-existent page.",
"type": "wp_template",
"area": "",
"origin": "theme",
"can_reset": false,
"modified": "",
"pending": "",
"content_length": 812
},
{
"slug": "single",
"id": "twentytwentyfive//single",
"title": "Single Posts",
"description": "Displays a single post.",
"type": "wp_template",
"area": "",
"origin": "customised",
"can_reset": true,
"modified": "2026-09-12 14:03:22",
"pending": "update",
"content_length": 1934
}
],
"notes": [
"origin \"theme\" means the theme file is used as shipped; \"customised\" means an edit made in the Site Editor overrides the theme file and can be reset; \"user\" means the template was created on this site and has no theme file."
]
}
}
}
Edge cases / errors
- Active theme is a classic theme (no block templates) -> refused with mosmcp_not_a_block_theme, pointing to mosmcp/theme-file-list instead.
- search matches nothing -> success with count 0 and an empty items list (matching is a case-insensitive substring on slug and title).
- A template with a staged but unpublished change shows pending "update" or "reset"; the live site is unaffected until the theme draft is published.
| << Previous | Next >> |
|---|---|
| List Theme Template Parts | Replace Text in a Template |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.