Skip to main content
Glama

Evaluate report

evaluate_report
Read-only

Resolve a report template OR an insight view against a period. Templates: every field measured off the ledger or derived by its formula, each with a drilldown — name a statutory template by source (e.g. locale:za/vat201) or a stored template by templateid. Views (view: payables, receivables, profit-and-loss, balance-sheet, cash-flow, trial-balance, salestax-summary, salestax-activity, … — see the view param for the full list; e.g. payables returns every outstanding bill with supplier, amount, due date and currency, receivables the same for invoices): the data-driven insight feeds stub-web's screens render. With snapshotid the period evaluates FROZEN from the snapshot's filed listing — the filed numbers, immutable; without, LIVE from the current books.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asAtNoFor as-at views (account-totals-as-at, balance-sheet, clearing-residual): the position date (YYYY-MM-DD), inclusive. Synonym for periodEnd.
modeNotrial-balance: "cumulative" (default — closing balances as at periodEnd, opening/retained included, ties to the balance sheet) or "period"/"range" (period-movement only within [periodStart..periodEnd], for error-checking a window).
viewNoAn insight view instead of a template: account-totals, account-totals-as-at, trial-balance, profit-and-loss, balance-sheet, cash-flow, receivables, payables, customer-totals, supplier-totals, product-totals, salestax-summary, salestax-activity, income-tax-summary, inventory, clearing-residual. Provide this OR a template, not both.
basisNoincome-tax-summary: "profit" (default) or "turnover".
sourceNoA statutory template source, e.g. "locale:za/vat201". Provide this or templateid.
compareNoprofit-and-loss: true = two columns, the equal-length prior period and the current one.
filtersNoRow filters: [{"property": "tags"|"customer"|"supplier"|"product"|"account", "value": ...}]; tags value "none" means untagged.
journalNoaccount-totals and entity totals: restrict to one journal (1 income, 2 expenses, 3 assets, 4 liabilities, 5 equity).
monthlyNoViews with columns (profit-and-loss, cash-flow): true = one column per calendar month in the period.
versionNoTemplate version. Omit for the version in effect at the period end.
constantsNoConstants a template's formulas name ($salesTaxRate → {"salesTaxRate": 0.15}). Undeclared here, coercion would strip them and the formula would silently evaluate with 0.
dimensionNocash-flow: "category" (default — counterpart categories) or "baseaccount" (per bank/cash account).
periodEndNo
snapshotidNoEvaluate FROZEN against this snapshot's filed listing (the period must sit inside its window) instead of the live books.
templateidNoA stored user template id. Provide this or source.
periodStartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / asAt / description
      Previous value: -"For as-at views (account-totals-as-at, balance-sheet): the position date (YYYY-MM-DD), inclusive. Synonym for periodEnd."New value: +"For as-at views (account-totals-as-at, balance-sheet, clearing-residual): the position date (YYYY-MM-DD), inclusive. Synonym for periodEnd."
    • changedInput schema / properties / view / description
      Previous value: -"An insight view instead of a template: account-totals, account-totals-as-at, trial-balance, profit-and-loss, balance-sheet, cash-flow, receivables, payables, customer-totals, supplier-totals, product-totals, salestax-summary, salestax-activity, income-tax-summary, inventory. Provide this OR a template, not both."New value: +"An insight view instead of a template: account-totals, account-totals-as-at, trial-balance, profit-and-loss, balance-sheet, cash-flow, receivables, payables, customer-totals, supplier-totals, product-totals, salestax-summary, salestax-activity, income-tax-summary, inventory, clearing-residual. Provide this OR a template, not both."
  2. Changed1 schema field changed
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "trial-balance: \"cumulative\" (default — closing balances as at periodEnd, opening/retained included, ties to the balance sheet) or \"period\"/\"range\" (period-movement only within [periodStart..periodEnd], for error-checking a window).",
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description does not contradict that. It adds valuable behavioral context: snapshot evaluation is immutable, live evaluation reads current books, and constants coercion behavior is disclosed ('Undeclared here, coercion would strip them and the formula would silently evaluate with 0'). This goes beyond what annotations provide, though it doesn't enumerate every possible side-effect (none expected for a read).

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 dense but well-organized: it leads with the primary purpose, then breaks down templates vs. views, then addresses snapshot vs. live. Every sentence contributes useful information, and the examples are concise. It is long, but the complexity (16 parameters, two modes) justifies the length. There is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (16 parameters, no required fields, no output schema), the description covers most essential aspects: it explains both evaluation modes, the snapshot behavior, and gives concrete examples of what several views return. It also hints at the output's downstream use ('feeds stub-web's screens render'). However, it does not specify the exact response structure or error conditions, which would be needed for a fully self-contained definition.

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 88%, so most parameters are documented in the schema. The description adds semantic value beyond the schema: it explains the meaning of `view` values with concrete output examples (payables returns every outstanding bill...), clarifies the `source` format, and details the `snapshotid` behavior. It also provides context for `constants` and `mode` that enriches the bare schema definitions.

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 opens with a clear, specific statement of what the tool does: 'Resolve a report template OR an insight view against a period.' It explicitly distinguishes two modes (template vs. view) and further differentiates frozen vs. live evaluation, with concrete examples for both. This is far more specific than the tool name and leaves no ambiguity about the tool's core function.

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?

The description gives strong usage context: it explains when to use a template (statutory or stored) vs. a view, and the frozen vs. live distinction with snapshotid. It also notes the mutual exclusivity of `view` and `template`/`source` ('Provide this OR a template, not both'). However, it does not explicitly contrast with sibling tools like evaluate_report_batch or evaluate_report_session, so the guidance stops short of naming alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources