verify_piva_vies
Validate EU VAT numbers against VIES to confirm active status and retrieve registered business details. Returns source 'unavailable' on timeout instead of failing.
Instructions
Verify a VAT number against the EU VIES (VAT Information Exchange System).
Calls the official EU VIES REST endpoint with a configurable timeout. On timeout or service unavailability, returns a degraded response with source="unavailable" rather than raising — the caller must handle this case.
Args: country_code: Two-letter ISO 3166-1 alpha-2 country code (e.g., "IT"). vat_number: VAT number without the country prefix (e.g., "12345678901"). ctx: Optional MCP context for structured log emission.
Returns: A VerifyPivaViesResult with keys: valid (bool): Whether VIES confirmed the VAT number as active. name (str | None): Registered business name, if disclosed by VIES. address (str | None): Registered address, if disclosed by VIES. source (str): "vies" if live response, "unavailable" if service down.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vat_number | Yes | ||
| country_code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| valid | Yes | ||
| source | Yes | ||
| address | Yes |