Skip to main content
Glama
lokesh-sparrow

PNPC-MCP-Tally-Prime

sync_voucher_ledger_entries_to_sql

Read-only

Sync voucher-level ledger lines for a date range into SQL cache to break down ledger balances by voucher, ledger, amount, cost centre, and bill allocation.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd date in DD-MM-YYYY format
fromYesStart date in DD-MM-YYYY format

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.6/5.0
Behavior5/5

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

With readOnlyHint/openWorldHint already declaring the safety profile, the description adds rich context the annotations cannot: signed amount semantics, the joined/ null description field, the chunked additive-by-date-range model, timeout caution, and the cache-clearing behavior on company change. Clearing a session cache is not a contradiction of readOnlyHint since no external data is mutated.

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?

The core purpose is front-loaded and most sentences carry real information, but the description is a dense run-on with heavy parenthetical stacking that could be tightened. It is information-rich rather than wasteful, hence a 4.

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?

No output schema exists, yet the description explains the row grain and returned columns (ledger, amount, cost centre, bill allocation, description). Combined with usage examples, sync model, and behavioral caveats, an agent has everything needed to call and interpret it correctly.

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 coverage is 100% and both parameters (from/to with DD-MM-YYYY format) are fully documented in the schema. The description only refers to 'one date range' without adding syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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 ('Pull voucher LEDGER LINES ... into this session's SQL cache') and immediately differentiates from siblings by explaining what get_vouchers/sync_vouchers_to_sql cannot provide. An agent can distinguish this tool without opening any 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 when-to-use trigger ('whenever a ledger's balance needs to be broken down by the vouchers that make it up') plus two concrete examples (VAT ledger split, party ledger reconciliation). It also names the alternatives it supersedes and the condition that selects it.

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