Check a ZBS template draft (formal rules)
validate_templateCheck a ZBS template draft against the formal technical rules Zalo publishes: template name, title and text block lengths and parameter counts, table rows and cell lengths, number of buttons (2 vs 3 conflict reported as a warning), button text and URL length, parameters only in the URL path, one OA page button, logo PNG 400x96, image module 1-3 images 16:9 up to 500 KB, parameter types and sample lengths, and formal content hints (links or phone numbers in the text, icons, "anh/chị", superlatives in Tag 3). Types: custom, otp, rating, quick_response. Returns errors and warnings with the rule and the official page. Content is reviewed by Zalo, not here; the text is not stored. Example: {"template_type":"custom","tag":1,"title":"Order <order_code> confirmed","paragraphs":["Hello <customer_name>, your order <order_code> is on its way."],"buttons":[{"category":"business_website","text":"Track order","url":"https://shop.example.vn/track/<order_code>"}],"logo":{"format":"PNG","width":400,"height":96}}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "validate_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Template tag: 1 transaction, 2 customer care, 3 promotion. | |
| logo | No | Logo file facts: format (PNG), width and height in px. | |
| name | No | Template name (visible only to the business). | |
| table | No | Table rows {name, value}. | |
| title | No | Title; parameters as <param_name>. | |
| images | No | Image module files: width, height (px), size_kb. | |
| params | No | Declared parameters: name, Zalo type (customer_name, phone_number, address, code, custom_label, transaction_status, contact, personal_title, product_name, amount, time, bank_transfer_note, url_in_button, otp) and an optional sample value. | |
| buttons | No | CTA buttons. | |
| paragraphs | No | Text blocks (custom: 1-4; OTP and rating: one). | |
| quick_replies | No | Quick reply button texts (quick_response templates). | |
| template_type | No | Template to check: custom (default), otp, rating, quick_response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | ||
| errors | Yes | ||
| issues | Yes | ||
| warnings | Yes | ||
| disclaimer | Yes | ||
| moderation | Yes | ||
| affiliation | Yes | ||
| data_version | Yes |