Skip to main content
Glama

validate_shipping_address

Read-only

Validates and normalizes shipping addresses for fulfillment orders by checking required fields and country-specific postal codes, returning warnings and a normalized address for order placement.

Instructions

Validate and normalize a shipping address for fulfillment orders.

        Args:
            street: Street address (e.g. "123 Main St").
            city: City name.
            country: ISO 3166-1 alpha-2 country code (e.g. "US", "GB", "DE").
            state: State/province (recommended for US addresses).
            postal_code: ZIP/postal code (validated per country format).

        Checks required fields, validates postal codes per country (US ZIP,
        Canadian postal, UK postcode), and returns warnings for missing optional
        fields.  Use the ``normalized`` address in the response when placing
        fulfillment orders.
        

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": {
      "street": "<street>",
      "city": "<city>",
      "country": "<country>"
    },
    "name": "validate_shipping_address"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityYesCity name.
stateNoState/province (recommended for US addresses). Default: "".
streetYesStreet address (e.g. "123 Main St").
countryYesISO 3166-1 alpha-2 country code (e.g. "US", "GB", "DE").
postal_codeNoZIP/postal code (validated per country format). Default: "".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.5.1
    • addedInput schema / properties / city / description
      Added value: +"City name."
    • addedInput schema / properties / country / description
      Added value: +"ISO 3166-1 alpha-2 country code (e.g. \"US\", \"GB\", \"DE\")."
    • changedInput schema / properties / postal_code / description
      Previous value: -"Default: \"\"."New value: +"ZIP/postal code (validated per country format). Default: \"\"."
    • changedInput schema / properties / state / description
      Previous value: -"Default: \"\"."New value: +"State/province (recommended for US addresses). Default: \"\"."
    • addedInput schema / properties / street / description
      Added value: +"Street address (e.g. \"123 Main St\")."
  2. Changed4 schema fields changedv1.5.0
    • removedInput schema / properties / postal_code / default
      Removed value: -""
    • addedInput schema / properties / postal_code / description
      Added value: +"Default: \"\"."
    • removedInput schema / properties / state / default
      Removed value: -""
    • addedInput schema / properties / state / description
      Added value: +"Default: \"\"."
  3. First observedv0.1.0

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, openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: it discloses which checks run (required-field checks, country-specific postal validation for US/CA/UK) and that non-fatal issues come back as warnings rather than errors, which is important behavioral nuance.

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?

Front-loaded purpose statement followed by validation behavior, with a slight cost from restating every parameter that the schema already documents. Nothing is confusing or padded beyond that duplication.

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?

With no output schema, the description carries the burden of explaining returns and does so partially (mentions a "normalized" address and warnings). Required vs optional handling is implied but not spelled out per field beyond the schema's required list, leaving a minor gap for a 5-parameter tool.

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% and the Args block in the description repeats the schema property descriptions nearly verbatim (country ISO code, state recommended for US, postal code validated per country). It adds almost no meaning beyond the structured schema, so the baseline 3 is appropriate.

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?

Uses specific verbs ("validate and normalize") on a specific resource ("shipping address for fulfillment orders"), which cleanly separates it from siblings like save_shipping_profile, list_shipping_profiles, or supported_shipping_countries. An agent can pick this without opening any schema.

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?

Gives clear contextual guidance by stating that the returned "normalized" address should be used when placing fulfillment orders, which routes the agent downstream. It stops short of naming alternatives or stating when-not to use it (e.g., versus save_shipping_profile or supported_shipping_countries), so it does not reach a 5.

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

Deploy Server

Other Tools