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

PNPC-MCP-Tally-Prime

create_credit_note

Creates an item-invoice credit note in TallyPrime for sales returns, reversing stock and revenue for returned items and crediting the customer ledger.

Instructions

Create an item-invoice Credit Note in TallyPrime — a Sales return, reversing stock and revenue for returned items. Same shape as create_sales_invoice but with the debit/credit convention flipped, matching Purchase's sign pattern (a Credit Note is structurally a reverse Sales entry). Confirmed live on a real company: returning 5 units correctly increased the item's book quantity by exactly 5. Same godown and dual-role deletion caveats as create_sales_invoice apply.

Input Schema

NameRequiredDescriptionDefault
dateYesCredit note date in DD-MM-YYYY format
itemsYesOne entry per returned line.
billNameNoBill reference to settle against, e.g. the original invoice's bill name. Defaults to 'Agst Ref' billType.
billTypeNoDefaults to 'Agst Ref' — settling against the original invoice's bill, unlike create_sales_invoice's 'New Ref' default.
buyerTrnNoThe buyer's (customer's) TRN as it should appear on this credit note (Tally's TRADERCONSVATTINNO/BASICBUYERSSALESTAXNO fields) — a per-voucher snapshot, not inherited from the party ledger master.
buyerNameNoName to print in this voucher's Buyer (Bill to) box, when it should differ from the customer ledger's own name — Tally's per-voucher Party Details mailing name. The ledger itself is not changed. Useful when many sales are posted against one shared ledger (e.g. cash or card sales) but each invoice needs its own readable buyer name.
narrationNoNarration / description
referenceNoFree-text reference for this credit note (Tally's voucher-level REFERENCE field).
vatLedgerNoDefault VAT ledger for items without their own override.
buyerStateNoThe buyer's Emirate/state on this credit note's Party Details (voucher-level STATENAME).
partyLedgerYesCustomer ledger name (the party being credited)
voucherTypeNoVoucher type to post as, for a company that uses its own Credit Note-class type in Item Invoice mode (e.g. 'Tax Invoice', 'Export Invoice'). Defaults to 'Credit Note'.
buyerCountryNoThe buyer's country on this credit note's Party Details (voucher-level COUNTRYOFRESIDENCE).
referenceDateNoDate for the reference above, in DD-MM-YYYY format.
voucherNumberNoExplicit voucher number. Normally omit and let Tally auto-number — but some Tally configurations stop auto-numbering item-invoice vouchers via the XML gateway (confirmed live). If creation fails with a blank EXCEPTIONS:1, check get_vouchers for the highest existing number of this voucher type and retry with voucherNumber set to the next one.
vatRatePercentNoDefault VAT rate. Required if vatLedger is set.
placeOfSupplyCountryNoUAE VAT Place of Supply Country (Tally's PLACEOFSUPPLYCOUNTRY field).
placeOfSupplyEmirateNoUAE VAT Place of Supply Emirate for this credit note (Tally's EMIRATEPOS field).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.1
    • addedInput schema / properties / buyerName
      Added value: +{
      +  "description": "Name to print in this voucher's Buyer (Bill to) box, when it should differ from the customer ledger's own name — Tally's per-voucher Party Details mailing name. The ledger itself is not changed. Useful when many sales are posted against one shared ledger (e.g. cash or card sales) but each invoice needs its own readable buyer name.",
      +  "type": "string"
      +}
  2. 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 to post as, for a company that uses its own Credit Note-class type in Item Invoice mode (e.g. 'Tax Invoice', 'Export Invoice'). Defaults to 'Credit Note'.",
      +  "type": "string"
      +}
  3. Addedv1.11.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare it as a non-read-only, non-idempotent write, and the description goes well beyond that: it discloses the live-confirmed stock-quantity effect, the godown auto-fill rule, the sign convention relative to Purchase, and the 'dual-role deletion caveats' inherited from create_sales_invoice. Those caveats are referenced rather than spelled out, which keeps it short of a top score.

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 core purpose and effect, then caveats, with no filler sentences. It is dense with cross-references to create_sales_invoice and Purchase that force the reader to recall a sibling, but each sentence carries substantive information.

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 mutation tool with no output schema, the description plus the fully documented schema cover what an agent needs: what it creates, how stock is affected, godown requirements and known failure/caveat patterns. The only shortfall is that the referenced deletion caveats are not restated here.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented in the input schema, including godown, billType defaults and voucherNumber. The description adds only indirect parameter meaning (sign convention, godown caveats) rather than new semantics for individual fields, so baseline 3 is appropriate.

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 ('Create an item-invoice Credit Note in TallyPrime') and immediately defines the domain meaning ('a Sales return, reversing stock and revenue for returned items'). It also positions the tool against the sibling create_sales_invoice via the flipped debit/credit convention, so an agent can distinguish it without opening 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 Guidelines4/5

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

The description gives clear context for when this applies: returned items, stock and revenue reversal. It does not explicitly name when-not conditions or point to create_debit_note as the purchase-side counterpart, so the exclusion/routing guidance is only implicit.

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