Skip to main content
Glama
TreeBeam MCP Server

TreeBeam MCP Server

pivot_trial_balance_by_fs_group

Returns a trial balance pivoted by financial statement group, summing amounts per asset, liability, equity, revenue, and expense type for each requested period.

Instructions

PREFERRED for high-level financial summaries. Returns a trial balance pivoted by financial statement group — one row per financial statement type (Asset, Liability, Equity, Revenue, Expense) with amounts summed across all account groups of that type, for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about high-level financial position, total assets vs liabilities, or financial statement summaries. You must provide at least one periodId — use search_periods first to find period IDs if needed.

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": {
      "collectionId": "<collectionId>",
      "periodIds": "<periodIds>"
    },
    "name": "pivot_trial_balance_by_fs_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityIdsNoOptional. Scope results to specific entities. If omitted, all entities in the project are included.
periodIdsYesOne or more period IDs to include in the pivot. Required. Use search_periods to find period IDs.
collectionIdYesThe project ID
fsGroupCodesNoOptional. Filter to specific financial statement groups: a (asset), l (liability), q (equity), r (revenue), x (expense).
interimPeriodIdNoOptional. Filter unadjusted balances and adjustments to a specific interim period.
adjustmentTypeIdsNoOptional. Explicit list of adjustment type IDs to include. If omitted, all types except "passed" are included. Use list_adjustment_types to find valid IDs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior: a single non-paginated response, entity scoping when entityIds is omitted, and a default adjustment policy ('all types except passed'). It says nothing about permission or authentication requirements, response size limits, or performance characteristics for large projects, which matter for an unpaginated endpoint.

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 lead position is well used — 'PREFERRED for high-level financial summaries' and the return grain come first, followed by behavioral notes and prerequisites. Four sentences carry no real filler, though the emphatic caps on 'NO pagination' and the slightly redundant restatement of the required periodId cost a bit of polish.

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 six-parameter read tool with full schema coverage and no output schema, the description covers the return shape, the no-pagination behavior, and a required prerequisite tool. Minor gaps remain around default behavior when fsGroupCodes is omitted and what the numeric fields represent, but nothing essential to correct invocation is missing.

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 100%, so every parameter is already documented in the schema, including the fsGroupCodes letter codes and the search_periods / list_adjustment_types lookup hints. The description only restates the periodIds requirement and adds nothing about interimPeriodId, entityIds, or how filters compose. Baseline 3 applies.

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 names a specific verb and resource and describes the exact aggregation grain: one row per financial statement type (Asset, Liability, Equity, Revenue, Expense) with amounts summed across account groups, per requested period. That grain statement implicitly separates it from the account-group and account-level pivot siblings, so an agent can pick the right one without opening a schema.

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 gives concrete use triggers ('high-level financial position, total assets vs liabilities, or financial statement summaries') and labels itself PREFERRED for that class of question, plus a prerequisite chain ('use search_periods first'). It stops short of an explicit when-not rule, such as routing drill-down questions to pivot_trial_balance_by_account_group, so the boundary is inferred rather than stated.

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