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

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
payrunidNoA per-pay-run return's pay run id (e.g. locale:gb/fps): only the entries that run posts are read. Refused for a template not filed per pay run.
constantsNo
dimensionNocash-flow: "category" (default — counterpart categories) or "baseaccount" (per bank/cash account).
periodEndNoInclusive period end (YYYY-MM-DD). Required.
comparisonNoprofit-and-loss: "lastYear" = two columns, the same period a year earlier and the selected one (no Total column); "yearly" = one column per financial year, clamped to the period, at most 12. Takes precedence over monthly and compare; absent = those flags decide. cash-flow: "yearly" only, because each column's opening balance chains from the column before it.
employeeidNoA per-employee certificate's employee id (e.g. locale:za/irp5): only the entries their payslips post are read. Required for such a template, refused for any other.
templateidNo
periodStartNo
presentationNotrial-balance: "net" (default; one figure per account, Dr or Cr by sign; P&L netting to zero hidden; :profitLoss memo) or "gross" (summed Dr and Cr movements). Unknown values are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / comparison
      Added value: +{
      +  "description": "profit-and-loss: \"lastYear\" = two columns, the same period a year earlier and the selected one (no Total column); \"yearly\" = one column per financial year, clamped to the period, at most 12. Takes precedence over monthly and compare; absent = those flags decide. cash-flow: \"yearly\" only, because each column's opening balance chains from the column before it.",
      +  "enum": [
      +    "lastYear",
      +    "yearly"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / presentation
      Added value: +{
      +  "description": "trial-balance: \"net\" (default; one figure per account, Dr or Cr by sign; P&L netting to zero hidden; :profitLoss memo) or \"gross\" (summed Dr and Cr movements). Unknown values are refused.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / payrunid
      Added value: +{
      +  "description": "A per-pay-run return's pay run id (e.g. locale:gb/fps): only the entries that run posts are read. Refused for a template not filed per pay run.",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / employeeid
      Added value: +{
      +  "description": "A per-employee certificate's employee id (e.g. locale:za/irp5): only the entries their payslips post are read. Required for such a template, refused for any other.",
      +  "type": "string"
      +}
  5. 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."
  6. 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"
      +}
  7. First observed

TDQS

A4.2/5.0
Behavior4/5

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

readOnlyHint already marks it non-mutating, but the description adds substantive behavior: cached dataset, tens-of-milliseconds latency, identical answers to /report/evaluate, and live-only scope. It does not explain session invalidation or error behavior, so it is not complete.

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?

The description is compact and front-loaded: it opens with the primary evaluate action, then the latency/cache benefit, then the interactive and live-only constraints. Every sentence adds decision-relevant information.

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?

For a 19-parameter session-cached tool, the description covers the key operating constraints (live-only, frozen-period fallback, interactive use) and names the equivalent /report/evaluate behavior. It omits the session-creation prerequisite and any return-shape detail, but the core invocation context is present.

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 79%, so the schema is already the primary source for most of the 19 parameters. The description only adds that view is the full list and that source/templateid are alternatives, leaving constants, version, and other params to the schema.

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 gives a specific verb and resource ('Evaluate a template ... or an insight view') and names both accepted selectors, source/templateid and view. It also distinguishes the tool from the full /report/evaluate pipeline by its cached-session, low-latency behavior.

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 states the interactive scenarios (period slides, template/view switches, constant tweaks) and an explicit exclusion: live books only, with frozen periods routed to /report/evaluate with snapshotid. It stops short of naming open_report_session as a prerequisite or addressing evaluate_report_batch, so the routing is not fully exhaustive.

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