Update location
well_update_locationSet the address of a company in the current workspace, in one write: the new address replaces one address the company already has, or becomes its first one.
Use this tool when the user asks to change, fix, move, replace or set the address of a company. Do not add the new address with well_add_contact_channel and remove the old one: this tool does both. When the company has no address yet, this tool still applies: omit location_id and the address becomes the company's primary address. Use well_add_contact_channel only when the user wants one more address beside the ones the company keeps.
Read the company's addresses first with well_query_records (company_locations). When the user does not say which address, replace the primary one. When the company has several addresses and none is primary, ask which one, once.
On an invoice draft, pass draft_party with the draft's invoice_id: "receiver" when the company is the draft's customer, "issuer" when it is the company that issues the draft. While the conversation has an open draft, a call on the workspace's own company without draft_party is refused before any confirmation: an address the person gives on a draft is the customer's unless they say it is their own company's, and when their words do not say which, ask them in one line first. A customer who is a private individual has no company: write their address with well_add_contact_channel (parent person).
REQUIRED: parent ("company"), parent_id (the company id), address (the new address: at least one of address_line1, postal_code or city). OPTIONAL: location_id (the id of the address to replace; omit it only when the company has no address), draft_party ({ invoice_id, party }). In address: address_line2, region, subdivision_code (ISO 3166-2, such as FR-IDF), country (2-letter ISO code). Pass the whole new address, not only the part that changes.
The old address is kept as a removed row; the new one takes its place, with the same label and the same primary flag. A call without location_id on a company that has an address, or with a location_id that is not a live address of the company, is refused before any confirmation.
Returns { success: true, location_id, address } on success, where location_id is the id of the new address and address is the new address on one line, or { success: false, error } on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent | Yes | The record the address belongs to: company | |
| address | Yes | The new address, whole | |
| parent_id | Yes | UUID of the company | |
| draft_party | No | Set on an invoice draft: the call is refused unless the company is this party of the draft | |
| location_id | No | UUID of the address to replace, read with well_query_records; omit when the company has no address | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | ||
| address | No | ||
| success | Yes | ||
| location_id | No | ||
| reply_lines | No | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| near_candidates | No | ||
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. | |
| near_candidates_truncated | No |