Skip to main content
Glama

add_customer_address

Create a customer address with required address1, city, and country. For Vietnamese addresses, include province, district, and ward codes to ensure canonical formatting.

Instructions

Add a new address to a customer. Required: address1, city, country. Province handling: pass either province (text — fuzzy-matched, e.g. "Hồ Chí Minh", "HCM", "TPHCM" all resolve to canonical "TP Hồ Chí Minh") OR province_code (1–63). The tool fills the missing field from the canonical Sapo dataset. For district/ward: pass BOTH text name AND code together (use list_districts / list_wards). NOTE: Sapo write API only accepts the pre-2025 3-tier schema. Post-2025 codes (province_code 2001+, district_code "-1") are rejected pre-flight.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zipNo
cityYesCity name. Required.
wardNo
phoneNo
companyNo
countryYesCountry name (e.g. "Vietnam"). Required.
address1YesPrimary address line. Required.
address2No
districtNo
provinceNoVietnamese province name (e.g. "Hà Nội").
last_nameNo
ward_codeNo
first_nameNo
customer_idYesCustomer ID to add address to. Required.
country_codeNo
district_codeNo
province_codeNo
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses substantive behavioral traits: fuzzy matching of province text (e.g., 'HCM' resolves to canonical 'TP Hồ Chí Minh'), filling missing fields from the canonical dataset, and pre-flight rejection of post-2025 codes. The main shortcoming is that it lists required fields as 'address1, city, country' while the schema also requires customer_id, which is inconsistent and could mislead.

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

Conciseness5/5

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

The description is a single dense paragraph, front-loaded with purpose and required fields. The province-handling note and the API version warning are essential, and every sentence adds value. No filler or redundancy.

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 mutation tool with 17 parameters, no output schema, and no annotations, the description covers the most complex aspects (province/district/ward handling, schema version constraints). It does not explain the return value, and the required-fields list erroneously omits customer_id. Despite these gaps, it is substantially complete for the tool's tricky areas.

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 description coverage is low (29%), so the description must compensate. It adds significant semantics for province/province_code (mutually exclusive usage with fuzzy matching), and for district/ward (must pass both text and code). It also restates required fields. However, it omits customer_id from the required list and does not explain optional fields like zip/phone, though those are self-explanatory from their names.

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 clearly states the tool's action: 'Add a new address to a customer.' It uses a specific verb and resource, and is distinct from sibling tools like list_customer_addresses, update_customer_address, and set_default_customer_address, which handle other address operations.

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 explicitly indicates when to use this tool (to add a new address) and directs to list_districts/list_wards for required sub-administrative data. It also warns about the pre-2025 schema limitation, which helps the agent avoid errors. However, it does not explicitly contrast with update_customer_address or state when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nguyennguyenit/Sapo-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server