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-only
WPCode Content & Tools wpcode/search-library

Search 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.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.