Skip to main content
The MainWP Favorites Add-on registers three read-only abilities in the mainwp-favorites category. All use the mainwp/ namespace on your MainWP Dashboard. Use these abilities when a script, AI assistant, or MCP client needs to see which plugins and themes you saved as favorites and how you grouped them. For example, you can list the plugins in a “Starter Kit” group before planning a new site build. The abilities only read data. They do not add, edit, or delete favorites or groups, refresh version info, or install anything on child sites.

What You’ll Learn

  • List saved favorite plugins and themes with type and group filters
  • Read one saved favorite and its group memberships
  • List favorite groups with item counts
  • Understand which URLs are returned and which are omitted

Prerequisites

  • WordPress 6.9 or later on the MainWP Dashboard site
  • MainWP Dashboard with Abilities API support; use version 6.2 or later for the input_json examples below
  • A Favorites Add-on release with Abilities support, active in MainWP Dashboard
  • An authenticated WordPress user with manage_options
  • Access to the Favorites Add-on in MainWP Dashboard
Team Control restrictions apply. Each ability checks the Dashboard abilities permission and the user’s access to the Favorites Add-on. Use an Application Password or the authentication methods in the Abilities API overview. The examples use an Application Password.

Available Abilities

Discover the abilities and their full input and output schemas:
All three abilities are marked readonly: true, destructive: false, and idempotent: true.

List Favorite Items

Ability: mainwp/list-favorite-items-v1
Method: GET
All inputs are optional. Without input, the ability returns the first 20 saved plugins and themes.
Example response:
total counts all matching items before pagination. Requesting a page past the last one returns an empty items array with the same total.

Get a Favorite Item

Ability: mainwp/get-favorite-item-v1
Method: GET
The only input is the required item_id, a positive integer. Get item IDs from mainwp/list-favorite-items-v1.
The response is a single item object with the same fields as one entry in the items array above.

Item fields

Returned URLs

The abilities never return download URLs, uploaded ZIP file paths, or stored filenames. Custom download links can contain access tokens, so the Add-on applies these rules:
  • author_uri and item_uri drop any username, query string, or fragment. They are omitted when the URL is invalid, points to a download, package, or ZIP path, matches the item’s saved download URL, or points to the Favorites uploads folder.
  • item_link is returned only for plain https://wordpress.org/plugins/<slug>/ or https://wordpress.org/themes/<slug>/ pages. External and uploaded items do not include item_link.
  • Items saved as a bare WordPress.org slug return slug but no item_link.
Optional URL fields are left out of the response rather than returned as empty strings.

List Favorite Groups

Ability: mainwp/list-favorite-groups-v1
Method: GET
All inputs are optional.
Example response:

Handle Errors

WordPress can reject invalid input against the public schema before the Add-on callback runs. MainWP Dashboard also returns HTTP 401 for unauthenticated requests.