> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lettr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Reference

> Complete reference for every Lettr MCP tool for sending, templates, domains, analytics, and monitoring across the remote and local servers.

This reference documents every tool available through Lettr's MCP servers. Some tools are available on both the [remote](/learn/mcp/setup) and [local](/learn/mcp/local-setup) servers, while others are exclusive to one.

<Note>
  The remote server uses underscores in tool names (e.g., `send_email`) while the local server uses hyphens (e.g., `send-email`). The functionality is equivalent.
</Note>

## Tool Availability

| Category          | Tool                                   | Remote | Local |
| ----------------- | -------------------------------------- | ------ | ----- |
| **Sending**       | send\_email                            | Yes    | Yes   |
| **Sending**       | send\_template\_email                  | Yes    | —     |
| **Templates**     | list\_templates                        | Yes    | Yes   |
| **Templates**     | get\_template                          | Yes    | Yes   |
| **Templates**     | create\_template                       | Yes    | Yes   |
| **Templates**     | update\_template                       | Yes    | Yes   |
| **Templates**     | delete\_template                       | —      | Yes   |
| **Templates**     | get\_merge\_tags                       | —      | Yes   |
| **Domains**       | list\_sending\_domains / list\_domains | Yes    | Yes   |
| **Domains**       | list\_tracking\_domains                | Yes    | —     |
| **Domains**       | list\_inbound\_domains                 | Yes    | —     |
| **Domains**       | list\_storage\_domains                 | Yes    | —     |
| **Domains**       | create\_domain                         | —      | Yes   |
| **Domains**       | get\_domain                            | —      | Yes   |
| **Domains**       | delete\_domain                         | —      | Yes   |
| **Domains**       | verify\_domain                         | —      | Yes   |
| **Configuration** | list\_api\_keys                        | Yes    | —     |
| **Configuration** | list\_webhooks                         | Yes    | Yes   |
| **Configuration** | get\_webhook                           | —      | Yes   |
| **Analytics**     | get\_analytics                         | Yes    | —     |
| **Analytics**     | list\_template\_stats                  | Yes    | —     |
| **Monitoring**    | browse\_email\_events                  | Yes    | —     |
| **Monitoring**    | browse\_api\_logs                      | Yes    | —     |

***

## Email Sending

### send\_email

Send an email with plain text, HTML, or AMP HTML content. Supports merge tags for variable substitution.

**Available on:** Remote, Local

| Parameter           | Type   | Required | Description                                                   |
| ------------------- | ------ | -------- | ------------------------------------------------------------- |
| `from`              | string | Yes      | Sender email address. Must be from a verified sending domain. |
| `to`                | string | Yes      | Recipient email address.                                      |
| `subject`           | string | Yes      | Email subject line (max 998 characters).                      |
| `html`              | string | No       | HTML content. Supports merge tags like `{{variable_name}}`.   |
| `text`              | string | No       | Plain text content. Supports merge tags.                      |
| `amp_html`          | string | No       | AMP HTML content for interactive emails.                      |
| `from_name`         | string | No       | Display name for the sender.                                  |
| `reply_to`          | string | No       | Reply-to email address.                                       |
| `cc`                | string | No       | CC recipient email address.                                   |
| `bcc`               | string | No       | BCC recipient email address.                                  |
| `substitution_data` | object | No       | Key-value pairs for merge tag substitution.                   |

**Example prompt:** "Send a welcome email to [john@example.com](mailto:john@example.com) from [hello@mycompany.com](mailto:hello@mycompany.com) with the subject 'Welcome to Acme'"

***

### send\_template\_email

Send an email using a pre-defined template specified by its slug.

**Available on:** Remote only

