WordPress Abilities API tools so MCP agents can find files inside editorial workspaces.
Use these before a generic media or post search when someone asks where a project file lives.
Ability index
| Ability | Permission | Side effects |
|---|---|---|
prc-publish-workflows/search-workspaces | edit_posts | Read-only |
prc-publish-workflows/get-workspace | edit_posts | Read-only |
Category: publish-workflows
Meta: show_in_rest: true, MCP public tools, readonly / idempotent
Access: same as Workspaces REST — the current user must own the workspace or be a watcher (administrators can access all).
Source: includes/class-ability.php, includes/class-ability-categories.php, includes/workspaces/class-workspace-search.php
prc-publish-workflows/search-workspaces
Call this first. Example user ask: “where is the Christian icon file for the religious projections project”.
Input
-
querystring required -
Keywords from the user (project name, file name, or both).
-
limitnumber -
Maximum workspaces to return (1–25).
-
site_idnumber -
Multisite blog ID via platform AI utils. Defaults to the content site (20).
No fields match this filter.
Each match includes:
workspace.url— admin screen (index.php?page=prc-publish-workflows-workspaces&workspace={id})items[]— collected items whose labels, filenames, or URLs matched;items[].urlis the best openable link (file URL, permalink, or stored link)matchedOn—title,description, and/oritems
Always show both the item URL and the workspace URL. If a workspace matches and items is empty, call get-workspace with that id to list every collected item.
If the plugin is inactive on the target site, the ability returns plugin_inactive_on_site.
prc-publish-workflows/get-workspace
Input
-
workspace_idnumber required -
Workspace post ID from search-workspaces.
-
site_idnumber -
Multisite blog ID via platform AI utils.
No fields match this filter.
Returns { id, title, description, url, items } for one accessible workspace. url is the workspace admin screen. Each item includes url, viewUrl, and editUrl.