Skip to main content
Glama
vietnam-address-mcp

vietnam-address-mcp

by amItuff

Look up provinces and wards by name

search_units
Read-onlyIdempotent

Search Vietnamese provinces, districts, and wards by name while ignoring diacritics and small typos, returning official current codes or mapping legacy units to today's structure.

Instructions

Searches administrative units by name, ignoring diacritics and tolerating small typos. scope "current" (default) searches the 34 provinces and 3,321 wards in force today and returns official codes. scope "legacy" searches pre-2025 provinces, districts and wards and returns where each one maps to now. Tra cứu tỉnh/thành, phường/xã theo tên, kèm mã đơn vị hành chính.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
levelNo"district" exists only in legacy scope.any
limitNo
queryYesName or part of a name, e.g. "bến nghé", "thu duc", "Sa Pa".
scopeNocurrent
provinceNoRestrict to one province (name or 2-digit code).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds value beyond them: matching is diacritic-insensitive and typo-tolerant, current-scope results carry official codes, and legacy-scope results report where each unit maps today. Return-shape detail (ordering, result envelope) is left unspecified, which keeps it from a 5.

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

Conciseness4/5

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

The English portion is front-loaded and dense: purpose first, then scope behavior, with no filler. The trailing Vietnamese sentence is largely a restatement of the first sentence, which is useful for Vietnamese keyword matching but is redundant content in an otherwise tight definition.

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

Completeness4/5

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

For a 5-parameter read-only search with no output schema, the description covers the essential decision (scope) and the nature of results (codes, legacy mappings), which is enough to call it correctly. The unaddressed `limit` default and result-count behavior are minor omissions rather than blockers.

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 60% and the schema gives no description at all for the important `scope` enum, so the description's two-sentence explanation of current vs legacy is the only semantic guidance an agent gets for that parameter. The schema covers `query` and `province` well, and `level` is documented inline; `limit` remains unexplained in both places, which is the main residual gap.

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

Purpose4/5

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

States a specific verb and resource ("Searches administrative units by name") and adds distinguishing behavior: diacritic-insensitive matching and typo tolerance. It does not explicitly contrast itself with the normalize/convert siblings, so an agent must infer that this is lookup-only rather than normalization, but the purpose itself is unambiguous.

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 clearly explains the two operating modes and when each applies: "current" (default) for today's 34 provinces and 3,321 wards, "legacy" for pre-2025 units and their mapping to current ones. That is real routing guidance for the most consequential parameter. It stops short of naming when NOT to use this tool (e.g., versus normalize_address), so it is not a full 5.

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