Developers
Get access

stensul-get-libraries

Lists libraries, or returns everything needed to work in one: its modules, variations, Segment Set support, languages, tags and which email settings it enables.

readScope libraries:read

Call it with no key to browse. Call it with library_key or library_id before building, because the library decides which settings fields are allowed (subject_line_enabled, preheader_enabled, title_enabled) and their character caps.

Inputs

  • library_keystringoptional

    Library key, for example acme_newsletters. Returns that library's full context.

  • library_idstring (24-char hex id)optional

    Library ID. Returns that library's full context.

  • namestringoptional

    List mode only: filter by library name.

  • page_numberinteger ≥ 1optional

    List mode only: page number.

  • page_sizeinteger 1–30optional

    List mode only: results per page (max 30, default 15).

  • sortstringoptional

    List mode only: name, created_at or updated_at; prefix - for descending.

Errors people hit

What you seeFix
401 Authentication expired or missing
The session's authorization expired.
Sign in again when the host prompts. On a 401 or 403, the server's instructions tell the model to re-check sign-in first.
403 Insufficient OAuth scope (403): The token lacks the required scope
The API connection doesn't have the scope this tool needs.
An admin adds the scope to the API connection. Then sign in again: adding a scope revokes existing tokens.
403 API error (403): Action is unauthorized.
The signed-in user's role lacks the permission, for example edit_campaign.
Grant the permission to the user's role in Admin > Users & Roles. It works for other users on the same connection.

All errors: Errors and troubleshooting.

{
  "library_key": "acme_newsletters"
}
Response

List mode: a page of libraries. Library mode: the module inventory (by role, and as ordered keys with the variations each implements), the variations mode (all or individual) and named variations, dca_segment_sets.supported, supported languages, tags, enabled settings fields and their length caps.

Described from the tool's definition. Captured responses from a Stensul-internal tenant will replace this.

Example values use invented brands and ids. Tool list captured 2026-09-28.

Esc