| Parameter           | Type    | Required | Description                                                                |
| ------------------- | ------- | -------- | -------------------------------------------------------------------------- |
| `from`              | string  | Yes      | Sender email address. Must be from a verified sending domain.              |
| `to`                | string  | Yes      | Recipient email address.                                                   |
| `subject`           | string  | Yes      | Email subject line. Can include merge tags.                                |
| `template_slug`     | string  | Yes      | The slug of the template to use (e.g., `welcome-email`).                   |
| `from_name`         | string  | No       | Display name for the sender.                                               |
| `reply_to`          | string  | No       | Reply-to email address.                                                    |
| `project_id`        | integer | No       | Project ID where the template is located. Uses default project if omitted. |
| `template_version`  | integer | No       | Specific version number. Uses active version if omitted.                   |
| `substitution_data` | object  | No       | Key-value pairs for merge tag substitution.                                |

**Example prompt:** "Send the order-confirmation template to [customer@example.com](mailto:customer@example.com) with order\_id 12345"

<Tip>
  On the local server, the `send-email` tool supports template-based sending directly via a `template_slug` parameter.
</Tip>

***

## Template Management

### list\_templates

Lists all email templates for your team with metadata including name, slug, editor type, version count, and merge tags.

**Available on:** Remote, Local

| Parameter    | Type    | Required | Description                                                                  |
| ------------ | ------- | -------- | ---------------------------------------------------------------------------- |
| `project_id` | integer | No       | Filter templates by project. Returns templates from all projects if omitted. |

**Example prompt:** "List all my email templates" or "What templates are in project 3?"

***

### get\_template

Gets detailed information about a specific template, including its HTML content and merge tags.

**Available on:** Remote, Local

| Parameter       | Type    | Required | Description                                        |
| --------------- | ------- | -------- | -------------------------------------------------- |
| `template_id`   | integer | No       | The numeric ID of the template.                    |
| `template_slug` | string  | No       | The slug of the template (e.g., `welcome-email`).  |
| `project_id`    | integer | No       | Project ID to narrow the search when using a slug. |

<Note>
  Provide either `template_id` or `template_slug` to identify the template.
</Note>

**Example prompt:** "Show me the HTML content of the welcome-email template"

***

### create\_template

Creates a new Custom HTML email template.

**Available on:** Remote, Local

| Parameter    | Type    | Required | Description                                                   |
| ------------ | ------- | -------- | ------------------------------------------------------------- |
| `name`       | string  | Yes      | Display name for the template.                                |
| `folder_id`  | integer | Yes      | The folder ID where the template will be created.             |
| `slug`       | string  | No       | URL-friendly identifier. Auto-generated from name if omitted. |
| `project_id` | integer | No       | Project ID. Uses default project if omitted.                  |
| `html`       | string  | No       | Initial HTML content for the template.                        |
| `subject`    | string  | No       | Default subject line for the template.                        |

**Example prompt:** "Create a new template called 'Invoice Reminder' in folder 1 with a basic HTML layout"

***

### update\_template

Updates a template's content and creates a new active version. Supports both Custom HTML and Topol editor templates.

**Available on:** Remote, Local

| Parameter       | Type    | Required | Description                                        |
| --------------- | ------- | -------- | -------------------------------------------------- |
| `template_id`   | integer | No       | The numeric ID of the template.                    |
| `template_slug` | string  | No       | The slug of the template.                          |
| `project_id`    | integer | No       | Project ID to narrow the search when using a slug. |
| `html`          | string  | No       | Updated HTML content (for Custom HTML templates).  |
| `json`          | string  | No       | Updated Topol editor JSON (for Topol templates).   |

<Note>
  Provide either `template_id` or `template_slug` to identify the template. Each update creates a new version automatically.
</Note>

**Example prompt:** "Update the welcome-email template with new HTML content"

***

### delete\_template

Permanently deletes a template and all its versions.

**Available on:** Local only

| Parameter       | Type    | Required | Description                                        |
| --------------- | ------- | -------- | -------------------------------------------------- |
| `template_id`   | integer | No       | The numeric ID of the template.                    |
| `template_slug` | string  | No       | The slug of the template.                          |
| `project_id`    | integer | No       | Project ID to narrow the search when using a slug. |

