stensul-list-emails
Lists emails and templates with filters for name, type, library, tags, language, project and status.
The default field set already covers browsing and picking. Leave fields unset unless you have a reason.
Inputs
- qstringoptional
Search by name, author or tags.
- namestringoptional
Filter by email name.
- typesstring[]optional
Filter by email types, for example
["draft", "template"]. - library_keysstring[]optional
Filter by library keys.
- tagsstring[]optional
Filter by tags.
- tags_match_criteria"any" | "all"optional
Match criteria for the tags filter.
- languagestringoptional
Filter by language, for example
en-US. - project_idstring (24-char hex id)optional
Filter by project ID.
- is_archived0 | 1optional
Filter archived emails.
- has_been_uploaded0 | 1optional
Filter by uploaded status.
- has_modules_locked0 | 1optional
Filter by locked-modules status.
- includestringoptional
Include related resources, for example
outputs,snippets. - fieldsstringoptional
Comma-separated sparse fieldset.
idis always included. - sortstringoptional
Sort criteria; prefix
-for descending. - page_numberinteger ≥ 1optional
Page number.
- page_sizeinteger 1–30optional
Results per page (max 30, default 15).
Errors people hit
| What you see | Fix |
|---|---|
| 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.
{
"types": [
"template"
],
"library_keys": [
"acme_newsletters"
],
"page_size": 10
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "stensul-list-emails",
"arguments": {
"types": [
"template"
],
"library_keys": [
"acme_newsletters"
],
"page_size": 10
}
}
}A page of emails with name, type, tags, project, archived and upload status, locked and outdated modules, proof and approval state, library, language and last update.
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.