Skip to main content
Glama
TreeBeam MCP Server

TreeBeam MCP Server

pivot_trial_balance_by_account

Returns a trial balance pivoted by account, showing unadjusted balance, total adjustments, and adjusted balance per selected period for account-level financial analysis.

Instructions

PREFERRED for financial data retrieval. Returns a trial balance pivoted by account — one row per account with the unadjusted balance, total adjustments, and adjusted balance for each requested period. All data is returned in a single response with NO pagination. Use this tool whenever the user asks about account balances, trial balances, or financial position at the account level. 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"
  }
}

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.
accountIdsNoOptional. Filter to specific account 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

A3.6/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 two valuable traits: the result is unpaginated ('all data is returned in a single response with NO pagination') and the columns returned. It does not state that the operation is read-only, whether there is a row-count or performance ceiling given the no-pagination claim, or the default adjustment-type behavior (all types except 'passed') that materially changes results — that default only appears in the schema.

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?

Front-loads the identity and output shape, then when-to-use, then the prerequisite — a sensible ordering. The 'PREFERRED for financial data retrieval' claim and the use-case sentence partially repeat the purpose statement, so it could be tighter, but nothing is padding.

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 an 8-parameter read tool with no annotations and no output schema, the definition covers purpose, scope, return columns, no-pagination behavior, and the required periodId dependency. The main omissions are the default adjustment-type exclusion and any note that results aggregate all entities unless scoped.

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 one of the eight parameters is already documented in the input schema, including entityIds, accountIds, fsGroupCodes, and the 'passed' adjustment-type default. The description reinforces only periodIds and the search_periods lookup, which the schema already states, so it adds little independent meaning.

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?

Names a specific verb and resource and defines the exact output shape — 'one row per account with the unadjusted balance, total adjustments, and adjusted balance for each requested period.' That implicitly separates it from the by_account_group and by_fs_group siblings, but it never explicitly contrasts with them, and the opener 'PREFERRED for financial data retrieval' is a broad claim rather than a scoped distinction.

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 explicit when-to-use guidance ('whenever the user asks about account balances, trial balances, or financial position at the account level') plus a hard prerequisite (at least one periodId) and routes the agent to search_periods to obtain IDs. It lacks an explicit when-not/use-instead statement pointing to the account-group or fs-group pivot variants.

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