Get Page Template And Display Settings
Reports which page template a page uses, whether Elementor controls its layout, and the per-page theme settings (sidebar, content width, title visibility) that decide how it renders. Use this to find out why one page looks different from another.
| Property | Value |
|---|---|
| Ability slug | mosmcp/page-template-get |
| Wire tool name | mosmcp__page-template-get |
| Category | Pages (mosmcp-pages) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_post (checked against the specific post) |
| Minimum default role | Editor |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The ID of the page to inspect. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | |
| post_type | string | Yes | |
| title | string | ||
| page_template | object | Yes | |
| page_template.current | string | Assigned template slug, or "default". | |
| page_template.label | string | ||
| page_template.is_available | boolean | False when the stored template is not registered by the active theme, which means WordPress renders the default instead. | |
| page_template.available | object[] | Templates the active theme and its plugins register for this post type. | |
| elementor | object | ||
| elementor.plugin_active | boolean | ||
| elementor.has_data | boolean | Whether this post carries an Elementor layout. | |
| elementor.data_bytes | integer | ||
| elementor.edit_mode | string | ||
| elementor.template_type | string | ||
| elementor.version | string | ||
| display_settings | object[] | Per-post theme and plugin settings whose names suggest they affect layout. | |
| display_settings[].key | string | ||
| display_settings[].value | string |
Example
Sample prompt
Why does the Pricing page look different from the Home page? Which template is it using?
Example request (json)
{
"jsonrpc": "2.0",
"id": 37,
"method": "tools/call",
"params": {
"name": "mosmcp__page-template-get",
"arguments": {
"input": {
"id": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 37,
"result": {
"isError": false,
"structuredContent": {
"id": 42,
"post_type": "page",
"title": "Pricing",
"page_template": {
"current": "elementor_canvas",
"label": "Elementor Canvas",
"is_available": true,
"available": [
{
"slug": "default",
"label": "Default template"
},
{
"slug": "elementor_canvas",
"label": "Elementor Canvas"
}
]
},
"elementor": {
"plugin_active": true,
"has_data": true,
"data_bytes": 12450,
"edit_mode": "builder",
"template_type": "wp-page",
"version": "3.24.0"
},
"display_settings": [
{
"key": "site-sidebar-layout",
"value": "no-sidebar"
}
]
}
}
}
Edge cases / errors
- id is not a page → refused with post_not_found.
- The stored template is not registered by the active theme → is_available is false, meaning WordPress actually renders the default template.
- display_settings is a name-based heuristic (keys containing words like sidebar, layout, width, header, hide_title); _wp_page_template and **_elementor*** keys are excluded and long values are truncated to 200 characters.
- Read-only: nothing on the page is changed.
| << Previous | Next >> |
|---|---|
| Get Page | List All Pages |
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.