Skip to main content
Glama

get_financial_statements

Computed balance sheet + P&L for a fiscal year, from the journal (CompanyMember).

Aggregates every posted GL journal line whose posting date falls in the fiscal year's window, classifies each account against the chart of accounts, and reports problems (unbalanced trial balance, unclassified accounts, year-not-opened, mixed currency). Read-only and distinct from the uploaded balance-sheet snapshots (GET .../balance-sheets): nothing here reads a snapshot. fiscal_year optional → the latest FY with journal data. month (YYYY-MM, inside the FY — 422 otherwise) narrows the statement to one month: the balance sheet stays cumulative (as of month end, YTD equity fold) while the P&L + cash flow cover that month's flows. Explicit non-member company_id → 403.

The cut — a line is included because its posting_date falls inside the fiscal year's own window, read off the gl_fiscal_year row; the response's fiscal_year_cut says so (method="posting_date_window", dates = that window; the aggregated window is period_start..period_end, narrower when month-scoped, ZET-166). The /gl/reports/* family cuts by the line's stamped fiscal_year_id FK instead. Both read the same window, so they agree on where the year starts and ends; they can still differ on a line dated outside the year it is stamped to.

Input Schema

NameRequiredDescriptionDefault
monthNo
company_idYes
fiscal_yearNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does substantial work: read-only, 422 on out-of-FY month, 403 on non-member company_id, problem reporting (unbalanced trial balance, unclassified accounts, year-not-opened, mixed currency), balance sheet cumulative vs P&L cash-flow monthly, and the exact inclusion rule ('posting_date' inside the gl_fiscal_year window, surfaced via fiscal_year_cut). It stops short of describing pagination or response size, but behavioral disclosure is far above the norm for an un-annotated tool.

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 content is valuable but the layout is heavy: bolded mid-sentence fragments, a paragraph on 'The cut' and a cross-reference to ZET-166 read like internal release notes rather than agent-facing guidance. The critical routing and parameter facts are front-loaded, but the section is longer than its task requires.

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?

For a computed multi-statement report with no output schema, the description covers selection rules, defaults, error conditions (403/422), scoping semantics, and the aggregation cut rule. Nothing an agent needs to call it correctly or interpret the result boundaries is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: fiscal_year optional-by-default semantics, month's YYYY-MM format and inside-the-FY constraint with the 422 consequence, and the balance-sheet-cumulative vs P&L-monthly behavior month triggers. This is meaning the schema cannot express.

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?

Opens with a specific verb+resource+scope ('Computed balance sheet + P&L for a fiscal year, from the journal') and explicitly distinguishes itself from snapshots and from the /gl/reports/* family that cuts by a stamped fiscal_year_id. An agent can separate it from gl_balance_sheet, gl_profit_and_loss, and gl_trial_balance without opening schemas.

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?

Gives clear context: fiscal_year optional defaults to latest FY with journal data, month narrows to one month with a 422 otherwise, non-member company_id returns 403, and it explicitly says it is distinct from the balance-sheet snapshot endpoint. It lacks a direct 'use this instead of X when Y' routing sentence against the computed siblings (gl_balance_sheet, gl_profit_and_loss), but the snapshot/report contrast covers the main ambiguity.

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