PerspectPerspectDocs
Go to Admin
View as Markdown

Email Templates

This reference is auto-generated from the registered MCP tool providers in perspectapiworkers. It reflects the tools exposed by the per-site Perspect MCP server.

Connection

Use the per-site MCP endpoint:

https://perspect.com/mcp/{siteName}

Authenticate with OAuth or an MCP API key using Authorization: Bearer sk_mcp_....

Tools

email_template_clone

Title: Clone Email Template Version

Create a new template version from an existing template version with optional edits

Required permission: templates.create

Parameters

Parameter Type Required Default Description
template_id string Yes — Source email template ID to clone
template_name string No — Name for the new template version
subject_template string No — Override subject template
html_template string No — Override HTML template
text_template string No — Override text template
description string No — Optional description override
status string No "draft" Initial status for the cloned version Allowed: draft, published.

Example call

{
  "tool": "email_template_clone",
  "arguments": {
    "template_id": "string",
    "status": "draft"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "source_template_id": {
      "type": "string"
    },
    "template": {
      "type": "object",
      "additionalProperties": true
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "success",
    "source_template_id",
    "template",
    "variables"
  ]
}

email_template_create

Title: Create Email Template Version

Create a new email template version. Use email_template_types to see available types and their allowed variables. Use email_template_variables to get the variable list for a specific type. Templates support versioning: create as draft, then publish with email_template_publish. Clone existing templates with email_template_clone for A/B testing.

Required permission: templates.create

Parameters

Parameter Type Required Default Description
template_type string Yes — Email template type Allowed: order_customer_receipt, order_admin_notification, signup_welcome, order_fulfillment_notification, order_cancellation_notification, subscription_cancelled, subscription_cancellation_admin_notification, subscription_plan_changed, subscription_plan_changed_admin_notification, newsletter, customer_support.
template_name string Yes — Template version name
subject_template string Yes — Subject template
html_template string Yes — HTML template
text_template string Yes — Text template
description string No — Optional description
status string No "draft" Initial status Allowed: draft, published.

Example call

{
  "tool": "email_template_create",
  "arguments": {
    "template_type": "order_customer_receipt",
    "template_name": "string",
    "subject_template": "string",
    "html_template": "string",
    "text_template": "string",
    "status": "draft"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "template": {
      "type": "object",
      "additionalProperties": true
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "success",
    "template",
    "variables"
  ]
}

email_template_get

Title: Get Email Template

Get a specific email template version by ID

Required permission: templates.read

Parameters

Parameter Type Required Default Description
template_id string Yes — Email template ID

Example call

{
  "tool": "email_template_get",
  "arguments": {
    "template_id": "string"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "template": {
      "type": "object",
      "additionalProperties": true
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "template",
    "variables"
  ]
}

email_template_get_published

Title: Get Published Email Template

Get the currently published template version for a template type

Required permission: templates.read

Parameters

Parameter Type Required Default Description
template_type string Yes — Email template type Allowed: order_customer_receipt, order_admin_notification, signup_welcome, order_fulfillment_notification, order_cancellation_notification, subscription_cancelled, subscription_cancellation_admin_notification, subscription_plan_changed, subscription_plan_changed_admin_notification, newsletter, customer_support.

Example call

{
  "tool": "email_template_get_published",
  "arguments": {
    "template_type": "order_customer_receipt"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "template": {
      "type": "object",
      "additionalProperties": true
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "template",
    "variables"
  ]
}

email_template_list

Title: List Email Templates

List template versions for the connected site

Required permission: templates.read

Parameters

Parameter Type Required Default Description
template_type string No — Filter by template type Allowed: order_customer_receipt, order_admin_notification, signup_welcome, order_fulfillment_notification, order_cancellation_notification, subscription_cancelled, subscription_cancellation_admin_notification, subscription_plan_changed, subscription_plan_changed_admin_notification, newsletter, customer_support.
status string No — Filter by template status Allowed: draft, published, archived.

Example call

{
  "tool": "email_template_list",
  "arguments": {}
}

Output schema

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "pagination": {
      "type": "object",
      "properties": {
        "total": {
          "type": "number"
        }
      },
      "required": [
        "total"
      ]
    },
    "supported_types": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "items",
    "pagination",
    "supported_types"
  ]
}

email_template_publish

Title: Publish Email Template Version

Publish a template version and archive the currently published one for that type. Valid from: draft.

Required permission: templates.publish

Parameters

Parameter Type Required Default Description
template_id string Yes — Email template ID to publish

Example call

{
  "tool": "email_template_publish",
  "arguments": {
    "template_id": "string"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "template": {
      "type": "object",
      "additionalProperties": true
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "success",
    "template",
    "variables"
  ]
}

email_template_types

Title: List Email Template Types

List supported email template types and their allowed variables

Required permission: templates.read

Parameters

This tool accepts no arguments.

Example call

{
  "tool": "email_template_types",
  "arguments": {}
}

Output schema

{
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "template_type": {
            "type": "string"
          },
          "variables": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "template_type",
          "variables"
        ]
      }
    }
  },
  "required": [
    "items"
  ]
}

email_template_variables

Title: Get Template Variables

Get allowed variables for a specific email template type

Required permission: templates.read

Parameters

Parameter Type Required Default Description
template_type string Yes — Email template type Allowed: order_customer_receipt, order_admin_notification, signup_welcome, order_fulfillment_notification, order_cancellation_notification, subscription_cancelled, subscription_cancellation_admin_notification, subscription_plan_changed, subscription_plan_changed_admin_notification, newsletter, customer_support.

Example call

{
  "tool": "email_template_variables",
  "arguments": {
    "template_type": "order_customer_receipt"
  }
}

Output schema

{
  "type": "object",
  "properties": {
    "template_type": {
      "type": "string"
    },
    "variables": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "template_type",
    "variables"
  ]
}

This page is generated from the registered MCP tool providers. Do not edit it by hand.