Skip to main content
Glama

get_personalized_preview

Preview personalized content by resolving user and event attribute placeholders for email, push, or SMS channels. Verify replacements before sending campaigns.

Instructions

Get a personalized preview with all {{UserAttribute[...]}} and {{EventAttribute[...]}} placeholders resolved.

channel: EMAIL, PUSH, or SMS. personalization_details: Dict with user_attributes, event_attributes, and/or event_name. event_name (str) is required when event_attributes are provided (event-triggered personalization). Example (user attrs): {"user_attributes": {"First Name": "Alice"}} Example (event attrs): {"event_name": "App Opened", "event_attributes": {"App_Version": "1.0"}} payload: Dict of content fields with placeholder strings to render. Example: {"subject": "Hello {{UserAttribute['First Name']}}", "body": "..."} All Jinja-style personalization expressions supported by MoEngage are passed through:

  • Content blocks: {{ContentBlock['block_name']}}

  • Product sets: {% if ProductSet.set_name %}...{% endif %}

  • Content API references: {{Content['api_name'].field}} custom_template_data: Use an existing template instead of inline payload. Requires both template_id and version. Example: {"template_id": "tmpl-abc", "version": "v1.0"} user_details: Optional identifier to resolve personalization against an actual MoEngage user profile. Requires both fields: {"identifier": "ID", "identifier_value": "USER_12345"}.

Provide either payload OR custom_template_data — not both, not neither.

Rate limit: 10,000/min.

Returns: {success: true, personalized_content: {payload: {...}}} on success. {success: false, error, status_code, api_response} on API error. {success: false, error: str} on validation failure (missing fields, invalid args).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes
personalization_detailsYes
payloadNo
custom_template_dataNo
user_detailsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses behavioral traits: returns different response shapes for success, API error, and validation failure. It explains the resolution of placeholders and lists supported expressions. No annotations are provided, so the description carries the full burden, which it handles well. Missing details on permissions or idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with bullet points and examples. It front-loads the main purpose, but some details (e.g., supported expressions) could be more concise. It earns its length by providing essential examples, but could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no schema descriptions, the description is complete. It covers all parameters, constraints (payload vs custom_template_data), error handling, rate limit, and return format. The output schema is not provided but the description explains the return structure adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It provides detailed explanations for each parameter with examples: personalization_details structure, payload format, custom_template_data usage, and user_details. It adds significant meaning beyond the raw schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: to get a personalized preview with placeholders resolved. It lists the channels and explains the core functionality, distinguishing it from sibling tools like analyze_template or build_email_template that deal with template creation or analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage constraints: 'Provide either payload OR custom_template_data — not both, not neither.' It also states the rate limit. However, it does not explicitly compare to sibling tools or say when to use this tool instead of others, though the purpose is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/poddubnyoleg/moengage_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server