Search WPCode Library is a WordPress ability from WPCode — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.
Install Free Plugin →Search WPCode Library
Read-onlySearch the WPCode Cloud Library of pre-built snippet templates by keyword.
Requires the WPCode (Insert Headers and Footers) plugin on WordPress 6.9+. All five abilities are read-only. 'list-snippets', 'detect-snippet-errors', and 'search-library' require the 'wpcode_edit_snippets' capability, while 'get-error-logs' and 'get-settings' require WordPress's 'manage_options' capability.
What it does
This ability queries the WPCode Cloud Library — the plugin's built-in catalog of ready-made snippet templates — for entries matching a given keyword, searching against both the snippet title and its note/description. It lazy-loads the library, file cache, and library auth classes if they aren't already active, then returns each matching result's ID, title, description, primary category, and tags. This lets an AI assistant discover existing, vetted snippets to recommend before suggesting custom code be written from scratch.
See it in action
You ask your AI assistant
"Search the WPCode library for snippets related to 'disable comments' and list what's available."
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| keyword | string | Yes | The keyword to search for in the WPCode Cloud Library's snippet titles and descriptions. |
Returns
An array of matching library snippet objects, each with id, title, description, category, and tags.
Permission
The current user must have the 'wpcode_edit_snippets' capability.
More WPCode abilities
Detect Snippet Errors
Check whether WPCode's error handler has flagged a specific snippet, and get the failure details.
Get Error Logs
Pull the full stack trace and file list of recent snippet-related failures site-wide.
Get WPCode Settings
Read WPCode's global settings, including plugin version and Safe Mode status.
List Code Snippets
Get a summary of every WPCode snippet, its status, and whether it's currently erroring.