Skip to main content
Glama
lokesh-sparrow

PNPC-MCP-Tally-Prime

sync_voucher_items_to_sql

Read-only

Pull voucher inventory line items into SQL cache for a date range, enabling direct SQL computation of stock movement, godown-wise balances, and batch details.

Instructions

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. 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.

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?

Beyond the readOnlyHint annotation (which aligns), the description discloses critical behavioral details: qty/amount are unsigned, requiring is_deemed_positive and voucher_type for direction; non-stock vouchers yield zero rows; chunked/additive model with timeout caution; and cache does not track company origin. These are non-obvious traits an agent must know, adding substantial value over annotations.

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 description is long but front-loaded: it opens with the core action and fields, then progressively adds usage, data semantics, edge cases, and caveats. Every sentence adds value; the length is justified by the tool's complexity. It could be slightly tightened, but the structure is logical and no filler exists.

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?

Given there is no output schema, the description compensates by specifying the row structure (one row per item per batch allocation, fields: stock item, qty, rate, amount, godown, batch), the is_deemed_positive/voucher_type nuance, zero-row behavior, and company-switch caveat. It also ties into the broader sync/query workflow. Nothing an agent needs to call it correctly is missing.

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% with both from and to documented as 'Start/End date in DD-MM-YYYY format'. The description merely refers to 'date range' without adding format or semantic details beyond the schema. It does not elaborate on edge cases like inclusive/exclusive boundaries. Per the baseline for high coverage, a 3 is appropriate; no extra meaning is added.

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 clearly states the tool pulls voucher inventory line items (with specific fields listed) into the SQL cache for a date range. It distinguishes itself from sync_vouchers_to_sql and query_sql by explaining it is the raw data source for movement/godown/batch analysis, which are not available as report tools. The verb 'pull' and resource are explicit.

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 explicitly states when to use this tool: 'so query_sql can compute movement analysis, godown-wise stock, or batch detail directly.' It also explains what not to use it for (replicating unavailable reports) and gives concrete advice on chunking ('quarterly/monthly chunks for a busy company') and company switching ('sync again'). It even references the sibling sync_vouchers_to_sql for the same model.

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