# stensul-read-email

> Reads an email or template. The default `plan` view returns its full structure with repeated styles and guardrails deduplicated, which is what you need before building or editing.

Source: https://stensul.com/developers/reference/stensul-read-email/ · From the live server's tool list, 2026-09-28

- Scope: `emails:read`
- Access: read

Structure is modules → rows → columns → elements, in order. Elements of the same type in different modules can share an id, so always pair module id and element id. Keep the returned `save_version` and pass it to your next write so a stale edit fails instead of overwriting newer work.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `emailId` | string (24-char hex id) | yes | Email ID. |
| `view` | "plan" \| "raw" \| "meta" | no | `plan` (default, compact and lossless), `raw` (undeduplicated, for diagnostics), `meta` (settings and metadata only). |

## Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "stensul-read-email",
    "arguments": {
      "emailId": "64f0c0ffee0000000000abcd",
      "view": "plan"
    }
  }
}
```

## Response

Metadata, the module layout with `styleProfiles` and `guardrailProfiles` tables, a `visibility` field on elements that can be hidden, a `variations` block and the email's `save_version`. Custom elements expose editable variables, never markup.

## Errors

| Status | Message | Cause | 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. |
