PNPC-MCP-Tally-Prime
由 PNPC Global 构建和维护。公开提供,任何人都可以将其用于自己的 TallyPrime 设置或自行托管。
前提条件
TallyPrime(Silver / Gold 版 —— 避免使用教育版,其日期范围限制会向 LLM 提供不完整/无效的数据,导致回答质量下降且不准确)
Claude Desktop(推荐 Pro / Team / Max / Enterprise 版 —— MCP 每个问题会多次调用 Tally,可能很快耗尽免费计划的限额)
启用 TallyPrime 的 XML/HTTP 网关:
F1(帮助)→ 设置 → 连接性 → 客户端/服务器配置TallyPrime 角色 =
服务器(或两者)端口 =
9000
运行此程序不需要安装 Node.js —— Claude Desktop 自带用于扩展的 Node.js 运行时。只有在从源代码构建时才需要 Node.js(请参阅从源代码构建)。
Related MCP server: Tally MCP Server
下载
直接从本仓库获取最新的构建包 —— 无需克隆或构建:
PNPC-MCP-Tally-Prime.mcpb —— Claude Desktop 的一键安装扩展
支持的平台
平台 | 本地 | 远程 |
Claude Desktop | ✔️ | ✔️ |
(远程/云端部署可通过 HTTP 入口点实现 —— 请参阅 docs/HTTP_DEPLOYMENT.md —— 但对于大多数用户,本地部署是受支持且推荐的方式。)
设置(本地)
当 Claude Desktop 和 TallyPrime 位于同一台 PC 上时使用此方式 —— Claude Desktop 会在内部为您运行 MCP 服务器。
一键安装(通过扩展)
Claude Desktop → 菜单 → 文件 → 设置
扩展 → 高级设置
点击 安装扩展
浏览并选择
PNPC-MCP-Tally-Prime.mcpb(上面下载的)将出现一个对话框,询问 "是否要安装 PNPC-MCP-Tally-Prime?" —— 点击 安装
它会提示输入 TallyPrime 网关 URL —— 除非您的网关在其他端口运行,否则保持为
http://localhost:9000通过点击聊天中的 工具(锤子)图标进行验证 ——
PNPC-MCP-Tally-Prime应出现在列表中
如果步骤 4-5 没有产生确认对话框(静默接受,没有可见变化),请参阅下面的故障排除 —— 在同一屏幕上使用 安装未打包的扩展,指向本仓库的根文件夹,是可靠的备用方案。
通过配置文件安装(通过开发者菜单)
Claude Desktop → 菜单 → 文件 → 设置 → 开发者
这将打开配置位置的文件资源管理器窗口 —— 右键点击
claude_desktop_config.json→ 编辑(记事本)添加:
{ "mcpServers": { "PNPC-MCP-Tally-Prime": { "command": "node", "args": ["D:\\Path\\To\\PNPC-MCP-Tally-Prime\\dist\\index.js"] } } }(路径中使用双反斜杠,如图所示。)
保存,然后完全退出 Claude Desktop(文件 → 退出)并重新启动
通过 工具 图标验证,同上
Perplexity Desktop / 其他 MCP 客户端
任何接受本地 stdio 服务器配置的 MCP 客户端都使用上面显示的相同 command/args JSON。请参阅您客户端自己的文档,了解该配置的具体位置。
设置(云端)
对于无法访问本地 PC 上运行的 TallyPrime 实例的基于浏览器或移动端的 LLM 客户端,服务器可以作为带有 OAuth 保护访问的小型 Web 服务运行。这涉及更多步骤 —— 请参阅 docs/HTTP_DEPLOYMENT.md。
可用工具(共 28 个)
日期使用 DD-MM-YYYY 格式,与 Tally 自身的惯例一致。完整的机器可读模式:docs/TOOLS.md。
读取
工具 | 输入 | 输出 |
| — | 所有分类账(账户) |
| — | 所有库存项目 |
| — | 账户组(例如:应收暂付款、固定资产) |
| — | 已配置的凭证类型(付款、销售、日记账等) |
| — | 所有成本中心 |
| — | 当前打开公司的详细信息 |
|
| 日记账 —— 该日期范围内的凭证 |
|
| 过账到一个分类账的凭证分录 |
|
| 损益表 |
|
| 试算平衡表 |
|
| 截至某日期的资产负债表 |
|
| 截至某日期的库存汇总 |
|
| 未结清的应收票据 |
|
| 未结清的应付票据 |
写入
工具 | 输入 | 输出 |
|
| 在指定组下创建账目——如果传入了 |
|
| 创建一个包含一条借方 + 一条贷方分录的付款/收款/销售/采购/日记账凭证。按单据分配( |
|
| 替换已有凭证的分录——按类型 + 日期 + 凭证编号匹配,该凭证必须已存在且唯一 |
|
| 永久删除凭证——不留痕迹,与取消(保留可见,标记为“已取消”)不同 |
|
| 创建一个库存日记账凭证,将库存从一个库存项目转移到另一个(转移或简单转换)。仅涉及库存,无账目分录 |
|
| 在父组下创建一个账户组 |
|
| 创建一个库存项目。 |
|
| 更新已有库存项目的组/单位 |
|
| 删除库存项目(如果已有交易记录则失败) |
|
| 按精确名称删除任意类型的一个或多个主数据—— |
⚠️
create_ledger/update_voucher/delete_stock_item/delete_master/delete_voucher会修改或删除已有数据。在让模型对您关心的数据使用这些工具之前,请先备份 Tally 数据——特别是delete_master和delete_voucher无法撤销。
上下文切换
工具 | 输入 | 输出 |
|
| 切换 TallyPrime 的当前活动公司——影响之后的所有调用,直到再次更改 |
|
| 切换 TallyPrime 的当前活动报告期间——影响之后的所有报告,直到再次更改 |
这些会更改 Tally 本身的全局持久状态(与在 Tally 自身界面中切换公司/期间相同)——而不是每次调用的参数。 如果您对同一个 Tally 实例运行多个工具/会话,一个会话的
set_company/set_period调用会影响其他所有调用者接下来看到的内容。
set_company只能切换到 已在 Tally 中打开 的公司(可以同时打开多个公司)——如果指定的公司未加载,它会返回成功但无实际效果。请先在 Tally 中打开该公司(文件 → 选择公司),然后通过此工具切换。
SQL 缓存
工具 | 输入 | 输出 |
| — | 将账目、组、库存项目和凭证(最近 365 天)拉取到本地内存中的 SQL 缓存 |
|
| 对该缓存执行只读查询——表: |
环境变量
变量 | 默认值 | 用途 |
|
| Tally 的 HTTP 网关地址 |
|
|
|
| (未设置) | 如果设置,HTTP 服务器的 |
将此工具与另一个 Tally MCP 连接器一起运行? 每个连接器需要在 TallyPrime 中打开自己的网关端口(
F1 → 设置 → 连接性)——两个连接器不能共享端口 9000。如果您已有连接器使用 9000,请为此连接器打开第二个网关(例如 9001),在打包前编辑manifest.json中的mcp_config.env.TALLY_URL以匹配,或者直接在 MCP 客户端允许配置此服务器环境的地方设置TALLY_URL。
从源码构建
仅在您修改代码而非使用下载的 .mcpb 时需要。
npm install --omit=dev # production deps only
npm run build # compiles src/ -> dist/Node 版本说明: 如果您的系统 node --version 报告的是旧版本,请检查 where node(Windows)/ which -a node(macOS/Linux)在 PATH 中是否有更新的安装,并显式使用它来执行上述命令——Claude Desktop 自身捆绑的 Node 才是运行已安装扩展的实际环境,与系统 PATH 无关,因此这仅影响构建过程。
自行打包 .mcpb
npm install -g @anthropic-ai/mcpb # one-time
mcpb validate manifest.json
mcpb pack . PNPC-MCP-Tally-Prime.mcpb故障排除
"Could not reach TallyPrime" —— Tally 未运行,或端口 9000 上的网关未启用。
"Tally returned an empty response" —— Tally 正在运行但没有公司打开。
create_ledger/create_voucher失败 —— 父组/分类账名称必须与 Tally 完全 匹配(区分大小写和空格)。点击 "Install Extension" 并选择
.mcpb文件后,没有弹出对话框,没有错误,只是停留在同一屏幕: 这在某些 Claude Desktop 版本中表现不一致。请检查%APPDATA%\Claude\logs\main.log,在尝试操作后立即查找Handling DXT/MCPB file: <path>行:Select-String "Handling DXT/MCPB file" "$env:APPDATA\Claude\logs\main.log" | Select-Object -Last 5如果记录了该行但没有后续操作,可能是确认对话框渲染到了屏幕外(罕见,多显示器/远程桌面环境)—— 检查其他窗口。
如果完全没有记录该行,请改用同一扩展 → 高级设置页面上的 Install Unpacked Extension,并指向本仓库的根目录 —— 该路径更可靠。
项目结构
src/
tally.ts Tally HTTP client: sends XML, handles connection/timeout errors
clean.ts Normalizes Tally's raw XML->JSON into predictable JSON
templates.ts Renders the Nunjucks XML templates in templates/
db.ts PGLite SQL cache: sync_to_sql / query_sql
tools.ts MCP tool definitions + XML request builders
server.ts Shared MCP Server construction (used by both entry points)
index.ts stdio entry point (local Claude Desktop)
http-server.ts HTTP entry point (remote clients)
templates/
*.xml.njk Nunjucks templates for each Tally XML request shape
manifest.json Claude Desktop Extension manifest (manifest_version 0.3)文档
docs/INSTALL_GUIDE.md —— 上述安装步骤如此组织的背景说明
docs/ARCHITECTURE.md —— 请求流程、文件职责
docs/TALLY_XML_GUIDE.md —— Tally XML 网关工作原理及常见陷阱
docs/TOOLS.md —— 完整工具参考及新增工具的方法
docs/HTTP_DEPLOYMENT.md —— 作为远程 HTTP 服务器运行
docs/EXTENSION_PACKAGING.md —— 打包为 Claude Desktop 扩展
路线图 / 尚未支持
create_ledger上的分类账地址/省/国家/邮编字段 —— Tally 接受请求但不应用这些字段;尽管多次尝试(包括 Tally 官方文档中的结构),仍未找到适用于此 TallyPrime 版本的正确 XML 结构GST/VAT 特定法定报告(例如 GSTR-1、GSTR-3B、VAT 申报格式)
与其他支持 MCP 的 AI 客户端(例如 OpenAI Codex)的测试/打包集成 —— 服务器本身是标准 MCP 服务器(stdio/HTTP),因此并非 Claude 独有,但上述
.mcpb打包和安装步骤是 Claude Desktop 特有的,尚未在其他客户端上验证
许可证
ISC —— 参见 LICENSE。早期开发灵感来源于 vaijaaaaa/Tally-MCP-Server 和 dhananjay1405/tally-mcp-server。
Available Tools
87 toolsconfirm_writeADestructive
Post a previously-built preview to Tally — this is the only tool that actually writes, when the batch went through preview_write first. Takes the previewId from a prior preview_write call and sends that exact XML, unchanged, to Tally. A previewId can only be confirmed once — reusing an already-confirmed or expired one fails rather than silently reposting or reusing stale data.
Inputs: previewId (required).
create_cost_categoryA
Create a new Cost Category in TallyPrime (a grouping of cost centres, e.g. 'Branch', 'Project'). Required before creating a cost centre under a category that doesn't exist yet.
Inputs: name (required), allocateToRevenue, allocateToNonRevenue.
create_cost_centreA
Create a new Cost Centre in TallyPrime (e.g. a department, branch, or project used to tag voucher entries for cost tracking — see create_voucher's costCentre fields).
Inputs: name (required), parent, category.
create_credit_noteA
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.
Inputs: date (required), items (required), partyLedger (required), billName, +14 more.
create_debit_noteA
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.
Inputs: date (required), items (required), partyLedger (required), billName, +14 more.
create_delivery_noteA
Create a Delivery Note in TallyPrime — an item-line inventory voucher recording goods dispatched to a customer before or without a full Sales invoice (e.g. against a Sales Order). Same item-line shape as create_sales_invoice (stock item, quantity, rate, Sales ledger per line) but ISINVOICE is set to No and there's no VAT/tax line — a Delivery Note doesn't invoice the customer, it just moves stock out and records the reference. Distinct from create_rejections_out, which has no party/ledger amount at all. IMPORTANT (confirmed live): the Delivery Note voucher type must be active in the company first — check in Tally's UI (voucher types can be turned off per company) — otherwise the API still reports CREATED:1 even though the voucher won't show up in any report or be findable by get_vouchers/delete_voucher until the type is turned on. Once active, get_vouchers and delete_voucher find it correctly. get_ledger_vouchers will still never show it, by design, not a gap — that tool deliberately excludes inventory-classified vouchers (see its own description). ALSO confirmed live: Delivery Note can silently stop auto-numbering via the gateway, same failure mode as item-invoice types (Sales/Purchase/Credit Note/Debit Note) — symptom is a blank EXCEPTIONS:1 with no useful error text (the real cause, 'Voucher No. is missing', only shows in Tally's own Import Data UI). If creation fails this way, pass voucherNumber explicitly (check get_vouchers for the next free number of this voucher type).
Inputs: date (required), items (required), partyLedger (required), buyerTrn, +8 more.
create_godownA
Create a new Godown/Location in TallyPrime, optionally nested under a parent godown (e.g. a sub-location under a main warehouse). Required before referencing a godown that doesn't exist yet on an invoice/voucher line — those fail with 'Godown does not exist!' otherwise. Pass the parent's plain name, not a dotted path (confirmed live: 'MAIN LOCATION.DUBAI' is invalid, 'MAIN LOCATION' as parent + 'DUBAI' as name is correct).
Inputs: name (required), parent.
create_groupA
Create a new account group in TallyPrime, nested under a parent group, or rename/reparent an existing one by passing oldName.
Inputs: name (required), parent (required), oldName.
create_job_work_in_orderA
Create a Job Work In Order in TallyPrime — used when this company is the job worker, booking an order to process raw materials a customer will supply, into a finished item the company will deliver back. Each item line is the finished item expected to be delivered eventually, plus a nested list of components — the raw materials the customer is expected to supply for that item. Reverse-engineered from a real manually-created Job Work In Order's own export (same technique used for Sales Order): the component list lives nested two levels deep, inside each item's own order allocation (VOUCHERCOMPONENTLIST.LIST inside BATCHALLOCATIONS.LIST inside ALLINVENTORYENTRIES.LIST), each component carrying its own nested BATCHALLOCATIONS.LIST with a PARENTITEM back-reference to the item it belongs to. Confirmed live: this structure creates cleanly (no VAT/tax lines, no per-item ledger allocation — just the one balancing party ledger entry for the total). Same voucher-type-active prerequisite as other Order-class vouchers, and orderNumber + each item's dueDate are REQUIRED (same reasoning as create_sales_order). Distinct from create_job_work_out_order, which is for the opposite direction (sending materials out to a job worker).
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
create_job_work_out_orderA
Create a Job Work Out Order in TallyPrime — used when this company is the principal, sending raw materials out to a job worker (subcontractor) and expecting a finished item back. Mirror image of create_job_work_in_order: each item line is the finished item expected to be received from the job worker, plus a nested list of components — the raw materials this company will send out for that item. Same nested XML structure as create_job_work_in_order, with the accounting direction flipped (matching the existing Sales-side vs Purchase-side sign convention already used by create_sales_order vs create_purchase_order in this connector) since this voucher represents an inward expected receipt rather than an outward delivery. Confirmed live: creates cleanly with no exceptions. Same voucher-type-active prerequisite and required orderNumber/dueDate as create_job_work_in_order.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
create_ledgerB
Create a new ledger (account) in TallyPrime, or rename/update an existing one by passing oldName
Inputs: name (required), parent (required), pan, trn, +21 more.
create_material_inA
Create a Material In voucher in TallyPrime — records stock received back from a job worker (or any party holding your material for processing), tracked against that party's ledger without a real accounting posting (this is Tally's job-work memorandum tracking, not a purchase). Uses Tally's native 'Multi Consumption Voucher View' shape. EXTRAPOLATED from a genuine Tally-exported XML template for this exact voucher type, not verified against a real manually-created example in this project — verify carefully after use, especially on a company with godown/batch tracking enabled (pass godown on every item). If creation fails with LINEERROR 'Voucher date is missing' even though the date field is set correctly, the date is outside Tally's active period (Alt+F2) — call set_period to cover it and retry (confirmed live).
Inputs: date (required), items (required), partyLedger (required), narration, +1 more.
create_material_outA
Create a Material Out voucher in TallyPrime — records stock sent out to a job worker for processing, tracked against that party's ledger without a real accounting posting (job-work memorandum tracking, not a sale). Mirror of create_material_in. Same EXTRAPOLATED caveat and godown requirement apply. If creation fails with LINEERROR 'Voucher date is missing' even though the date field is set correctly, the date is outside Tally's active period (Alt+F2) — call set_period to cover it and retry (confirmed live).
Inputs: date (required), items (required), partyLedger (required), narration, +1 more.
create_physical_stockA
Create a Physical Stock voucher in TallyPrime — records a physical count and updates the stock item's book quantity to match it (that's the point of the voucher). Confirmed live against a real Tally-exported XML template (uses DIFFACTUALQTY=Yes at voucher level, not a per-line flag) after an earlier version of this tool was found to corrupt the closing balance to a nonsensical negative number — fixed and re-verified: counting 95 of an item that had 100 correctly closed the item at 95. It does not post any monetary/ledger write-off for the resulting shortage or excess value — do that separately with create_voucher if needed.
Inputs: date (required), items (required), narration, voucherNumber.
create_purchase_invoiceA
Create an item-invoice Purchase voucher in TallyPrime — mirror of create_sales_invoice for the buying side. A real invoice with stock item lines (quantity, rate), each posted to its own Purchase ledger, plus one optional VAT/tax line on the total. WARNING (confirmed live, same as create_sales_invoice): if the same party ledger or stock item is used in BOTH a Sales and a Purchase item-invoice, it can become undeletable via the API afterward — using it in only one of the two is fine and stays deletable. If it does happen, running Company Data → Rewrite in Tally itself clears it (confirmed live) — this is not a permanent lock.
Inputs: date (required), items (required), partyLedger (required), billName, +14 more.
create_purchase_orderA
Create a Purchase Order in TallyPrime — a future commitment to buy, before any goods move or invoicing happens. Same item-line shape as create_purchase_invoice/create_receipt_note but VCHTYPE is 'Purchase Order' and Tally classifies it as an Order-class voucher. Follow up with create_receipt_note (goods in) and/or create_purchase_invoice (billing) against the same party once goods actually arrive. Same voucher-type-active prerequisite as create_delivery_note (confirmed live). orderNumber and each item's dueDate are REQUIRED — same reasoning as create_sales_order: reverse-engineered from a real Sales Order export, confirmed the same live errors and Auto Retain numbering behavior apply here too.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
create_receipt_noteA
Create a Receipt Note in TallyPrime — an item-line inventory voucher recording goods received from a supplier before or without a full Purchase invoice (e.g. against a Purchase Order). Same item-line shape as create_purchase_invoice (stock item, quantity, rate, Purchase ledger per line) but ISINVOICE is set to No and there's no VAT/tax line — mirror of create_delivery_note on the buying side. Same caveat as create_delivery_note: the voucher type must be active in the company first, or it won't show up in get_vouchers/delete_voucher until it is. get_ledger_vouchers will still never show it, by design. If creation fails with LINEERROR 'Voucher date is missing' even though the date field is set correctly, the date is outside Tally's active period (Alt+F2) — call set_period to cover it and retry (confirmed live).
Inputs: date (required), items (required), partyLedger (required), buyerTrn, +9 more.
create_rejections_inA
Create a Rejections In voucher in TallyPrime — records goods rejected and returned to you (e.g. by a customer or a job worker returning defective components). Inventory movement only, same shape as a Sales/Purchase item line but with no party ledger. EXTRAPOLATED: no confirmed real-world XML example was available for this exact voucher type — built by analogy to Tally's other inventory-only voucher shapes (Physical Stock). Verify carefully after use — godown is required on every item unless the company has exactly one godown, in which case it auto-fills. If creation fails with LINEERROR 'Voucher date is missing' even though the date field is set correctly, the date is outside Tally's active period (Alt+F2) — call set_period to cover it and retry (confirmed live).
Inputs: date (required), items (required), narration, voucherNumber.
create_rejections_outA
Create a Rejections Out voucher in TallyPrime — records goods you're rejecting and returning outward (e.g. back to a supplier, or components you're sending back to a job worker as defective). Mirror of create_rejections_in. Same EXTRAPOLATED caveat and godown requirement apply. If creation fails with LINEERROR 'Voucher date is missing' even though the date field is set correctly, the date is outside Tally's active period (Alt+F2) — call set_period to cover it and retry (confirmed live).
Inputs: date (required), items (required), narration, voucherNumber.
create_sales_invoiceA
Create an item-invoice Sales voucher in TallyPrime — a real invoice with stock item lines (quantity, rate), each posted to its own Sales ledger, plus one optional VAT/tax line on the total. Distinct from create_voucher, which only supports plain ledger-to-ledger entries with no stock items. WARNING (confirmed live): if the same party ledger or stock item is used in BOTH a Sales and a Purchase item-invoice, it can become undeletable via the API afterward (returns 'Cannot be deleted!' even with zero balance) — using it in only one of the two is fine and stays deletable. If it does happen, running Company Data → Rewrite in Tally itself clears it (confirmed live) — this is not a permanent lock.
Inputs: date (required), items (required), partyLedger (required), billName, +14 more.
create_sales_orderA
Create a Sales Order in TallyPrime — a future commitment to sell, before any goods move or invoicing happens. Same item-line shape as create_sales_invoice/create_delivery_note but VCHTYPE is 'Sales Order' and Tally classifies it as an Order-class voucher, structurally different from Delivery Note's inventory-class. Follow up with create_delivery_note (dispatch) and/or create_sales_invoice (billing) against the same party once goods actually move. Same voucher-type-active prerequisite as create_delivery_note (confirmed live) — check it's on in the company before relying on this. orderNumber and each item's dueDate are REQUIRED (unlike other item-invoice tools, where the equivalent fields are optional): confirmed live that Tally rejects an Order-class voucher with 'Order No. is missing in Item Allocations' and separately 'Due Date of Order is missing in Item Allocations' without them. Reverse-engineered from a real manually-created Sales Order's own export: the UI's 'Order no.' field is backed by the voucher-level REFERENCE tag (independent of the voucher number — the real example had voucherNumber '1' and Order no. '12345' as genuinely different values), while the per-item Order No. and Due Date both live nested inside each item's BATCHALLOCATIONS.LIST, not as direct ALLINVENTORYENTRIES fields as their names might suggest. Also confirmed live: Tally silently reassigns its own voucher number for Order-class vouchers regardless of an explicit voucherNumber passed in (its 'Auto Retain' numbering style for this voucher type) — check the actual assigned number via get_vouchers after creating one, don't assume the value you passed was used.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
create_sales_quotationA
Create a Sales Quotation in TallyPrime — a pre-order price quote to a prospective customer, one step before create_sales_order. Same item-line shape as create_sales_order, including the same orderNumber (REFERENCE) and per-item dueDate requirements — confirmed live that Tally classifies Sales Quotation as an Order-class voucher (PARENT 'Sales Order' in get_voucher_types) and rejects it the same way without them. Same voucher-type-active prerequisite as create_delivery_note. Follow up with create_sales_order once the customer accepts.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
create_stock_groupA
Create a new Stock Group in TallyPrime, nested under a parent stock group. Distinct from create_group (account groups like Sundry Debtors) — this is the category stock items are filed under (create_stock_item's 'group' field). Required before creating a stock item under a brand-new category that doesn't exist yet.
Inputs: name (required), parent (required).
create_stock_itemC
Create a new stock item in TallyPrime
Inputs: name (required), unit (required), group (required), hsnCode, +13 more.
create_stock_journalA
Create a Stock Journal voucher in TallyPrime, moving inventory from one or more source stock items to one or more destination stock items (transfer, manufacturing-style conversion with multiple raw materials consumed and/or multiple finished/by-products produced, etc). Inventory-only — no ledger entries. Every source/destination line's godown is auto-filled only when this company has exactly one godown; if it has more than one (e.g. Dubai/Sharjah/Ajman), godown is required on each line and the call fails naming the available godowns rather than guessing (previously an omitted godown was silently dropped — blank EXCEPTIONS:1, no error text — this is now caught explicitly instead of guessing wrong).
Inputs: date (required), sources (required), destinations (required), narration, +3 more.
create_unitA
Create a new Unit of Measure in TallyPrime — a simple unit (e.g. 'Kg', 'Box', 'Ltr') by default, or a compound unit (e.g. 'Box of 12 Nos') by passing baseUnit/additionalUnit/conversion. Required before creating or invoicing a stock item in a unit that doesn't exist yet — stock item/invoice tools fail with 'Unit does not exist!' otherwise. For a compound unit, both baseUnit and additionalUnit must already exist as simple units first (confirmed live pattern: create both simple units, then the compound unit referencing them). A simple unit's symbol (and baseUnit/additionalUnit, since those reference existing simple units' symbols) cannot contain whitespace — confirmed live: Tally rejects that with 'Master name contains invalid characters', checked client-side before this ever reaches Tally. A compound unit's own display name (e.g. 'Box of 12 Nos') can still contain spaces.
Inputs: symbol (required), baseUnit, conversion, formalName, +2 more.
create_voucherA
Create a new voucher (e.g. Payment, Receipt, Sales, Purchase, Journal) in TallyPrime. Either pass debitLedger/creditLedger/amount for a simple 2-leg voucher, or pass 'entries' for a voucher with 3+ lines (e.g. one payment split across several expense ledgers). Normally omit voucherNumber and let Tally auto-number — but if Tally's numbering series doesn't pick up correctly (confirmed live: a company on a 'PNPC/2026/...' series silently restarted from '1' instead of continuing it), pass voucherNumber explicitly to force the value you want; check get_vouchers for the correct next number first.
Inputs: date (required), voucherType (required), mode, amount, +23 more.
create_vouchers_batchA
Post many vouchers (Journal, Payment, Receipt, etc. — same shape as create_voucher, one entry per voucher) in one call, for bulk work where posting one at a time is impractical (e.g. hundreds of balance-confirmation adjustment journals). Internally splits into chunks (default 10, max 50 — Tally's own gateway has a 10-second timeout per request, and a bigger single import risks silently exceeding it) and, after each chunk posts, runs ONE bulk query to confirm exactly which vouchers in that chunk actually exist in Tally now — this always runs, even if the post itself errored or timed out, because a client-side timeout does not mean Tally didn't still create some or all of them server-side; retrying without checking first risks posting duplicates. Verification matches each voucher back by (voucherType, narration) — NOT voucherNumber, confirmed live to be unreliable even when set explicitly (Tally silently reassigned its own auto-series number instead for a Journal voucher); reference was tried next and also came back empty on read. narration is what's confirmed live to persist exactly as sent, so it's REQUIRED and must be non-empty on every voucher, and must be unique per voucherType across the whole batch — two vouchers sharing the same (voucherType, narration) can't be told apart afterward and are rejected up front as invalid rather than silently mismatched (e.g. embed each row's own reference/id in the narration text). The result names exactly which vouchers were confirmed and which were not, per chunk, so a partial failure can be retried by resending only the ones that didn't land — never blindly resend the whole batch. Does not go through preview_write/confirm_write given the scale involved; sending a small batch (2-3 vouchers) first to confirm shape/ledger names before a large run is recommended.
Inputs: vouchers (required), chunkSize.
create_voucher_typeA
Create a new custom Voucher Type in TallyPrime (e.g. 'Bank Payment' as a sub-type of 'Payment', with its own numbering series/abbreviation) — or rename/reconfigure an existing one by passing oldName. Base types to derive from: 'Payment', 'Receipt', 'Journal', 'Contra', 'Sales', 'Purchase', 'Credit Note', 'Debit Note', 'Stock Journal', 'Physical Stock', etc. — must be an exact existing voucher type name (check get_voucher_types first). Setting numberingMethod explicitly is useful given the confirmed-live issue where some Tally configurations stop auto-numbering item-invoice-mode voucher types via the XML gateway unless a voucherNumber is supplied on every create call — see create_sales_invoice's voucherNumber note. Confirmed live separately: a brand-new custom voucher type created WITHOUT numberingMethod set can accept vouchers with a completely blank voucher number (not even '1') — pass numberingMethod: 'Automatic' explicitly to avoid ending up with unreferenceable vouchers you can only look up/delete by date.
Inputs: name (required), parent (required), oldName, extraFields, +4 more.
delete_masterADestructiveIdempotent
Delete one or more masters (ledger, group, stock item, voucher type, unit, godown, cost centre, etc.) from TallyPrime by name. If a master was used in a voucher you're also deleting, delete the voucher first and confirm it succeeded before calling this — doing both in the same parallel batch can race (the master delete reaching Tally before the voucher delete has committed), confirmed live. If a ledger/stock item was used in both a Sales AND a Purchase item-invoice, it may return 'Cannot be deleted!' permanently even with no transactions left — this is fixed by running Company Data → Rewrite in Tally itself (confirmed live), not by retrying or sequencing.
Inputs: names (required), collection (required).
delete_stock_itemADestructiveIdempotent
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.
Inputs: name (required).
delete_voucherADestructiveIdempotent
Permanently delete an existing voucher from TallyPrime — removes it entirely with no trace (distinct from cancelling, which keeps it visible but marked Cancelled). The voucher is matched by type + date + voucher number, so that combination must be unique and must exactly match an existing voucher (use get_ledger_vouchers or get_vouchers first to confirm it). This has no undo. Refuses if another voucher type shares the same number on that date (confirmed live: Tally's lookup ignores voucher type and can silently target the wrong one) — resolve the collision in Tally first.
Inputs: date (required), voucherType (required), voucherNumber (required).
get_audit_logARead-only
Read this connector's append-only audit log — every tool call made through it (read or write), with timestamp, arguments, outcome (success/error/denied), and a best-effort Tally company tag. Entries older than 90 days are permanently deleted (checked once per server startup, not kept indefinitely) — this is not a full historical record beyond that window. Use this to review what an agent actually did against this Tally company, e.g. before trusting a session's claimed results, or to hand a reviewer a plain record of every write made in a given period.
Inputs: limit, format, toDate, company, +3 more.
get_balance_sheetBRead-only
Get the Balance Sheet from TallyPrime as of a given date
Inputs: asOf (required).
get_bills_payableARead-only
Get outstanding Bills Payable from TallyPrime as of a given date
Inputs: asOf (required).
get_bills_receivableARead-only
Get outstanding Bills Receivable from TallyPrime as of a given date
Inputs: asOf (required).
get_cash_flowARead-only
Get the Cash Flow statement from TallyPrime for a date range — Tally's own canned report, reachable directly via a plain Export Data request (confirmed live, unlike the VAT/GST return reports). Returns Tally's native monthly-period breakdown shape (DSPPERIOD/DSPACCINFO arrays) as-is.
Inputs: to (required), from (required).
get_company_infoARead-only
Get the currently open company info from TallyPrime
Inputs: no named parameters.
get_cost_centresARead-only
Get all cost centres from TallyPrime
Inputs: no named parameters.
get_funds_flowARead-only
Get the Funds Flow statement from TallyPrime for a date range — Tally's own canned report, reachable directly via a plain Export Data request. Returns Tally's native monthly-period breakdown shape as-is.
Inputs: to (required), from (required).
get_groupsARead-only
Get all account groups (e.g. Sundry Debtors, Fixed Assets) from TallyPrime
Inputs: no named parameters.
get_gst_liability_summaryARead-only
Get an India GST liability summary for a date range. Same design as get_vat_liability_summary — each row is a GST ledger (CGST/SGST/IGST, input/output/payable/receivable/RCM) with its closing balance for the period, classified as input/output/rcm/other ('rcm' kept separate from input/output — reverse-charge liability is the thing that's easily missed manually), tagged 'structural' (Tally's Type-of-duty/tax field = GST) or 'name_pattern' (matched Input/Output CGST/SGST/IGST or GST Payable/Receivable/RCM naming) — both signals used together for the same reason: confirmed live that Tally's structural tag alone misses every ledger with real activity in a real company file. Deliberately excludes generic expense ledgers that merely mention GST in their name (a freight ledger, a GST write-off/ineligible-ITC ledger) — those aren't tax liability lines and including them would misstate the position. netTotal sums all rows using Tally's own debit/credit sign convention. Not a canned GSTR export — reconstructed from ledger balances. If no matching ledgers exist, returns an explicit note instead of a bare zero.
Inputs: to (required), from (required).
get_health_checkARead-only
Check whether this connector is actually safe and working right now: is Tally's gateway reachable, is a company open (and which one), what TALLY_URL it's talking to, whether read-only mode is on, and which tools (if any) are explicitly disabled. Use this before trusting a session, or when something feels off, instead of inferring connector state from a single tool call's success/failure.
Inputs: no named parameters.
get_journal_registerARead-only
Get the Journal Register from TallyPrime for a date range — a month-by-month summary of Journal voucher activity, same design as get_sales_register.
Inputs: to (required), from (required).
get_ledgersARead-only
Get ledgers (accounts) from TallyPrime. Omit query to get every ledger. Pass query to instead get a fuzzy-ranked shortlist of the closest-matching ledger names — useful when you have a rough or partial name (e.g. from a client document) and need Tally's exact spelling before creating a voucher or a new ledger, without pulling and scanning the entire ledger list yourself. Matches on exact/prefix/substring, then falls back to a loose in-order character match for abbreviations and typos (e.g. 'vro' finds 'VRO Technology'). Returns at most the top 20 matches, ranked best first; an empty result means create the ledger — nothing close enough exists yet. Each ledger includes VATTINNUMBER, VATDEALERTYPE, STATE, and COUNTRY (the values set via create_ledger's trn/vatDealerType/state/country fields, blank if never set), plus GSTIN, PAN, GSTREGISTRATIONTYPE, GSTTYPEOFSUPPLY, and CONTACTPERSON (set via create_ledger's gstin/pan/gstRegistrationType/gstTypeOfSupply/contactPerson fields — GSTIN/PAN/GSTREGISTRATIONTYPE are India's fields, distinct from trn/VATDEALERTYPE which are UAE-specific; a company only uses one country's set or the other, not both) — check the relevant ones before creating a Sales/Purchase invoice (or Credit/Debit Note, Delivery/Receipt Note) for that party: Tally itself defaults a new invoice's Buyer/Place-of-Supply details from the party ledger's own master data, so use these same values for buyerTrn/buyerState/buyerCountry rather than leaving them blank or guessing. Only ask the user to confirm instead of defaulting when the party has multiple registered delivery locations/addresses and it's genuinely unclear which one applies to this specific transaction (confirmed live: a real customer ledger can carry dozens of named addresses, and one invoice's Buyer address and Consignee/Ship-to address can legitimately differ from both the ledger's default and each other).
Inputs: query.
get_ledger_vouchersARead-only
Get all voucher entries posted to a specific ledger within a date range
Inputs: to (required), from (required), ledgerName (required).
get_payment_registerARead-only
Get the Payment Register from TallyPrime for a date range — a month-by-month summary of Payment voucher activity, same design as get_sales_register. For Receipt vouchers specifically, use get_receipts_and_payments instead — Tally has no separate standalone 'Receipt Register' report reachable this way (confirmed live: 'Could not find Report').
Inputs: to (required), from (required).
get_profit_and_lossBRead-only
Get the Profit & Loss statement from TallyPrime for a date range
Inputs: to (required), from (required).
get_purchase_registerARead-only
Get the Purchase Register from TallyPrime for a date range — a month-by-month summary of Purchase voucher activity, same design as get_sales_register.
Inputs: to (required), from (required).
get_ratio_analysisARead-only
Get the Ratio Analysis report from TallyPrime for a date range (Working Capital, Current Ratio, Quick Ratio, Inventory Turnover, Debtors/Creditors Turnover, and similar standard ratios) — Tally's own canned report, reachable directly via a plain Export Data request. Returns Tally's native RATIONAME/value array shape as-is.
Inputs: to (required), from (required).
get_receipts_and_paymentsARead-only
Get the Receipts and Payments report from TallyPrime for a date range — a cash/bank-ledger-wise view combining Receipt and Payment activity, Tally's own canned report. This is the closest reachable equivalent to a standalone Cash Book/Bank Book — Tally's actual 'Cash Book'/'Bank Book' menu reports are not reachable via a plain Export Data request (confirmed live: 'Could not find Report'), even though they're registered report names — for a single cash or bank ledger's own transaction history instead, use get_ledger_vouchers with that ledger's name.
Inputs: to (required), from (required).
get_reorder_statusARead-only
Get the Reorder Status report from TallyPrime for a date range — stock items with a reorder level configured, and where their current quantity stands against it (closingStock, onPurchaseOrder, onSaleOrder, reorderLevel, shortfall, minimumQty, requiredQty per row). Tally's own report returns every stock item regardless of reorder setup (confirmed live: a 10,770-item company with no reorder levels configured returned a ~1.4MB all-null dump) — this tool filters that down to only rows that actually have a reorder level set, since that's the only subset the report can say anything useful about. An empty rows array with a note means no items have a reorder level configured at all, not an error — use get_stock_summary for a plain quantity view of every item regardless of reorder setup.
Inputs: to (required), from (required).
get_sales_registerARead-only
Get the Sales Register from TallyPrime for a date range — a month-by-month summary of Sales voucher activity, Tally's own canned report reachable directly via a plain Export Data request. For individual Sales voucher line detail (not just monthly totals), use get_vouchers or get_ledger_vouchers instead.
Inputs: to (required), from (required).
get_stock_itemsARead-only
Get all stock items from TallyPrime. Each item includes NAME, PARENT, CLOSINGBALANCE, plus DESCRIPTION, PARTNUMBER, COSTINGMETHOD (e.g. 'Avg. Cost', 'FIFO'), GSTTYPEOFSUPPLY ('Goods'/'Services') — blank/empty if never set on that item — and GSTAPPLICABLE (read-only: Tally computes this from the item's own GST configuration, it cannot be set directly). Also includes GSTDETAILS: {hsnCode, taxability, applicableFrom, isReverseChargeApplicable, gstIneligibleItc} (or null if no GST Details entry exists at all), taken from Tally's own date-versioned GST Details list — set via create_stock_item's/update_stock_item's hsnCode/taxability/isReverseChargeApplicable/gstIneligibleItc fields. When an item has more than one dated entry (a rate/HSN change over time), this shows only the one with the latest applicableFrom, not the full history.
Inputs: no named parameters.
get_stock_summaryARead-only
Get the Stock Summary report from TallyPrime as of a given date
Inputs: asOf (required).
get_trial_balanceARead-only
Get the Trial Balance from TallyPrime for a date range
Inputs: to (required), from (required).
get_vat_liability_summaryARead-only
Get a UAE VAT liability summary for a date range. Each row is a VAT ledger with its closing balance for the period, classified as input/output/rcm/other — 'rcm' (reverse charge) is kept separate from plain input/output because reverse-charge liability is the thing that's easily missed manually, even though it nets to a wash for most businesses — tagged with how it was found — 'structural' (Tally's own Type-of-duty/tax field is set to VAT on that ledger) or 'name_pattern' (matched Input/Output/Payable/Receivable VAT naming). Both signals are used together, not one alone — confirmed live on real company data that Tally's structural tag is precise but has near-zero recall: every properly-tagged ledger had a zero balance, while the ledgers actually carrying real money were created without that tag set at all. Not filtered by any particular parent group — real companies were confirmed to scatter these ledgers across many different groups, not one standard group. netTotal sums all rows using Tally's own debit/credit sign convention. Not Tally's canned VAT return report (confirmed live it isn't reachable via a plain Export Data request) — reconstructed from ledger balances the same way get_profit_and_loss is. If no matching ledgers exist, returns an explicit note instead of a bare zero — a company with no VAT ledgers (not registered, or unrecognizable naming) is a different fact from a real zero liability period.
Inputs: to (required), from (required).
get_vouchersARead-only
Get vouchers (Day Book) from TallyPrime filtered by date range. Returns a flat array of rows (guid, date, voucher_type, voucher_number, reference, party_ledger, amount, narration) — headers only, no stock item or ledger line detail (use get_ledger_vouchers or query_sql for that). Rebuilt on the same Voucher collection query sync_vouchers_to_sql already uses: an earlier version called Tally's canned 'Day Book' report directly, which was confirmed live to silently ignore the date range entirely (returning the same fixed set regardless of what was requested, even for a year before the company's books start) — this version correctly scopes to the requested range.
Inputs: to (required), from (required).
get_voucher_typesARead-only
Get all voucher types configured in TallyPrime (e.g. Payment, Sales, Journal)
Inputs: no named parameters.
preview_writeARead-only
Build the exact XML for any write tool WITHOUT sending it to Tally — nothing is touched. Returns a previewId plus a plain-English description and the raw XML, so you (or whoever's reviewing) can see precisely what would happen before it happens. Use this instead of calling a create_*/update_*/delete_* tool directly whenever you want a human to review a batch of changes first — e.g. drafting several vouchers from a folder of client documents, where posting the wrong one is costly. Every applicable safety check this tool would normally run (e.g. the voucher-type collision check on update_*/delete_voucher) runs now, at preview time, so the preview already reflects any refusal. A preview expires after 15 minutes and is single-use — call confirm_write with its previewId to actually post it, or just don't confirm it if it's wrong. Never touches Tally with a write of its own (a create_* preview makes no gateway call at all; an update_*/delete_* preview only makes the same read-only collision-check query that tool would normally make) — so unlike every other write tool, preview_write still works even when read-only mode is on. confirm_write is the one that's actually blocked by read-only mode.
Inputs: args (required), toolName (required).
query_sqlARead-only
Run a read-only SQL SELECT query against this session's in-memory cache (gone when the session ends). Tables: ledgers(name, parent, closing_balance, trn, state, country), groups(name, parent), stock_items(name, parent, closing_balance), vouchers(guid, date, voucher_type, voucher_number, party_ledger, amount, narration), voucher_items(voucher_guid, date, voucher_type, voucher_number, stock_item, qty, rate, amount, is_deemed_positive, godown, batch), voucher_ledger_entries(voucher_guid, date, voucher_type, voucher_number, ledger, amount, is_deemed_positive, cost_centre, bill_name, bill_type, description) — all six populated only by explicitly calling sync_to_sql/sync_vouchers_to_sql/sync_voucher_items_to_sql/sync_voucher_ledger_entries_to_sql first. Movement analysis, godown-wise stock, and batch/ageing detail are just SELECTs over voucher_items — there is no separate report tool for them. Splitting a ledger's balance apart by voucher (e.g. a combined VAT ledger into Output vs Input), or reconciling a party ledger's movements voucher by voucher, is just a SELECT over voucher_ledger_entries the same way — voucher_ledger_entries.amount is signed (negative debit, positive credit), so GROUP BY ledger, voucher_type with SUM(amount) is the natural query. profit_and_loss(ledger_name, group_name, closing_balance, period_from, period_to), stock_summary(name, parent, opening_qty, closing_qty, opening_value, closing_value, as_of_date), balance_sheet(group_name, amount, as_of_date), trial_balance(name, debit_amount, credit_amount, period_from, period_to), vat_summary(ledger_name, category, closing_balance, period_from, period_to), and gst_summary(ledger_name, category, closing_balance, period_from, period_to) are populated automatically, no separate sync step — every get_profit_and_loss/get_stock_summary/get_balance_sheet/get_trial_balance/get_vat_liability_summary/get_gst_liability_summary call refreshes its table with that call's result, so a follow-up question about the same report can query it here instead of re-fetching from Tally. Each of these six only ever holds the most recent call's data, not a history — re-call the report tool if you need a different period. Every call here checks which company is actually open in Tally right now against what the cache was last synced/queried for, however that company was arrived at (set_company, Tally's own UI, or a connector restart) — a mismatch clears the stale cache and refuses to run, rather than silently answering with a previous company's rows under the new company's name.
Inputs: sql (required).
set_bill_of_materialsADestructiveIdempotent
Attach a Bill of Materials (recipe) to an existing finished-goods stock item, so a Manufacturing/Stock Journal producing this item can have its component quantities computed from a fixed ratio instead of typed by hand every time. Uses Tally's native MULTICOMPONENTLIST.LIST structure. This is a pure convenience layer over create_stock_journal — it does not affect stock or post anything by itself; you still call create_stock_journal to actually record a production run, scaling each component's qty by the ratio to basicQty yourself (this tool does not auto-compute that scaling for you). EXTRAPOLATED from a genuine Tally-exported XML template's stock item master shape, not reverse-engineered from a real manually-created BOM — verify carefully after use, especially natureOfItem's accepted values.
Inputs: stockItem (required), components (required), unit, basicQty, +1 more.
set_companyARead-only
Switch TallyPrime's active company context. Changes which company subsequent tool calls and reports operate on — validate the name with get_ledgers/get_company_info or the company list first
Inputs: companyName (required).
set_periodARead-only
Switch TallyPrime's active reporting period. Changes the global from/to date context used by Tally for subsequent report queries until changed again
Inputs: to (required), from (required).
sync_to_sqlARead-only
Pull ledgers, groups, and stock items from TallyPrime into this session's SQL cache (in-memory — gone when this session ends), so query_sql can run fast arbitrary queries without hitting Tally each time. Every sync/query tool checks which company is actually open in Tally right before touching the cache and clears it if that's changed since the last one — however the switch happened (set_company, Tally's own UI, or a connector restart) — so a stale company's rows never silently answer under a new company's name; the return message says so when it happens. Does NOT sync vouchers — use sync_vouchers_to_sql for those, one date range at a time.
Inputs: no named parameters.
sync_voucher_items_to_sqlARead-only
Pull voucher INVENTORY LINE ITEMS (stock item, qty, rate, amount, godown, batch — one row per item per batch allocation) for one date range into this session's SQL cache, so query_sql can compute movement analysis, godown-wise stock, or batch detail directly. This is the raw data those analyses need — Tally has no exportable 'Movement Analysis'/'Stock Ageing Analysis'/'Godown Summary' report reachable over the gateway (confirmed live against all 138 registered report names, and confirmed live that per-godown $ClosingBalance/SVGODOWNNAME scoping doesn't work either), so this connector doesn't try to replicate those as report tools — pull the line items with this, then write the aggregation as SQL. qty/amount are UNSIGNED as Tally stores them on the inventory entry; use is_deemed_positive together with voucher_type to work out inward vs outward direction. A voucher with no stock items (Payment, Journal, etc.) contributes zero rows, not an empty one. Same chunked, additive-by-date-range model and same timeout caution as sync_vouchers_to_sql — quarterly/monthly chunks for a busy company. Checks which company is actually open in Tally first and clears the whole cache if it's changed since the last sync/query — however that happened, not just via set_company.
Inputs: to (required), from (required).
sync_voucher_ledger_entries_to_sqlARead-only
Pull voucher LEDGER LINES (which ledger each voucher posted to, the amount, cost centre, and bill allocation — one row per ledger line per bill allocation) for one date range into this session's SQL cache. This is the piece get_vouchers/sync_vouchers_to_sql can't give you — those return only each voucher's single overall total, not which ledgers it actually posted to and for how much. Use this whenever a ledger's balance needs to be broken down by the vouchers that make it up — e.g. a combined VAT ledger split into Output vs Input (GROUP BY ledger, voucher_type), or reconciling a party ledger's movements voucher by voucher. amount is SIGNED (negative for a debit line, positive for a credit line — confirmed live: a Sales invoice's party ledger line comes back negative while its Sales/VAT lines come back positive, summing to zero across the voucher) — sum it directly. description carries a ledger line's 'Additional Descriptions for Ledgers' text (several lines joined with ' | ', null where none). Same chunked, additive-by-date-range model and same timeout caution as sync_vouchers_to_sql/sync_voucher_items_to_sql — quarterly/monthly chunks for a busy company. Checks which company is actually open in Tally first and clears the whole cache if it's changed since the last sync/query — however that happened, not just via set_company.
Inputs: to (required), from (required).
sync_vouchers_to_sqlARead-only
Pull voucher HEADERS (date, type, number, party ledger, amount, narration — not line items) for one date range into this session's SQL cache (in-memory, gone when the session ends), so query_sql can aggregate/report on them (e.g. sales by customer by month) without re-fetching from Tally. Call this once per chunk to build up full multi-year history for the CURRENTLY OPEN company within this session — re-running for the SAME range just refreshes it (safe to re-run), and each call only touches vouchers within its own date range, so calling it for 2024 then 2025 gives you both, not just the latest. Checks which company is actually open in Tally first and clears the whole cache if it's changed since the last sync/query — however that happened, not just via set_company — so a prior company's vouchers never silently mix into this one's results. IMPORTANT: pick a chunk size that won't time out — a full year (~7,500 vouchers here) took ~6s against the 10s request timeout; prefer quarterly or monthly chunks for a busy company, and back off further if a call times out. Does not include stock item / ledger line detail (see get_ledger_vouchers/get_vouchers for that).
Inputs: to (required), from (required).
update_credit_noteADestructiveIdempotent
Update an existing item-invoice Credit Note in TallyPrime, replacing its item lines, party, and narration. Same fields as create_credit_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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +14 more.
update_debit_noteADestructiveIdempotent
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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +14 more.
update_delivery_noteADestructiveIdempotent
Update an existing Delivery Note in TallyPrime, replacing its item lines, party, and narration. Same fields as create_delivery_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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +8 more.
update_job_work_in_orderADestructiveIdempotent
Update an existing Job Work In Order in TallyPrime, replacing its item lines (and their component lists), party, order number, and narration. Same fields as create_job_work_in_order, 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.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
update_job_work_out_orderADestructiveIdempotent
Update an existing Job Work Out Order in TallyPrime, replacing its item lines (and their component lists), party, order number, and narration. Same fields as create_job_work_out_order, plus voucherNumber. Same matching/collision caveats as update_job_work_in_order.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
update_material_inADestructiveIdempotent
Update an existing Material In voucher in TallyPrime, replacing its item lines and narration. Same fields as create_material_in, 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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +1 more.
update_material_outADestructiveIdempotent
Update an existing Material Out voucher in TallyPrime, replacing its item lines and narration. Same fields as create_material_out, plus voucherNumber. Same matching/collision caveats as update_material_in.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +1 more.
update_physical_stockADestructiveIdempotent
Update an existing Physical Stock voucher in TallyPrime, replacing its counted item lines and narration. Same fields as create_physical_stock, 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.
Inputs: date (required), items (required), voucherNumber (required), narration.
update_purchase_invoiceADestructiveIdempotent
Update an existing item-invoice Purchase voucher in TallyPrime, replacing its item lines, party, and narration. Same fields as create_purchase_invoice, 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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +14 more.
update_purchase_orderADestructiveIdempotent
Update an existing Purchase Order in TallyPrime, replacing its item lines, party, order number, and narration. Same fields as create_purchase_order, plus voucherNumber. Same matching/collision caveats as update_sales_order.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
update_receipt_noteADestructiveIdempotent
Update an existing Receipt Note in TallyPrime, replacing its item lines, party, and narration. Same fields as create_receipt_note, plus voucherNumber. Same matching/collision caveats as update_delivery_note.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +9 more.
update_rejections_inADestructiveIdempotent
Update an existing Rejections In voucher in TallyPrime, replacing its item lines and narration. Same fields as create_rejections_in, plus voucherNumber. Same matching/collision caveats as update_material_in.
Inputs: date (required), items (required), voucherNumber (required), narration.
update_rejections_outADestructiveIdempotent
Update an existing Rejections Out voucher in TallyPrime, replacing its item lines and narration. Same fields as create_rejections_out, plus voucherNumber. Same matching/collision caveats as update_material_in.
Inputs: date (required), items (required), voucherNumber (required), narration.
update_sales_invoiceADestructiveIdempotent
Update an existing item-invoice Sales voucher in TallyPrime, replacing its item lines, party, and narration. Same fields as create_sales_invoice, 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.
Inputs: date (required), items (required), partyLedger (required), voucherNumber (required), +14 more.
update_sales_orderADestructiveIdempotent
Update an existing Sales Order in TallyPrime, replacing its item lines, party, order number, and narration. Same fields as create_sales_order (orderNumber and each item's dueDate still REQUIRED), plus voucherNumber to locate the existing voucher. 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. Note voucherNumber here is the existing voucher's own number to match by — Tally may still not let you change it, since Order-class vouchers use 'Auto Retain' numbering (see create_sales_order).
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
update_sales_quotationADestructiveIdempotent
Update an existing Sales Quotation in TallyPrime, replacing its item lines, party, order number, and narration. Same fields as create_sales_quotation, plus voucherNumber. Same matching/collision caveats as update_sales_order.
Inputs: date (required), items (required), orderNumber (required), partyLedger (required), +2 more.
update_stock_itemBDestructiveIdempotent
Update an existing stock item in TallyPrime — same fields as create_stock_item, all optional except name.
Inputs: name (required), unit, group, hsnCode, +11 more.
update_stock_journalADestructiveIdempotent
Update an existing Stock Journal voucher in TallyPrime, replacing its source/destination lines and narration. Same fields as create_stock_journal, 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.
Inputs: date (required), sources (required), destinations (required), voucherNumber (required), +3 more.
update_voucherADestructiveIdempotent
Update an existing voucher in TallyPrime, replacing its ledger entries and narration. The voucher is matched by type + date + voucher number, so that combination must be unique and must exactly match an existing voucher (use get_ledger_vouchers or get_vouchers first to confirm it). Either pass debitLedger/creditLedger/amount for a simple 2-leg voucher, or pass 'entries' for 3+ lines, same as create_voucher. 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.
Inputs: date (required), voucherType (required), voucherNumber (required), mode, +19 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 87 tools
Despite 87 tools, most have a sharply distinct role: each Tally voucher type gets its own create_/update_ pair (Sales Invoice, Purchase Invoice, Credit/Debit Note, Delivery/Receipt Note, Material In/Out, Rejections In/Out, Physical Stock, Stock Journal, Orders, Job Work, Quotation) and the descriptions actively contrast them. A few genuine overlaps remain: delete_master duplicates delete_stock_item's capability, create_vouchers_batch overlaps create_voucher, and adjacent pairs like create_delivery_note vs create_sales_invoice or create_material_in vs create_receipt_note require careful reading to avoid misselection.
The set follows a strongly predictable verb_noun convention (get_*, create_*, update_*, delete_*, set_*, sync_*), with create_/update_ pairs named identically per voucher type. Minor deviations exist (create_vouchers_batch is plural while its sibling is create_voucher, delete_master is a generic escape hatch alongside delete_stock_item, and preview_write/confirm_write sit outside the CRUD verb set), but none are confusing.
87 tools is an extreme surface for one server, well past the point where an agent can hold the set in mind or reliably pick among near-sibling voucher types. Much of the volume comes from exhaustive create_/update_ permutations across ~17 voucher types, which could have been collapsed into a parameterized voucher tool with a type discriminator.
The surface is remarkably thorough for TallyPrime: masters (ledgers, groups, stock items/groups, units, godowns, cost centres/categories, voucher types), the full voucher lifecycle across every major voucher type, delete_voucher/delete_master, financial reports, tax summaries, SQL sync/query, preview/confirm write safety, and an audit log. Gaps are minor but real: there are create tools for units, godowns, and cost centres without corresponding list/get tools, and rename support is uneven across masters (create_ledger/create_group/create_voucher_type accept oldName but create_godown/create_unit/create_cost_centre/create_stock_group do not document it).
Maintenance
Related MCP Connectors
AI for Tally Prime and Tally ERP 9. Hosted MCP server to ask your accounts in any language.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server providing AI assistants with integration capabilities for QuickBooks Online.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects Tally Prime ERP data to AI assistants via MCP, enabling natural language queries for financial reports, stock summaries, and ledger balances.MIT
- AlicenseAqualityCmaintenanceAn MCP server that lets Claude read from and write to TallyPrime via its built-in XML/HTTP gateway.2326 npm3MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects Claude to TallyPrime, allowing natural language queries for reading ledgers, trial balances, and daybooks, and creating vouchers with a dry-run and confirmation safety model.MIT
- AlicenseNot gradedqualityBmaintenanceEnables LLMs like Claude and ChatGPT to access and interact with Tally Prime ERP data through MCP, including financial reports, ledgers, trial balance, balance sheet, profit and loss, and stock summary.AGPL 3.0