Skip to main content
Glama

Get mapped trial balance

get-mapped-trial-balance
Read-onlyIdempotent

A trial balance rolled up to reporting concepts: each rs-gaap concept's posted debits, credits and net over a window, summed from the accounts a chart-of-accounts mapping sends to it.

WHEN TO USE:

  • Checking a mapping: does each reporting concept carry what its accounts do?

  • Reading the books at the level the statements present, before or without generating a report

PARAMETERS:

  • mapping_id (required): the mapping structure (list-mapping-structures lists them, one per entity's chart)

  • start_date / end_date (optional, YYYY-MM-DD): the posting window, both inclusive

RETURNS: mapping_id and rows: each concept's reporting_element_id, qname, reporting_name, trait, balance_type, total_debits, total_credits and net_balance. Amounts are in dollars. An account the mapping does not reach is in no row: get-unmapped-elements lists those. An id that is not one of this graph's mappings answers not_found.

RELATED TOOLS:

  • get-trial-balance — the same window by account

  • live-financial-statement — the statements built from these concepts

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": {
      "mapping_id": "<mapping_id>"
    },
    "name": "get-mapped-trial-balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
end_dateNoYYYY-MM-DD.
mapping_idYesThe mapping structure whose associations roll accounts up.
start_dateNoYYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, so the safety profile is covered; the description then adds substantive behavior the annotations cannot: amounts are in dollars, accounts the mapping does not reach are silently absent from `rows`, and an id outside this graph's mappings returns `not_found`. The only thing left implicit is aggregation-level detail (e.g. whether contradicted/zero-balance concepts still appear), which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line summary, then labeled WHEN TO USE / PARAMETERS / RETURNS / RELATED TOOLS blocks, each sentence carrying distinct information. Nothing is repeated from the schema verbatim, and the `not_found` and unmapped-account caveats are placed where an agent will look for them.

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?

With no output schema, the RETURNS block carries the burden and does so fully — enumerating every row field and the unit of the amounts — while also covering the empty-row case and the error case. For a three-parameter read tool, an agent has everything needed to call it and interpret the response.

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 coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: it explains what `mapping_id` designates (the mapping structure that sends accounts to concepts) and points at `list-mapping-structures` to obtain one, and it clarifies that start/end are an inclusive posting window in YYYY-MM-DD. That is genuine disambiguation, not restatement.

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?

States a specific verb and resource — a trial balance rolled up to reporting concepts — and immediately distinguishes itself from the sibling `get-trial-balance`, which gives the same window by account. The aggregation path (posted debits/credits/net summed from accounts via a chart-of-accounts mapping) is concrete enough that an agent can tell what it gets without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated WHEN TO USE block gives two concrete conditions (validating a mapping; reading the books at statement level without generating a report), and the RELATED TOOLS block routes to the correct alternative — `get-trial-balance` for account-level, `live-financial-statement` for the finished statements, `get-unmapped-elements` for excluded accounts. Both the selecting condition and the alternatives are named rather than inferred.

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.