Skip to main content
Glama
ComplyEaze Bridge: TallyPrime MCP server for Claude Desktop

ComplyEaze Bridge: TallyPrime MCP server for Claude Desktop

Official

stock_summary

Read-only

Retrieve closing stock value per item as of a month-end date, with values tied out to Tally's own Stock Summary and inventory integration flagged.

Instructions

Return the stock summary: the closing stock value per stock item as of a date, with the total of those values checked against Tally's own Stock Summary, and whether inventory is integrated with the accounts. The top-level state is one of three. value_total_matched: the items are returned, and their closing values add up to the sum of the top-level lines of Tally's own Stock Summary; only that total was compared, so value_total_matched can stand beside partial true when some items have no closing value. no_stock_items: Tally's own stock item count is 0, the item list is empty and the Stock Summary is empty; items is an empty list. not_established: no item is returned (items is null), reason says why and remediation says what to do next: tally_stock_summary_differs (the report has a total the items do not add up to), tally_stock_summary_shows_no_value (the items carry a value and the report has no amount; an empty report is not told apart from one Tally did not render) or stock_values_not_comparable (nothing could be compared). Such a result carries unchecked_comparison in place of tie_out, for investigation only: neither side is a stock value or a total, the items' side adds only the closing values present, and the closing-value total of a matched read is the only thing this tool checks. A not_established result is not held for paging, and it replaces any earlier read of the same date. A closing quantity of an item under the root is returned only where Tally's own plain Stock Summary shows the same item by name with the same quantity, unit and amount (closing.quantity.state agreed, with amount and unit). That report has no line for an item inside a stock group, so its quantity is its own row's in the item list, not compared (inside_stock_group, with item_list_amount and item_list_unit; equal to Tally's expanded screen on the one book measured). Other items say why not (none_sent, unread, parent_not_resolved for a parent reading Primary without Tally's root marker or carrying a marker anywhere else, report_has_no_line, report_name_not_unique, report_differs); totals.closing_quantity_unread_count counts quantities that could not be read (a compound unit, or a unit with a space), which do not refuse the read. checks says per field what is checked, checked_where_agreed or not_checked: the closing-value total is checked; the closing quantity only where agreed; each value on its own, the names, parents and base units, and whether the date was honoured are not. as_of (YYYYMMDD or YYYY-MM-DD) must be a month's last day, not before the book's start or after today; any other date is refused as stock_summary_as_of_not_measured before any request. Month ends inside the year were measured on TallyPrime 7.2; a voucher dated on the end date was counted on a 15 October read, not at a month end; the company's own year start is not read. The period runs from 1 April (or the book's start, if later) to as_of. Each item carries name, guid, parent, base_unit and closing; closing holds value exactly as Tally sends it, and quantity (a state, with amount and unit when agreed, item_list_amount and item_list_unit when inside_stock_group). Empty is not zero: an empty closing value is returned as null and counted in totals.empty_closing_value_count, and a value sent as 0.00 is a value. Signs are kept, as in the trial balance: a negative value is a debit, which is stock held, and Tally's own Stock Summary screen shows it as a positive value (measured on one synthetic company, licensed TallyPrime 7.1 Silver). value_sum adds the values with their signs, so stock held gives a negative sum, and totals.value_sum_signs is always as_sent_negative_is_debit; value_sum is written at the scale of the values it adds, and is null with partial true whenever any item's closing value is empty. The opening quantity and value are read but not returned, because their as-at date is unmeasured. inventory reports integrated, inventory_on and batchwise as yes, no or unknown (unknown does not refuse), and basis states what Tally reported (ISINTEGRATED); how the books use these values (as closing stock, or against a Stock-in-Hand ledger) is not measured. An item valued at zero or with no value adds nothing to either total, so only Tally's own stock item count vouches for it; that count followed the one delete measured (one synthetic company, one sample), which is not proof of a complete list (checks.item_list_complete is not_checked). item_count_cross_check reports rows, tally_count and status: items are returned only when the two are equal. Otherwise the read is refused as stock_summary_item_count_differs (both numbers under counts); a count Tally did not give refuses as stock_summary_read_failed with cause stock_item_count_unavailable, and a Stock Summary this Tally does not recognise with cause stock_report_unknown. items (1 to 50 GUIDs, each once) filters what is returned from the held read; a GUID not found is listed under items_not_found, not refused, and totals, tie_out and item_count_cross_check still cover the whole book. The inventory flags, the stock items and the Stock Summary are each read twice inside one company, mode and book-extent bracket, or the read is refused. A book whose inventory is off is refused as stock_not_enabled, Education mode is refused, and a company split by year, whose sibling companies share the GUID, is refused (stock_summary_read_failed, cause company_flags_not_one_row). Small books only: the items are read whole only when the master-alteration mark (it counts masters of every kind) times an assumed worst-case row fits 16,000,000 bytes, a mark of at most 874; a larger book is refused before any item request as stock_summary_too_large, with size, and retrying refuses again. Typical stock-heavy client books refuse today. A row count or response size past what was admitted refuses as stock_summary_bound_premise_violated, or stock_summary_extent_changed if the book moved. Limits: company totals only, with no godown or batch split and no rates. The row shape and the tie were measured on one synthetic book on one licensed TallyPrime 7.1 (the tie also once on a client book); other releases and books are not measured. An item's name and parent are masked under mask_parties, because stock names can carry a customer's or supplier's name (Tally's reserved root as a parent is shown as  Primary and is not masked); guid is not masked and is what items filters on. A first page (offset 0) always reads afresh and holds the read; a later page for the same date is served from it while the book extent, including ALTVCHID and ALTMSTID, is unchanged, and each result reports snapshot. Pass the first page's snapshot_id on later pages to have the call refused as listing_snapshot_changed instead of continuing from a different read (cause book_changed_since_first_page, or snapshot_not_held for an id not held). A change that moves neither mark is not seen, so a later page can be up to 10 minutes old after such a change. Each call appends metadata-only receipt lines (tool, company, counts, request and response fingerprints; no book content) to ComplyEaze Bridge's local log on this computer; it writes nothing to Tally.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "company_guid": "<company_guid>",
      "as_of": "<as_of>"
    },
    "name": "stock_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofYesThe last day of the stock period, a month's last day (YYYYMMDD or YYYY-MM-DD). The period runs from 1 April, or the book's start if later.
