analyze_template
Fetch a MoEngage email template by ID and version, parse its HTML, and return a structured content map with metadata, images, and text nodes for editing or localization.
Instructions
Fetch existing template from MoEngage, parse HTML, return structured content map (NO HTML).
Both parameters are required — together they pin the exact template revision to fetch. Never omit version: without it the wrong revision may be fetched and cached, causing localize_template to patch the wrong HTML.
Provides ~8:1 compression vs raw HTML. Agent sees structured text nodes instead of HTML.
Returns:
template_meta: name, id, version, subject, sender, preview_text
content_map: ordered list of {id, context, text, localizable, jinja_expressions, link?}
images: list of {id, context, url, alt_text, link_url}
structure_summary: one-line description
html_bytes: size metric
The HTML is cached in-memory (15-min TTL) for subsequent localize_template / patch_template_text calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| external_template_id | Yes | ||
| version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||