Skip to main content
Glama

HelloBooks AI Agents MCP Server

analyze_profit_loss

Take a Profit & Loss / Income Statement CSV export from QuickBooks Online, Xero, Zoho Books, or Wave (source auto-detected from section names) and run three checks: (1) pnl.subtotal_mismatch — each "Total Section" subtotal equals the sum of its preceding line items (catches missing or duplicated rows); (2) pnl.negative_expense — flags expense-section line items with negative amounts (usually sign-flips or refunds posted to the wrong side); (3) pnl.margin_red_flag — gross-profit margin < 5% or > 95%, or negative total revenue. Input is raw CSV text of a P&L report (Reports → Profit and Loss in QBO / Xero / Zoho / Wave). Max 5,000 rows; max 5 MB. Returns flags with severity, a summary with totalRevenue / totalCogs / grossProfit / grossMarginPct / netIncome (when detected), and a shareable URL at agents.hellobooks.ai/r/{slug}. Use this when a user pastes a P&L and asks "does my P&L look right?", "any sign errors?", "what is my gross margin?", or "anything suspicious in my income statement?". For period-over-period comparison use analyze_journal_variance with two periods of journal-entry data; this tool is single-period only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csvTextYesRaw CSV text of a Profit & Loss / Income Statement report. Works with QuickBooks Online (Reports → Profit and Loss), Xero (Reports → Profit and Loss), Zoho Books (Reports → Profit & Loss), and Wave (Reports → Profit & Loss). Source is auto-detected from section names. Statement should include section headers, line items, "Total X" subtotals, and a Net Income / Net Profit row at the bottom.
fileNameNoOptional filename for the share-page label.

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description fully discloses behavior: three checks (subtotal mismatch, negative expense, margin red flag), input constraints (5,000 rows, 5 MB), auto-detection of source, and output details (flags, summary with financial metrics, shareable URL). This is comprehensive for a complex tool.

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 description is a single paragraph but well-organized: starts with the core action and checks, then input/output details, then usage guidance. It is efficient, though slightly long; every sentence contributes value.

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?

Given the tool's complexity (multiple checks, multiple accounting sources, no output schema), the description covers all essential context: input format, limits, checks, output structure, and use cases. No gaps.

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%, but the description adds meaning beyond the schema: it explains the expected CSV structure (section headers, 'Total X' subtotals, Net Income row) and that fileName is optional and for labeling. This helps the agent understand the parameter constraints better.

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?

Description clearly states the tool analyzes P&L CSV from specific accounting software and runs three distinct checks. The verb 'analyze' plus the resource 'Profit & Loss/Income Statement CSV' is specific and distinguishes from sibling tools like analyze_balance_sheet or analyze_journal_variance.

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?

Explicitly provides when-to-use examples ('does my P&L look right?', 'any sign errors?') and contrasts with a sibling tool ('For period-over-period comparison use analyze_journal_variance'). This helps the AI agent decide when to invoke this tool vs alternatives.

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.

TDQS

A3.8/5.0
Disambiguation4/5

Tools are largely distinct, each targeting a specific report type (balance sheet, P&L, trial balance) or functionality. Some overlap exists between QBO and Xero variants, but descriptions clearly differentiate them. Overall, an agent can reliably select the right tool.

Naming Consistency4/5

Most tools follow a consistent snake_case verb_noun pattern (e.g., analyze_balance_sheet, list_articles). A few exceptions like free_tier_eligibility and how_munimji_helps break the pattern but are still readable and predictable.

Tool Count3/5

With 29 tools, the count is on the higher side but justified by the domain's breadth (financial analysis, compliance, migration, pricing, etc.). Some reduction through parameterization (e.g., merging QBO/Xero variants) would improve scope.

Completeness4/5

The tool surface covers key areas: financial statement analysis, compliance, migration estimation, feature/pricing info, and partner programs. Missing are direct data manipulation tools (e.g., create/edit journal entries), which may be intentional for a read-only analysis agent.