Verify a tax declaration
well_verify_tax_declarationCheck a tax declaration Well prepared against the tax authority's own controls, before the person files it. It reads the stored draft and the records Well holds now (for a CA3: the books on the basis the draft was prepared on, the company's SIREN, the prior return; for a micro turnover declaration: the period's bank receipts, and the URSSAF rates read again from their published source), and runs every rule of that declaration type. It never changes the draft. The micro check reads the URSSAF rate pages on the web and stores a rate it reads that is newer than the one Well holds, in the public rate table every workspace shares; it stores nothing of the workspace. Call it again after any change.
Call it with the declaration_type and the document_id of the draft: fr-vat-ca3 for the French VAT return, as well_prepare_vat_return returned it, or fr-micro-turnover for the URSSAF micro-entrepreneur turnover declaration, as well_prepare_micro_declaration returned it. Use it when the person asks whether the prepared declaration is right, and before a filing or a fill starts.
On status: "ok", rules lists every rule with its outcome (pass, fail or not_checkable), its severity, the control_id it restates (an authority control or legal text, a Well control id such as WELL-MICRO-ARITH-1, or null for a CA3 control Well adds), and on a fail the boxes at fault in lines (draft_euros the draft holds, expected_euros the rule expects).
blocking_rule_idsnot empty:fillableis false. Say which rule failed and on which box, in plain words. The declaration is not filled until the draft is prepared again and passes.prior_credit_confirmedinblocking_rule_ids: line 22 carries a credit Well assumed from a prior return it never saw filed. Ask once whether it is « le crédit reporté de ta déclaration précédente », naming no line, then callwell_prepare_vat_returnagain for the same period with theprior_credit_eurosthe person gives.On a micro draft,
contribution_arithmeticfailing means the printed estimate no longer holds, because a URSSAF rate or an assumption the sheet states changed since the draft: prepare the draft again, say the new estimate, and ask again before the fill.rate_source_readfailing means the rates could not be read: the fill waits until a later check reads them.bank_sources_freshfailing means a bank copy is missing or not fresh enough for the period, or receipts came from no listed bank:well_prepare_micro_declarationnames each source instale_sources; request a sync withwell_request_syncor ask for the missing statement or bank, then prepare the draft again and check again.vat_basis_knownfailing is an alert: say which receipts count on an assumed VAT basis, and ask the person to confirm the boxes.alert_rule_idsnot empty: say each one with its figures in one sentence. The person may still file.A
not_checkablerule needs a record Well does not hold for this declaration. Never say it passed.
unknown_draft: the workspace holds no draft of that type with that document_id; prepare it first. unsupported_declaration_type: Well does not check that declaration type yet, so never say it was checked. failed: the check could not run; its result is unknown, never a pass.
When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The `document_id` of the stored draft, as the tool that prepared it returned it. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several: this read reports one workspace's own figures and will not choose 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. | |
| 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. | |
| declaration_type | Yes | The declaration the draft is: `fr-vat-ca3` for the French VAT return (CA3), `fr-micro-turnover` for the URSSAF micro-entrepreneur turnover declaration. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| rules | No | ||
| status | Yes | ||
| success | Yes | ||
| fillable | No | True when no BLOCKING rule failed. | |
| document_id | No | ||
| alert_rule_ids | 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. | |
| 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. | |
| declaration_type | No | ||
| blocking_rule_ids | No | ||
| resolved_workspace | No | The workspace that answered, when the caller named none and the token authorizes several. | |
| 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. |