Get Yoast Meta Fields
Gets every SEO field for a post in one call: the SEO title as stored and as it will render, meta description, focus keyword, canonical URL, breadcrumb title, all robots directives, the Open Graph and X (Twitter) sharing fields, the cornerstone flag, and the schema types along with the values this Yoast version accepts. Every field returned here can also be set, so this is the reliable way to see what is currently in place before changing anything.
| Property | Value |
|---|---|
| Ability slug | mosmcp/get-meta-fields |
| Wire tool name | mosmcp__get-meta-fields |
| Category | Yoast SEO (mosmcp-yoast) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_posts, edit_post (checked against the specific post) |
| Minimum default role | Contributor |
| Requires | Yoast SEO |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| post_id | integer | Yes | — | ID of the post/page/CPT entry. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| meta_title | string | The SEO title as stored, which may contain Yoast template variables. | |
| meta_title_rendered | string | The SEO title with template variables resolved — what a search engine will actually show. | |
| meta_description | string | ||
| focus_keyword | string | ||
| canonical_url | string | ||
| breadcrumb_title | string | Text used in breadcrumb trails. Empty means breadcrumbs fall back to the post title. | |
| robots_noindex | boolean | ||
| robots_nofollow | boolean | ||
| og_title | string | ||
| og_description | string | ||
| og_image | string | ||
| og_image_id | integer | ||
| twitter_title | string | ||
| twitter_description | string | ||
| twitter_image | string | ||
| twitter_image_id | integer | ||
| robots_noimageindex | boolean | ||
| robots_noarchive | boolean | ||
| robots_nosnippet | boolean | ||
| is_cornerstone | boolean | Whether Yoast treats this post as cornerstone content. | |
| schema_page_type | string | Schema.org page type override. Empty means the post type default applies. | |
| schema_article_type | string | Schema.org article type override. Empty means the post type default applies. | |
| allowed_page_types | string[] | The schema page types this Yoast version accepts, so a value can be chosen without guessing. | |
| allowed_article_types | string[] |
Example
Sample prompt
Show me all the Yoast SEO settings on my 'About Us' page (ID 42).
Example request (json)
{
"jsonrpc": "2.0",
"id": 393,
"method": "tools/call",
"params": {
"name": "mosmcp__get-meta-fields",
"arguments": {
"input": {
"post_id": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 393,
"result": {
"isError": false,
"structuredContent": {
"meta_title": "%%title%% %%sep%% %%sitename%%",
"meta_title_rendered": "About Us - Example Co",
"meta_description": "Meet the team behind Example Co.",
"focus_keyword": "about example co",
"canonical_url": "",
"breadcrumb_title": "About",
"robots_noindex": false,
"robots_nofollow": false,
"og_title": "",
"og_description": "",
"og_image": "",
"og_image_id": 0,
"twitter_title": "",
"twitter_description": "",
"twitter_image": "",
"twitter_image_id": 0,
"robots_noimageindex": false,
"robots_noarchive": false,
"robots_nosnippet": false,
"is_cornerstone": true,
"schema_page_type": "AboutPage",
"schema_article_type": "",
"allowed_page_types": [
"WebPage",
"ItemPage",
"AboutPage",
"FAQPage",
"ContactPage"
],
"allowed_article_types": [
"Article",
"BlogPosting",
"NewsArticle",
"None"
]
}
}
}
Edge cases / errors
- post_id that does not exist -> refused with ysoa_invalid_post; no edit rights on it -> ysoa_forbidden.
- Empty strings mean no per-post override is stored (Yoast falls back to its templates/defaults).
- If Yoast's variable replacer is unavailable, meta_title_rendered equals the stored template.
| << Previous | Next >> |
|---|---|
| Get Yoast Focus Keyword | Mark Post as Cornerstone Content |
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.