Skip to main content
Glama
TreeBeam MCP Server

TreeBeam MCP Server

pivot_trial_balance_by_account_group

Retrieves trial balance totals grouped by account group for specified periods, summing account amounts into one row per group in a single unpaginated response.

Instructions

PREFERRED for financial data retrieval. Returns a trial balance pivoted by account group — one row per account group with amounts summed across all accounts in that group, for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about balances or totals grouped by account group (e.g. "Cash and Cash Equivalents", "Accounts Payable"). 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_account_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).
accountGroupIdsNoOptional. Filter to specific account group IDs.
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

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discloses meaningful behavior: full result set in one response with NO pagination, and the default adjustment scope (all adjustment types except 'passed' when adjustmentTypeIds is omitted). It omits that this is a read-only operation and gives no warning about large unpaginated payloads.

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?

Three sentences, all functional, with the pivot semantics and no-pagination fact front-loaded before the period prerequisite. The opening 'PREFERRED for financial data retrieval' is a claim about tool selection rather than tool behavior and is the weakest sentence in the block.

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?

There is no output schema, and the description compensates by describing the result shape (one row per account group, amounts aggregated, one set of values per requested period) and the delivery mode (single response, no pagination). Combined with the schema's full parameter coverage, an agent has enough to select and invoke this 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 description coverage is 100%, so every parameter already carries its own explanation, including the entityIds all-entities default and the passed-adjustment exclusion. The description reinforces the periodIds requirement and the search_periods lookup but adds no new constraints or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: returns a trial balance pivoted by account group, one row per account group with amounts summed across accounts in that group, per requested period. The grouping key ('Cash and Cash Equivalents', 'Accounts Payable') effectively distinguishes it from the by-account and by-fs-group pivot siblings, though those siblings are never named. The leading 'PREFERRED for financial data retrieval' is overbroad for a single pivot variant and slightly muddies an otherwise precise statement.

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 a clear triggering condition ('use this tool whenever the user asks about balances or totals grouped by account group') and an explicit prerequisite workflow (must supply at least one periodId; call search_periods first if unknown). It stops short of stating when not to use it or naming the by-fs-group/by-account pivots as the alternatives for other groupings.

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