delete_stock_item
Delete a stock item from TallyPrime only after removing related vouchers; fails if transactions are posted against it.
Instructions
Delete a stock item from TallyPrime. Fails if it has transactions posted against it. If deleting a voucher that used this item in the same turn, delete the voucher first and confirm it succeeded before calling this — doing both in parallel can race (confirmed live). If this item was used in both a Sales AND a Purchase item-invoice, it may return 'Cannot be deleted!' even with zero balance and no transactions left — fixed by Company Data → Rewrite in Tally itself (confirmed live), not by retrying.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "delete_stock_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact name of the stock item to delete |