Skip to main content
Glama
PNPC-MCP-Tally-Prime

PNPC-MCP-Tally-Prime

update_debit_note

DestructiveIdempotent

Modify an existing item-invoice Debit Note in TallyPrime by replacing its item lines, party ledger, and narration. Confirm the voucher exists and is unique by date and number first to avoid altering the wrong voucher.

Instructions

Update an existing item-invoice Debit Note in TallyPrime, replacing its item lines, party, and narration. Same fields as create_debit_note, plus voucherNumber. Matched by date + voucher number — use get_ledger_vouchers or get_vouchers first to confirm it exists and is unique. Refuses if another voucher type shares the same number on that date (confirmed live: Tally's Alter lookup ignores voucher type and can silently corrupt the wrong one) — resolve the collision in Tally first if that happens.

Input Schema

NameRequiredDescriptionDefault
dateYesExisting debit note's date in DD-MM-YYYY format
itemsYesOne entry per returned line — replaces all existing lines.
billNameNoBill reference to settle against, e.g. the original bill's name. Defaults to 'Agst Ref' billType.
billTypeNoDefaults to 'Agst Ref' — settling against the original purchase's bill, unlike create_purchase_invoice's 'New Ref' default.
buyerTrnNoYOUR OWN company's TRN on this debit note.
narrationNoNarration / description
referenceNoFree-text reference for this debit note.
vatLedgerNoDefault VAT ledger for items without their own override.
buyerStateNoYOUR OWN company's Emirate/state on this debit note's Party Details.
partyLedgerYesSupplier ledger name (the party being debited)
supplierTrnNoThe supplier's (party's) TRN on this debit note. Distinct from buyerTrn — same asymmetry as create_debit_note.
voucherTypeNoVoucher type of the existing voucher, if it isn't the default 'Debit Note' (e.g. 'Tax Invoice'). Used to find it and to check no other voucher shares its number.
buyerCountryNoYOUR OWN company's country on this debit note's Party Details.
referenceDateNoDate for the reference above, in DD-MM-YYYY format.
voucherNumberYesExact voucher number of the debit note to update
vatRatePercentNoDefault VAT rate. Required if vatLedger is set.
placeOfSupplyCountryNoUAE VAT Place of Supply Country for this debit note.
placeOfSupplyEmirateNoUAE VAT Place of Supply Emirate for this debit note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.14.0
    • addedInput schema / properties / items / items / properties / description
      Added value: +{
      +  "description": "Description lines shown under this stock line on the invoice, one array entry per line (e.g. a size, colour or service period). Optional.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / voucherType
      Added value: +{
      +  "description": "Voucher type of the existing voucher, if it isn't the default 'Debit Note' (e.g. 'Tax Invoice'). Used to find it and to check no other voucher shares its number.",
      +  "type": "string"
      +}
  2. Addedv1.11.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes well beyond them by disclosing that item lines are fully replaced (not merged), that matching is on date + voucher number, and the exact refusal condition with its rationale about Tally's Alter lookup ignoring voucher type. The one gap is post-call behavior — no statement about what is returned or how to verify the update landed, which matters for an unattended destructive write.

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 and the overwrite scope, then prerequisites, then failure mode — a sensible ordering for an agent scanning for go/no-go information. Every sentence carries operational content, including the parenthetical rationale for the collision check. It is dense but not padded; the only trimming available would be tightening the collision sentence, which is already serving a distinct purpose.

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

Completeness4/5

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

For an 18-parameter destructive voucher mutation with no output schema, the description covers the two things an agent cannot get from structured fields: how to locate the target and what makes the write unsafe. It is not fully complete because it never describes the result of a successful update or how to confirm it, which the absence of an output schema makes more rather than less necessary. Callers get no guidance on whether the replaced line data is echoed back or what a partial failure leaves behind.

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?

With 100% schema description coverage the baseline is 3, and the description earns above that by explaining the multi-parameter identification key ("Matched by date + voucher number") rather than leaving the agent to infer it from two independent field descriptions. It also frames voucherNumber as the sole addition over create_debit_note, which tells the agent that every other field must be resupplied in full because of the replace semantics. It does not, however, add syntax or value guidance for the remaining 17 parameters, which the schema already carries.

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?

States a specific verb and resource ("Update an existing item-invoice Debit Note in TallyPrime") and immediately scopes the blast radius by naming the fields that get overwritten ("replacing its item lines, party, and narration"). It also positions itself against its closest sibling by defining the delta from create_debit_note ("Same fields as create_debit_note, plus voucherNumber"), so an agent can separate create from update without reading either schema.

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?

Gives an explicit prerequisite call sequence: "use get_ledger_vouchers or get_vouchers first to confirm it exists and is unique," naming the actual sibling tools. It also states the abort condition and the required remediation: "Refuses if another voucher type shares the same number on that date... resolve the collision in Tally first." That is when-to-use, when-it-will-fail, and what-to-do, all present.

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

Deploy Server

Other Tools