Get Custom Content Item


Reads one item of a custom content type in full: its text, every custom field with who manages it, its taxonomy terms, its place in the hierarchy, its featured image and its Elementor status. Fields managed by Advanced Custom Fields are labelled as such, because those must be changed with the ACF abilities.

Property Value
Ability slug mosmcp/cpt-get
Wire tool name mosmcp__cpt-get
Category Custom Content (mosmcp-cpt)
Plan Free

 

Required access

Requirement Value
Capability edit_post (checked against the specific post)
Minimum default role Contributor
Annotations readOnly: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
post_type string (min length 1) Yes — Which custom content type to work with, as reported by the list-types ability — for example "service" or "team_member".
id integer (min 1) Yes — The ID of the item.

 

Output schema

Field Type Required Description
id integer Yes
post_type string Yes
title string Yes
status string Yes
slug string
content string Body text, empty for types with no editor.
excerpt string
modified string
hierarchy object
hierarchy.parent_id integer
hierarchy.menu_order integer
hierarchy.child_count integer
hierarchy.hierarchical boolean
featured_image object
featured_image.supported boolean
featured_image.attachment_id integer
featured_image.url string
terms object[]
terms[].taxonomy string
terms[].terms object[]
fields object[] Yes The item's custom fields, which is where a custom type's real information lives.
fields[].key string
fields[].value string
fields[].repeatable boolean
fields[].registered boolean
fields[].managed_by string "registered", "unregistered", or "acf" when Advanced Custom Fields owns the field.
fields[].writable boolean Whether the generic field abilities may change this field. Answers the same check the write ability performs, so a field reported writable here will not be refused there.
fields[].not_writable_reason string Why the field cannot be written, when it cannot: for example field_managed_by_acf, field_not_writable or field_protected_and_unregistered. Empty when it is writable.
elementor object
elementor.enabled boolean
elementor.has_data boolean
page_template string
edit_url string
view_url string

 

Example

Sample prompt
Show me everything stored on the 'Strategy Workshop' service, including its price field.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 137,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__cpt-get",
    "arguments": {
      "input": {
        "post_type": "service",
        "id": 42
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 137,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "post_type": "service",
      "title": "Strategy Workshop",
      "status": "publish",
      "slug": "strategy-workshop",
      "content": "<p>A half-day session to plan your year.</p>",
      "excerpt": "",
      "modified": "2026-09-20 14:05:00",
      "hierarchy": {
        "parent_id": 0,
        "menu_order": 0,
        "child_count": 0,
        "hierarchical": false
      },
      "featured_image": {
        "supported": true,
        "attachment_id": 318,
        "url": "https://example.com/wp-content/uploads/2026/09/workshop.jpg"
      },
      "terms": [
        {
          "taxonomy": "service_category",
          "terms": [
            {
              "term_id": 7,
              "name": "Consulting",
              "slug": "consulting"
            }
          ]
        }
      ],
      "fields": [
        {
          "key": "price",
          "value": "450",
          "repeatable": false,
          "registered": true,
          "managed_by": "registered",
          "writable": true,
          "not_writable_reason": ""
        }
      ],
      "elementor": {
        "enabled": true,
        "has_data": false
      },
      "page_template": "",
      "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit",
      "view_url": "https://example.com/services/strategy-workshop/"
    }
  }
}

 

Edge cases / errors

  • No item with that id → item_not_found.
  • Item exists but belongs to another type → wrong_post_type, naming the type it actually is.
  • Internal WordPress/Elementor meta (wp, edit, **_elementor*, _thumbnail_id ...) and ACF's hidden key rows are omitted from fields**.
  • Each field's writable / not_writable_reason comes from the same check the set-field ability runs, e.g. field_managed_by_acf or field_protected_and_unregistered; long values are truncated to 500 characters.

 


<< Previous Next >>
Duplicate Custom Content Item Get Custom Content 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.