Skip to main content
Glama
lokesh-sparrow

PNPC-MCP-Tally-Prime

create_debit_note

Create debit notes (purchase returns) in TallyPrime, reversing stock and expenses. Handles godown and auto-numbering fallback.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesDebit note date in DD-MM-YYYY format
itemsYesOne entry per returned line.
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 (Tally's BASICBUYERSSALESTAXNO field) — you are the buyer on a purchase-side document. Normally constant; check get_company_info.
narrationNoNarration / description
referenceNoFree-text reference for this debit note (Tally's voucher-level REFERENCE field).
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 (Tally's TRADERCONSVATTINNO field). Distinct from buyerTrn below — NOTE the asymmetry: on a purchase-side document the party is the supplier, not the buyer.
buyerCountryNoYOUR OWN company's country on this debit note's Party Details.
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 for this debit note.
placeOfSupplyEmirateNoUAE VAT Place of Supply Emirate for this debit note.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv1.11.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations are all false, and the description adds meaningful behavior beyond them: 'reversing stock and expense,' a live empirical confirmation ('returning 3 units correctly decreased the item's book quantity by exactly 3'), and caveat flags ('godown and dual-role deletion caveats'). The dual-role deletion caveat is only referenced, not explained, which slightly weakens the disclosure, but the description otherwise enriches the bare annotation set.

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?

Four sentences with the core purpose front-loaded; each sentence earns its place (what it does, structural relation to a sibling, live validation, caveat pointers). The empirical-validation sentence is slightly tangential but serves an assurance purpose, so nothing is wasted.

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 a 17-parameter mutation tool with zeroed annotations and no output schema, the description delivers the essential semantics plus empirical validation, and the schema itself carries exhaustive parameter context. The residual gaps are that the 'dual-role deletion' caveat is punted to another tool's documentation rather than self-contained, and there is no statement about the success/response shape beyond the schema's voucherNumber failure note.

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%, and the schema's parameter descriptions are exceptionally rich (billType default contrast, buyerTrn vs supplierTrn asymmetry, voucherNumber auto-number failure workaround), so the baseline of 3 applies. The description's 'same shape as create_purchase_invoice' note adds a useful comparative lens but no parameter-specific meaning beyond what the schema already provides.

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 Debit Note in TallyPrime') and goes further to define what a Debit Note is in this domain: 'a Purchase return, reversing stock and expense for returned items.' It also distinguishes itself from create_purchase_invoice ('debit/credit convention flipped... structurally a reverse Purchase entry'), which sets it apart from its closest sibling.

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?

Gives clear usage context by defining the tool as a purchase-return document and comparing its shape to create_purchase_invoice, including a shared-caveats pointer. However, it never explicitly states when NOT to use it or how to choose between it and create_credit_note, its mirror alternative — the agent must infer the selection rule from the accounting definition.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lokesh-sparrow/PNPC-MCP-Tally-Prime'

If you have feedback or need assistance with the MCP directory API, please join our Discord server