Skip to main content
Glama
lokesh-sparrow

PNPC-MCP-Tally-Prime

sync_vouchers_to_sql

Read-only

Pull voucher headers for a date range into the session's in-memory SQL cache, enabling aggregate reporting without repeatedly fetching from Tally.

Instructions

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. If you switch companies (set_company), sync again — the cache doesn't track which company a row came from, so don't query across a company switch without re-syncing first. 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).

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. Dates show when Glama detected each change.

  1. Addedv1.11.2

TDQS

A4.6/5.0
Behavior5/5

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

The description clearly explains the read-only nature (pulling data), the in-memory session cache behavior, and the implications of session scope and company changes. It adds context beyond the readOnlyHint annotation, such as cache lifecycle and timeout handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively verbose and repetitive, with multiple warnings and instructions (e.g., 'call this once per chunk', 'pick a chunk size that won't time out', repeated mentions of session/company scope). It could be significantly condensed while retaining essential information.

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?

Despite verbosity, the description is very complete: it explains the tool's purpose, usage patterns, alternatives, constraints, and interaction with session state. It covers all key aspects needed for correct usage, including edge cases like company switches and timeout management.

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?

The input schema already covers 100% of parameters (from and to) with format descriptions. The description adds context about chunking and timeouts based on date range, which is useful for effective parameter selection.

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?

The description explicitly states it pulls voucher headers for a date range into a SQL cache for querying, distinguishing it from sibling tools like get_vouchers and sync_voucher_items_to_sql. The verb 'pull' and resource 'voucher headers' are clear and specific.

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?

The description provides explicit usage guidance: when to use it for aggregation/reporting, how to chunk data to avoid timeouts, when to re-sync after a company change, and how it differs from alternatives like get_ledger_vouchers and sync_voucher_items_to_sql. It also states the safe re-run behavior.

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