**Example prompt:** "Delete the old-welcome-email template"

***

### get\_merge\_tags

Retrieves the merge tag variables that a template expects, so you know which substitution data to provide when sending.

**Available on:** Local only

| Parameter       | Type    | Required | Description                                        |
| --------------- | ------- | -------- | -------------------------------------------------- |
| `template_id`   | integer | No       | The numeric ID of the template.                    |
| `template_slug` | string  | No       | The slug of the template.                          |
| `project_id`    | integer | No       | Project ID to narrow the search when using a slug. |

**Example prompt:** "What merge tags does the order-confirmation template expect?"

***

## Domain Management

### list\_sending\_domains / list\_domains

Lists all sending domains configured for your team with verification status, DNS configuration status, and whether they can be used for sending.

**Available on:** Remote (`list_sending_domains`), Local (`list-domains`)

**Parameters:** None

**Example prompt:** "Show me all my sending domains and their verification status"

***

### list\_tracking\_domains

Lists all tracking domains configured for your team. Tracking domains are used to track email opens and clicks with your own branded domain.

**Available on:** Remote only

**Parameters:** None

**Example prompt:** "What tracking domains do I have set up?"

***

### list\_inbound\_domains

Lists all inbound domains configured for your team. Inbound domains receive emails via MX records.

**Available on:** Remote only

**Parameters:** None

***

### list\_storage\_domains

Lists all email storage domains configured for your team. Storage domains serve email assets (images, files) from your branded domain.

**Available on:** Remote only

**Parameters:** None

***

### create\_domain

Registers a new sending domain.

**Available on:** Local only

| Parameter | Type   | Required | Description                                                      |
| --------- | ------ | -------- | ---------------------------------------------------------------- |
| `domain`  | string | Yes      | The domain name to register (e.g., `notifications.example.com`). |

**Example prompt:** "Add notifications.example.com as a sending domain"

***

### get\_domain

Gets detailed information about a sending domain, including its DNS records for SPF, DKIM, and DMARC setup.

**Available on:** Local only

| Parameter   | Type   | Required | Description                       |
| ----------- | ------ | -------- | --------------------------------- |
| `domain_id` | string | Yes      | The ID of the domain to retrieve. |

**Example prompt:** "Show me the DNS records for my sending domain"

***

### delete\_domain

Removes a sending domain from your account.

**Available on:** Local only

| Parameter   | Type   | Required | Description                     |
| ----------- | ------ | -------- | ------------------------------- |
| `domain_id` | string | Yes      | The ID of the domain to delete. |

**Example prompt:** "Remove the old.example.com sending domain"

***

### verify\_domain

Triggers DNS verification for a sending domain to check if SPF and DKIM records are properly configured.

**Available on:** Local only

| Parameter   | Type   | Required | Description                     |
| ----------- | ------ | -------- | ------------------------------- |
| `domain_id` | string | Yes      | The ID of the domain to verify. |

**Example prompt:** "Verify the DNS records for my sending domain"

***

## Configuration

### list\_api\_keys

Lists all API keys for your team, showing each key's name, key ID, prefix, permissions level, and IP whitelist configuration.

**Available on:** Remote only

**Parameters:** None

**Example prompt:** "List my API keys and their permissions"

***

### list\_webhooks

Lists all webhooks configured for your team, including target URL, enabled status, event types, authentication type, and delivery health indicators.

**Available on:** Remote, Local

**Parameters:** None

***

### get\_webhook

Gets detailed information about a specific webhook, including its delivery status and configuration.

**Available on:** Local only

| Parameter    | Type   | Required | Description                        |
| ------------ | ------ | -------- | ---------------------------------- |
| `webhook_id` | string | Yes      | The ID of the webhook to retrieve. |

**Example prompt:** "Show me the details for my delivery webhook"

***

## Analytics

### get\_analytics

Returns aggregate email delivery analytics with a daily breakdown, including targeted, accepted, bounced, and opened counts.

**Available on:** Remote only

