Skip to main content
Glama

analyze_trial_balance

Read-only

Take a Trial Balance CSV export from QuickBooks Online, Xero, Zoho Books, or Wave (source auto-detected from headers — YTD columns indicate Xero, Opening Balance indicates Zoho, etc.) and run three checks: (1) tb.unbalanced — debits ≠ credits (every downstream P&L / BS / cash-flow report built from this TB is wrong until fixed); (2) tb.wrong_sign — accounts whose name suggests a class (Revenue / COGS / Expense / AR / AP) carrying a balance on the wrong side (classic posting-error signal); (3) tb.round_balance — exact-multiple-of-$10,000 balances (plug-entry signal). Input is raw CSV text of a Trial Balance report. Max 5,000 rows; max 5 MB. Returns flagged accounts with severity, a roll-up showing whether the TB balances, parse diagnostics, and a shareable URL at agents.hellobooks.ai/r/{slug}. Use this when a user pastes a Trial Balance and asks "does my TB balance?", "are there sign errors?", "what looks suspicious?", or "is this TB clean?". The Trial Balance is the foundation document for every other financial statement — if it does not balance, every downstream report is invalid.

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": {
      "csvText": "<csvText>"
    },
    "name": "analyze_trial_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
csvTextYesRaw CSV text of a Trial Balance report. Works with QuickBooks Online (Reports → Trial Balance), Xero (Reports → Trial Balance), Zoho Books (Reports → Accountant → Trial Balance), and Wave (Reports → Trial Balance). Source is auto-detected from column headers.
fileNameNoOptional filename for the share-page label.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, and the description stays consistent while adding real operational context: 5,000-row and 5 MB caps, what each check means, and what gets returned (flagged accounts with severity, roll-up, parse diagnostics). The one ambiguity is the shareable URL at agents.hellobooks.ai/r/{slug} — whether that page persists data or is ephemeral is not stated, which matters for a read-only tool handling financials.

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 action, sources, checks, limits, and return shape are front-loaded in a dense but scannable sequence. The closing sentence about the Trial Balance being the foundation document is largely redundant with the earlier parenthetical about downstream reports being wrong, costing a bit of tightness.

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 description fully compensates by describing the return payload (flagged accounts, severity, roll-up balance verdict, parse diagnostics, share URL). Size limits, input format, and failure interpretation are all covered, leaving nothing an agent needs missing before calling it.

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 genuine value beyond the schema by explaining how source detection actually works (YTD columns indicate Xero, Opening Balance indicates Zoho). It also restates the size ceiling and raw-CSV input expectation, reinforcing what the schema already encodes.

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+resource — run three named checks (tb.unbalanced, tb.wrong_sign, tb.round_balance) over a Trial Balance CSV — and enumerates the supported sources. The check IDs and failure semantics make it unmistakable against siblings like analyze_balance_sheet or analyze_profit_loss.

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 concrete triggering conditions (user pastes a TB and asks "does my TB balance?", "are there sign errors?") which is strong when-to-use guidance. It stops short of naming an alternative tool or an explicit when-not-to-use (e.g., that balance-sheet/P&L files belong to sibling tools), so it is clear context without routing.

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