preview_write
Preview Tally write operations without sending them to Tally. Review exact XML and description, then confirm to post.
Instructions
Build the exact XML for any write tool WITHOUT sending it to Tally — nothing is touched. Returns a previewId plus a plain-English description and the raw XML, so you (or whoever's reviewing) can see precisely what would happen before it happens. Use this instead of calling a create_*/update_*/delete_* tool directly whenever you want a human to review a batch of changes first — e.g. drafting several vouchers from a folder of client documents, where posting the wrong one is costly. Every applicable safety check this tool would normally run (e.g. the voucher-type collision check on update_*/delete_voucher) runs now, at preview time, so the preview already reflects any refusal. A preview expires after 15 minutes and is single-use — call confirm_write with its previewId to actually post it, or just don't confirm it if it's wrong. Never touches Tally with a write of its own (a create_* preview makes no gateway call at all; an update_*/delete_* preview only makes the same read-only collision-check query that tool would normally make) — so unlike every other write tool, preview_write still works even when read-only mode is on. confirm_write is the one that's actually blocked by read-only mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes | The exact same arguments you'd pass to that tool directly. | |
| toolName | Yes | Exact name of the write tool to preview, e.g. 'create_sales_invoice' or 'update_voucher'. Must be a create_*/update_*/delete_* tool or set_bill_of_materials — read tools, context-switching, SQL sync, and audit tools have nothing to preview and aren't accepted here. |