Skip to main content
Glama

Zalo Business Reference (ZBS Template Message, OA)

Check a ZBS template draft (formal rules)

validate_template
Read-onlyIdempotent

Check 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

NameRequiredDescriptionDefault
tagNoTemplate tag: 1 transaction, 2 customer care, 3 promotion.
logoNoLogo file facts: format (PNG), width and height in px.
nameNoTemplate name (visible only to the business).
tableNoTable rows {name, value}.
titleNoTitle; parameters as <param_name>.
imagesNoImage module files: width, height (px), size_kb.
paramsNoDeclared 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.
buttonsNoCTA buttons.
paragraphsNoText blocks (custom: 1-4; OTP and rating: one).
quick_repliesNoQuick reply button texts (quick_response templates).
template_typeNoTemplate to check: custom (default), otp, rating, quick_response.

Output Schema

NameRequiredDescriptionDefault
validYes
errorsYes
issuesYes
warningsYes
disclaimerYes
moderationYes
affiliationYes
data_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, so safety is covered. The description adds meaningful context beyond that: it returns errors and warnings tagged with the rule and official page, the text is not stored, and content review happens at Zalo rather than here. Auth/rate-limit details are absent, but the core behavioral profile is well disclosed.

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 purpose is front-loaded, but the rule enumeration is a single dense run-on sentence followed by a large JSON example. Every listed rule is relevant, yet the lack of bullet structure or grouping makes the description harder to parse than necessary for an agent scanning for actionable constraints.

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 an 11-parameter nested schema with full description coverage, an output schema, and rich annotations, the description supplies the remaining context an agent needs: all supported template types, the full rule checklist, return semantics (errors/warnings with rule and official page), non-storage of text, and a worked example. Nothing essential is missing for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds substantive rule semantics the schema alone does not convey: logo must be PNG 400x96, image module 1-3 images at 16:9 up to 500 KB, parameters allowed only in the URL path, one OA page button, and the 2-vs-3 button conflict surfaced as a warning. These details materially deepen understanding of what each parameter must satisfy.

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 opens with a specific verb and resource: 'Check a ZBS template draft against the formal technical rules Zalo publishes.' It then enumerates the exact rule surface (name/title/paragraph lengths, button counts, logo dimensions, parameter placement, content hints) and the template types, making the tool's scope unmistakable and distinct from siblings like check_sending_rules.

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

Usage Guidelines3/5

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

Usage is implied—this is a pre-submission validator for template drafts—and the boundary 'Content is reviewed by Zalo, not here' clarifies what it does not do. However, there is no explicit statement of when to call this versus siblings such as check_sending_rules or error_lookup, nor any when-not guidance beyond the content-review disclaimer.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.