itemsNoOptional: 1 to 50 stock item GUIDs, each once, to return only those items. A GUID not found is listed under items_not_found; the totals still cover the whole book.
limitNoThe most rows to return on this page. The default and the maximum are this server's row limit (500 unless it is configured otherwise).
offsetNoHow many rows to skip before this page: 0, the default, is the first page.
snapshot_idNoOptional, on a later page only: the first page's snapshot_id, so the call is refused (listing_snapshot_changed) rather than continuing from a different read.
company_guidYesThe company's company_guid, as list_companies returns it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.5
    • changedInput schema / properties / as_of / description
      Previous value: -"The last day of the stock period, a 31 March (YYYYMMDD or YYYY-MM-DD). The period runs from 1 April, or the book's start if later."New value: +"The last day of the stock period, a month's last day (YYYYMMDD or YYYY-MM-DD). The period runs from 1 April, or the book's start if later."
  2. Changed7 schema fields changedv0.4.3
    • addedInput schema / properties / as_of / description
      Added value: +"The last day of the stock period, a 31 March (YYYYMMDD or YYYY-MM-DD). The period runs from 1 April, or the book's start if later."
    • addedInput schema / properties / company_guid / description
      Added value: +"The company's company_guid, as list_companies returns it."
    • addedInput schema / properties / items / description
      Added value: +"Optional: 1 to 50 stock item GUIDs, each once, to return only those items. A GUID not found is listed under items_not_found; the totals still cover the whole book."
    • removedInput schema / properties / limit / default
      Removed value: -500
    • addedInput schema / properties / limit / description
      Added value: +"The most rows to return on this page. The default and the maximum are this server's row limit (500 unless it is configured otherwise)."
    • addedInput schema / properties / offset / description
      Added value: +"How many rows to skip before this page: 0, the default, is the first page."
    • addedInput schema / properties / snapshot_id / description
      Added value: +"Optional, on a later page only: the first page's snapshot_id, so the call is refused (listing_snapshot_changed) rather than continuing from a different read."
  3. First observedv0.4.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnly=true and destructive=false, but the description adds far more: all refusal codes and their causes, masking behavior under mask_parties, snapshot/paging staleness (up to 10 minutes), the local ComplyEaze log side effect, and the 16,000,000-byte admission bound. Nothing material about behavior is left to inference.

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

Conciseness3/5

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

The purpose is front-loaded in the first sentence, but the rest is a single enormous paragraph mixing result states, refusals, measurement caveats, paging, logging, and masking. Almost every sentence carries real information, yet the lack of headings or paragraph breaks makes it hard to scan and pushes well past the minimum needed.

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?

There is no output schema, but the description thoroughly specifies return fields (`name`, `guid`, `parent`, `base_unit`, `closing`, `totals`, `checks`, `inventory`, `item_count_cross_check`, `snapshot`), every state and refusal, and measurement limits. An agent has everything needed to interpret results and anticipate failure modes.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning beyond the schema, such as items filtering only the returned rows while totals/tie_out cover the whole book, and snapshot_id causing `listing_snapshot_changed` on mismatch. It largely repeats as_of and paging constraints that the schema already documents, so not a 5.

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 first sentence states a specific verb and resource: return the stock summary of closing stock value per item as of a date, plus tie-out against Tally's own Stock Summary and inventory integration. It uses precise result-state vocabulary (`value_total_matched`, `no_stock_items`, `not_established`) that separates it from siblings such as negative_stock or trial_balance.

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?

It gives extensive when-to-use context through constraints: month-end dates only, small books only, inventory must be on, Education mode refused, and a clear note that 'typical stock-heavy client books refuse today.' It never names a sibling tool as an alternative (e.g., for larger books or godown/batch splits), which keeps it from a 5.

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