Skip to main content
Glama

Evaluate report session

evaluate_report_session
Read-only

Evaluate a template (source/templateid) or an insight view (view: payables, receivables, profit-and-loss, balance-sheet, cash-flow, salestax-summary, salestax-activity, … — see the view param for the full list) against a period from the report session's cached dataset — identical answers to /report/evaluate, tens of milliseconds instead of a full pipeline run. For interactive use: period slides, template/view switches, constant tweaks. Live books only; frozen periods evaluate via /report/evaluate with snapshotid.

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, templateid, or view.
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.
versionNo
constantsNo
dimensionNocash-flow: "category" (default — counterpart categories) or "baseaccount" (per bank/cash account).
periodEndNoInclusive period end (YYYY-MM-DD). Required.
templateidNo
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 adds meaningful behavior beyond that: it operates on the cached dataset, runs in tens of milliseconds, and is limited to live books. This discloses the mechanism and a key limitation without contradicting the read-only annotation.

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

Conciseness5/5

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

Two sentences carry a dense but well-organized amount of information. The core behavior and performance distinction are front-loaded, and the second sentence covers interactive use and the frozen-period alternative. There is no filler or redundancy.

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

Completeness3/5

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

For a 15-parameter tool with no output schema, the description covers purpose, speed, and usage boundaries well. However, it never explains how the report session is identified—there is no session parameter in the schema—and periodEnd is marked Required in its parameter description while the schema says required: []. These gaps could confuse an agent deciding how to invoke the tool 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 73% and most parameters already have meaningful descriptions, so the description does not need to re-explain them. It adds context that template/source and view are alternatives and that evaluation uses cached data, but it does not fill gaps for undocumented parameters like version, constants, templateid, and periodStart. Baseline 3 is appropriate.

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 states a specific action and resource: evaluating a template or insight view against a period from the report session's cached dataset. It also distinguishes itself from /report/evaluate by noting identical answers but much faster execution. An agent can clearly understand what this tool does and how it differs from its sibling evaluate_report.

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 says this is for interactive use cases such as period slides, template/view switches, and constant tweaks. It also gives a clear exclusion: frozen periods should use /report/evaluate with snapshotid. This names the alternative and the condition for choosing it, leaving little to inference.

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