set_work_authorization
Declare the full set of countries you may legally work in, replacing any prior declaration. An empty list records zero authorized countries.
Instructions
Declare the FULL set of countries the user may legally work in.
REPLACES the previous declaration in its entirety (SC-26) — this is a
statement about the whole set ("I can work in X and Y"), not an
additive append. An empty list is a valid, distinct declaration
(SC-27): "declared, zero countries" differs from "never declared" —
analyze_job treats the two differently (no_work_authorization only
for the latter).
Countries are canonicalized at write time (tools/_country.py); both the raw text and the canonical form are stored. Two raw spellings that canonicalize to the same country (e.g. "USA" and "United States" in one call) collapse to a single declared row — the first raw spelling encountered wins the echo.
This tool NEVER raises.
Args: countries: Free-text country names, as the user states them. An empty list explicitly declares zero authorized countries.
Entries that canonicalize to nothing ("", " ", "...") are not countries and are dropped. If that leaves nothing, the call is REJECTED rather than silently storing a declaration that means nothing — see the loop below.
Returns: SetWorkAuthorizationResult with success=True and the stored raw/ canonical forms on success; success=False with error="invalid_input" when no given name could be understood, "corrupt" on a broken database, or "write_error" when the write itself fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| countries | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| message | No | ||
| success | Yes | ||
| countries_raw | No | ||
| countries_canonical | No |