Skip to main content
Glama

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.6/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It details the three checks, the output format (flags with severity, summary with fields, shareable URL), and input limits (max 5000 rows, 5 MB). It does not explicitly state that the tool is read-only or non-destructive, but this is implied by the nature of analyzing CSV text.

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 well-structured and front-loaded with the tool's purpose and checks. It is relatively long but every sentence adds value, including usage examples and alternative tool reference. Could be slightly more concise but remains clear.

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 complexity (three checks, multiple sources, auto-detection), the description covers input format, output fields, limits, and alternative usage. No output schema exists, so the description adequately explains return values (flags, summary, URL) and usage context.

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?

With schema description coverage at 100%, baseline is 3. The description adds meaning beyond the schema for csvText by specifying supported sources (QuickBooks, Xero, etc.) and required structure (section headers, subtotals, net income row). For fileName, it repeats the schema description.

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?

The description clearly states that the tool takes a P&L CSV and runs three specific checks (subtotal mismatch, negative expense, margin red flag). It distinguishes itself from the sibling tool analyze_journal_variance by noting that tool is for period-over-period comparison, while this is single-period.

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?

The description explicitly provides usage scenarios: 'Use this when a user pastes a P&L and asks...' and gives example user queries. It also tells when not to use it, directing to analyze_journal_variance for period-over-period comparison.

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.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose, with detailed descriptions that specify the exact input and use case. Even similar tools like QBO vs Xero journal analyzers are differentiated by source system and specific checks, leaving no ambiguity.

Naming Consistency4/5

The majority of tools follow a verb_noun snake_case pattern (e.g., analyze_balance_sheet, list_features). A few exceptions like how_munimji_helps and feature_search deviate slightly, but overall the convention is consistent and readable.

Tool Count4/5

With 26 tools covering financial analysis, compliance, migration, and product info, the count is on the higher side but justified by the breadth of the accounting domain. Each tool serves a specific need without redundancy.

Completeness4/5

The tool set covers all major financial statement checks (balance sheet, P&L, trial balance, journal entries), compliance, migration, and product details. A notable gap is the lack of cash flow analysis, but the set is otherwise comprehensive for its scope.

Resources