Find Post (ID by Name / Name by ID)


Looks up posts to resolve a post ID from a title/name, or a title from a post ID. Use this FIRST whenever the user refers to a post by its name and another ability requires a post ID. Provide "search" with the full or partial post title to get matching posts with their IDs, or provide "id" to get that post's title and details. Searches all statuses. Returns up to 10 matches plus the total number of matches.

Property Value
Ability slug mosmcp/post-find
Wire tool name mosmcp__post-find
Category Posts (mosmcp-posts)
Plan Free

 

Required access

Requirement Value
Capability edit_posts
Minimum default role Contributor
Annotations readOnly: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
search string (min length 1) — Full or partial post title/name to search for. Provide either this or "id".
id integer (min 1) — A post ID to look up the title and details for. Provide either this or "search".

 

Output schema

Field Type Required
showing integer Yes
total integer Yes
matches object[] Yes
matches[].id integer Yes
matches[].title string Yes
matches[].status string Yes
matches[].author_name string
matches[].date string
matches[].edit_url string
notes string[]

 

Example

Sample prompt
Find my post about the pumpkin soup recipe.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__post-find",
    "arguments": {
      "input": {
        "search": "pumpkin soup"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {
    "isError": false,
    "structuredContent": {
      "showing": 1,
      "total": 1,
      "matches": [
        {
          "id": 42,
          "title": "Pumpkin Soup",
          "status": "publish",
          "author_name": "Jane Doe",
          "date": "2026-09-20 08:00:00",
          "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit"
        }
      ]
    }
  }
}

 

Edge cases / errors

  • Neither search nor id given → refused with missing_input.
  • id that is not a post, or one the caller cannot read → empty result (total 0), not an error.
  • No post matches the title but a page or other content type does → notes names it and the ability to use (e.g. mosmcp/page-find).
  • Searches titles only, across all statuses including trash, returning at most 10 matches newest-modified first; users who cannot edit others' posts only see their own.

 


<< Previous Next >>
Duplicate Post Get Post

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.