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: posting_date inside the fiscal year's own window (fiscal_year_cut; period_start..period_end is what was aggregated, ZET-166). /gl/reports/* cuts by the line's stamped fiscal_year_id, so the two can differ on a line dated outside the year it is stamped to.

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_id": "<company_id>"
    },
    "name": "get_financial_statements"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthNo
company_idYes
with_priorNo
fiscal_yearNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / with_prior
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it declares the tool read-only, explains the aggregation basis, lists problem reporting behavior, gives default fiscal-year behavior, and discloses 422 and 403 conditions. It also documents the important posting-date versus stamped-fiscal-year cut distinction.

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 front-loaded with the core purpose and then adds fiscal-year, month, error, and cut semantics in a logical order. It is dense and uses bold labels, but most sentences carry useful accounting-specific meaning; the only minor cost is length for a four-parameter tool.

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 complex accounting aggregation tool with no annotations and no output schema, the description covers the computation basis, defaulting, month behavior, error cases, and cut semantics well. It leaves `with_prior` unexplained and does not describe the return structure, but the core invocation context is largely complete.

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 description coverage is 0%, so the description must explain parameters, and it covers `fiscal_year` defaulting to the latest FY with journal data, `month` format and cross-year 422 behavior, and non-member `company_id` 403 behavior. The `with_prior` parameter is never mentioned, leaving one of four parameters undocumented.

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: computed balance sheet plus P&L for a fiscal year from the journal. It also explicitly distinguishes this from uploaded balance-sheet snapshots and explains how its cut differs from `/gl/reports/*`, so an agent can separate it from related reporting siblings.

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 clear usage context: use it for computed statements from posted GL journal lines, optionally narrowed by fiscal year and month, and it explicitly says nothing here reads a snapshot. The alternative `/gl/reports/*` behavior is contrasted, though it does not directly name sibling tools like `gl_balance_sheet` or `gl_profit_and_loss` as 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