Skip to main content
Glama

Zalo Business Reference (ZBS Template Message, OA)

ZBS template message cost (Zalo)

estimate_message_cost
Read-onlyIdempotent

Estimate what Zalo charges for ZBS template messages (formerly ZNS): base price by template type (otp, voucher, payment_request, bus_ticket, custom = "other types", rating, quick_response, carousel, journey "from" price) for phone or UID sending, plus buttons by category (the first button to the OA page/Mini App/OA article and the first to an e-invoice page are free, others paid from the first), image module and quick reply. Returns the price per message with a line breakdown, the total if all messages are delivered, the estimate for delivery_rate (only delivered messages are charged), totals with VAT if you pass vat_rate (Zalo names no rate), the OA plan needed to send through the API, and days needed at the daily quota (default 20000, a new OA). OTP, quick response, journey and carousel by UID are rejected. Prices exclude VAT. Reference only, no messages are sent. Examples: {"template_type":"custom","buttons":["business_website"],"count":10000}; {"template_type":"custom","delivery":"uid","buttons":["oa_profile_page"],"count":5000,"delivery_rate":0.9,"vat_rate":0.1}; {"template_type":"otp","count":20000}.

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": "estimate_message_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoNumber of messages (1-100000000). Default 1.
imageNoImage module (1-3 images) included. Default false. Not allowed on OTP.
buttonsNoExtra buttons by category, one item per button (repeat a category for two buttons): oa_profile_page, business_mini_app, oa_article_or_other_zalo_asset, e_invoice_lookup, business_website, call_phone, business_app_page, other_website_or_mini_app, other_app_page, app_download_landing. The first button to the OA page / business Mini App / OA article (one category) and the first to an e-invoice page are free; others are paid from the first. Built-in type buttons (copy code, transfer, details) are free and not listed here.
deliveryNoHow messages are addressed: "phone" (phone number, default) or "uid" (Zalo user ID for this OA; cheaper, not for OTP, quick response, journey or carousel).
vat_rateNoOptional VAT rate as a share (e.g. 0.1) to add to the totals. Zalo's ZBS page says prices exclude VAT but names no rate, so the rate is yours.
quick_replyNoQuick reply (response) buttons activated. Default false; always on for quick_response.
quota_levelNoOA daily quota level for template messages: 1000, 5000, 20000, 50000, unlimited (default 20000, where a new OA starts; 1000 and 5000 are penalty levels).
delivery_rateNoExpected share of messages that get delivered and charged, 0-1 (default 1 = all). Only delivered messages are charged.
template_typeNoZBS template type: otp, payment_request, voucher, bus_ticket, custom (the "other types" row: order status, reminders, notices), rating, quick_response, carousel, journey (special industries, price "from"). Default custom.

Output Schema

NameRequiredDescriptionDefault
countYes
linesYes
notesYes
quotaYes
sourcesYes
deliveryYes
warningsYes
total_maxYes
disclaimerYes
affiliationYes
per_messageYes
data_versionYes
plan_requiredYes
template_typeYes
total_estimatedYes
delivered_estimateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, yet the description still adds substantive pricing semantics: only delivered messages are charged, prices exclude VAT and Zalo names no rate, the default quota is 20000 "where a new OA starts", and 1000/5000 are penalty levels. These are exactly the non-obvious traits an agent needs to interpret the returned numbers.

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 opening sentence runs roughly ninety words with nested parentheses, turning the core pricing model into a wall of text that is harder to parse than the schema it summarizes. Every fact is relevant, but the lack of sentence breaks or a short front-loaded summary costs it structure points despite being front-loaded with the verb and resource.

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?

For a nine-parameter pricing calculator this is complete: defaults (count 1, delivery phone, quota 20000, delivery_rate 1), constraints (no image on OTP, UID rejects four template types), VAT handling, and quota/days calculation are all addressed, and the return shape is covered both by the output schema and by the description's mention of per-message price, breakdown, totals, plan, and days.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter including the button enum and the "custom = other types" mapping. The description mostly restates that content (free-button rules, journey "from" pricing, UID restrictions) rather than adding new meaning; its only genuine value-add is the worked examples showing parameter combinations. Baseline 3 is appropriate here.

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 names a specific verb and resource ("Estimate what Zalo charges for ZBS template messages") and enumerates exactly which price components are computed: base price by template type, button categories, image module, quick reply. It is unmistakable against siblings like validate_template or oa_plan_compare, and it closes with "Reference only, no messages are sent" to remove any ambiguity about side effects.

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?

It gives concrete when-to-use conditions in the form of rejected combinations ("OTP, quick response, journey and carousel by UID are rejected") and states when to pass vat_rate and delivery_rate, plus three worked examples of realistic call shapes. What it lacks is any explicit routing sentence naming a sibling (e.g., "to obtain the OA plan tiers themselves, use oa_plan_compare"), so an agent must infer the boundary from purpose alone.

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.