snippets/get-library-snippet reads one library snippet by its library ID: what it claims to do, its code type, its details.
Read it before installing. A library snippet is third-party code that will run on this site once activated.
At a glance
| Ability | snippets/get-library-snippet |
| 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 search results carry enough to choose between snippets. They do not carry enough to decide whether you want this one running on your site, and that decision is the whole point of the gap between searching and installing.
The code type is the first thing to look at. A CSS snippet from the library is styling; a PHP snippet is arbitrary code executing in your site’s context with your database credentials available to it. Both are perfectly reasonable things to install; they are not the same decision.
Reading here costs nothing and installs nothing. The install is a separate, confirmed call.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
library_id | integer | Yes | Library snippet ID, from snippets/search-library. |
What comes back
| Name | Type | What it is |
|---|---|---|
snippet | object | The library snippet: title, note, category, code type and details. |
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:
What does library snippet 3312 actually do?
It resolves to one call:
{
"ability": "snippets/get-library-snippet",
"parameters": {
"library_id": 3312
}
}Worth knowing
- Reading installs nothing.
- Check the code type. PHP from the library runs with full access to the site.
- Fetching the body requires the site to be signed in to the library.
Related abilities
- Install Library Snippet — install it once you are satisfied
- Search Snippet Library — find the library ID
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category