snippets/search-library searches WPCode’s hosted library of ready-made snippets, and returns the library ID an install needs.
Searching installs nothing and runs nothing.
At a glance
| Ability | snippets/search-library |
| Toolset | WPCode — toolset/wpcode |
| Group | WPCode › The Library |
| Requires | WPCode, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
The library is WPCode’s collection of prewritten snippets — disable comments, add a favicon, change the login logo, the standard requests. Searching it is the fast path to a solution somebody has already written and tested.
Searching works without being signed in to the library. Fetching a snippet body does not, which is why the response reports the connection state and, when disconnected, where to connect. You can browse and plan without an account and then find you cannot install.
What comes back is metadata: title, note, category, code type, library ID. Read the snippet itself with snippets/get-library-snippet before installing — especially the code type, since a PHP snippet from the library is still code that will run on your site.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
search | string | No | Free text matched against title, note and category. Omit to list everything. |
per_page | integer | No | Maximum rows to return. |
What comes back
| Name | Type | What it is |
|---|---|---|
results | array | Matching library snippets with their library IDs. |
library_connected | boolean | Whether the site is signed in to the library. |
connect_url | string | Where to connect, when it is not. |
count | integer | How many results were returned. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Is there a ready-made snippet for disabling the REST API for logged-out users?
It resolves to one call:
{
"ability": "snippets/search-library",
"parameters": {
"search": "rest api"
}
}Worth knowing
- Searching needs no account. Installing does.
- Nothing is installed or executed by searching.
- Note the code type in the results — a PHP snippet is code that will run here.
Related abilities
- Get Library Snippet — read it before installing
- Install Library Snippet — bring it onto the site
- List Snippet Packs — themed bundles of these
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category