Skip to main content
Glama
MarketingBNG

tally-mcp

by MarketingBNG

tally_alter_voucher

Destructive

Change an existing TallyPrime voucher's lines, amounts, date, narration, or reference. Preview the before/after result, then confirm the write.

Instructions

Change an EXISTING voucher in TallyPrime — its lines, amounts, date, narration or reference.

Give the voucher's guid and current date (from tally_get_vouchers), and the COMPLETE voucher as it should be afterwards: every line, not only the changed ones — including items on an item invoice. The preview shows it before and after. Stock journals cannot be altered here: cancel or delete one and post it again.

If the voucher was changed or deleted in TallyPrime after the preview, the confirm is refused (TallyPrime would otherwise create a new voucher instead of altering).

WRITES TO TALLYPRIME, in two steps. This call only PREVIEWS: it checks the change against the live books and returns exactly what would be written plus a confirmToken — nothing is changed. Show the preview to the user, and only after they approve it call tally_confirm_write with the token. Never confirm on your own initiative, and never confirm a preview the user has not seen.

Input Schema

NameRequiredDescriptionDefault
dateYesVoucher date, ISO YYYY-MM-DD.
guidYesThe voucher's guid, as returned by tally_get_vouchers.
itemsNoStock item lines, for an ITEM invoice (Sales, Purchase, Credit/Debit Note) or a Delivery / Receipt Note. Each is item, quantity, rate and the sales or purchase ledger it posts to; the side follows the voucher type (a sale credits, a purchase debits).
companyNoCompany name. Omit to use whichever company TallyPrime has loaded. If given and it is not the loaded one, the call fails with TALLY_COMPANY_NOT_LOADED rather than returning another company's data.
entriesYesLedger lines. Debits must equal credits exactly, counting any item lines. On an item invoice these are the party and any tax, freight or discount ledgers.
narrationNo
referenceNoSupplier invoice number or other reference.
currentDateYesThe voucher's date as it is NOW in TallyPrime (from the same read).
partyLedgerNoThe party (customer/supplier) of the voucher, if any.
voucherTypeYesVoucher type as in TallyPrime: Journal, Payment, Receipt, Contra, Sales, Purchase, Credit Note, Debit Note, or a custom type.
voucherNumberNoOnly for types numbered manually. Omit to let TallyPrime number it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare a destructive write, and the description goes well beyond them: it explains the two-step preview/confirm model, that this call changes nothing and returns a confirmToken, that no preview is written until confirmation, and that confirmation is refused if the voucher moved in TallyPrime since preview (which would otherwise create a duplicate). That concurrency/staleness behavior is not inferable from annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then prerequisites, then the write-safety warning, so an agent can stop reading early if needed. It is dense and slightly repetitive with the capitalized emphasis, but nearly every sentence carries non-obvious operational information, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, high-risk mutation with no output schema and no top-level return documentation, the description covers what an agent must know: required inputs, replacement semantics, the preview/confirm handshake, the stale-write refusal, and the stock-journal limitation. Nothing critical about invoking it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 91%, so the baseline is 3, but the description adds genuine meaning: the full-replacement semantics ('every line, not only the changed ones'), the distinction between currentDate (as it is now) and date (as it should be afterwards), and the item-invoice caveat for `items`. It does not, however, elaborate on the nested bill/cost-centre structures, which the schema handles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a precise verb+resource ('Change an EXISTING voucher in TallyPrime') and enumerates what can change (lines, amounts, date, narration, reference). It also carves itself away from siblings by noting that stock journals cannot be altered here and must instead be cancelled/deleted and re-posted, which separates it from tally_create_voucher and tally_cancel_voucher.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States the prerequisites explicitly (the voucher's guid and current date, both from tally_get_vouchers), the shape of the payload (the COMPLETE voucher, not just changed lines, including `items` on an item invoice), and the exclusion (stock journals). It also names the follow-on tool (tally_confirm_write with the token) and the condition for using it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.