| Parameter | Type   | Required | Description                                                           |
| --------- | ------ | -------- | --------------------------------------------------------------------- |
| `from`    | string | No       | Start date in ISO 8601 format. Default: 7 days ago. Max 90 days back. |
| `to`      | string | No       | End date in ISO 8601 format. Default: now.                            |

**Example prompt:** "Show me my email delivery stats for the last 30 days"

***

### list\_template\_stats

Lists templates with delivery statistics broken down by campaign, including sent, delivered, opened, and bounced counts.

**Available on:** Remote only

| Parameter    | Type    | Required | Description                                                   |
| ------------ | ------- | -------- | ------------------------------------------------------------- |
| `project_id` | integer | No       | Filter by project. Returns stats for all projects if omitted. |
| `from`       | string  | No       | Start date in ISO 8601 format. Default: 30 days ago.          |
| `to`         | string  | No       | End date in ISO 8601 format. Default: now.                    |

**Example prompt:** "Which of my templates has the best open rate this month?"

***

## Monitoring

### browse\_email\_events

Browse email delivery events with optional filtering and pagination.

**Available on:** Remote only

| Parameter    | Type    | Required | Description                                                                                                                                                                                                                                                           |
| ------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `limit`      | integer | No       | Number of events to return (10, 25, 50, or 100). Default: 25.                                                                                                                                                                                                         |
| `recipient`  | string  | No       | Filter by recipient email address. Supports partial matching.                                                                                                                                                                                                         |
| `from`       | string  | No       | Start date/time in ISO 8601 format.                                                                                                                                                                                                                                   |
| `to`         | string  | No       | End date/time in ISO 8601 format.                                                                                                                                                                                                                                     |
| `event_type` | string  | No       | Filter by event type: `delivery`, `injection`, `open`, `initial_open`, `click`, `bounce`, `out_of_band`, `delay`, `spam_complaint`, `policy_rejection`, `generation_rejection`, `generation_failure`, `list_unsubscribe`, `link_unsubscribe`, `amp_open`, `amp_click` |
| `cursor`     | string  | No       | Pagination cursor from a previous response.                                                                                                                                                                                                                           |

**Example prompt:** "Show me the last 10 bounced emails" or "What emails were sent to [john@example.com](mailto:john@example.com) today?"

***

### browse\_api\_logs

Browse API request logs with optional filtering and pagination.

**Available on:** Remote only

| Parameter      | Type    | Required | Description                                                                                                       |
| -------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------- |
| `limit`        | integer | No       | Number of log entries (1, 20, 50, or 100). Default: 20.                                                           |
| `from`         | string  | No       | Start date/time in ISO 8601 format. Max 30 days back. Default: 7 days ago.                                        |
| `to`           | string  | No       | End date/time in ISO 8601 format. Default: now.                                                                   |
| `api_key_name` | string  | No       | Filter by API key name (case-insensitive).                                                                        |
| `user_agent`   | string  | No       | Filter by client type: `php`, `curl`, `nodejs`, `python`, `ruby`, `go`, `rust`, `java`, `dotnet`, `smtp`, `other` |
| `status`       | integer | No       | Filter by HTTP status code (e.g., 200, 400, 500).                                                                 |
| `cursor`       | string  | No       | Pagination cursor from a previous response.                                                                       |

**Example prompt:** "Show me failed API requests from the last 24 hours" or "Were there any 500 errors today?"

***

## Related Topics

<CardGroup cols={2}>
  <Card title="Remote Server Setup" icon="cloud" href="/learn/mcp/setup">
    Connect via OAuth from Claude.ai, ChatGPT, and other AI clients
  </Card>

  <Card title="Local Server Setup" icon="terminal" href="/learn/mcp/local-setup">
    Install the lettr-mcp package for your IDE or CLI
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Full REST API documentation
  </Card>

  <Card title="Template Language" icon="file-code" href="/learn/templates/template-language">
    Merge tag syntax and template variables
  </Card>
</CardGroup>
