Skip to main content
Glama

analyze_journal_variance

Read-only

Compare two periods of journal-entry data (QBO or Xero — source auto-detected from headers) and flag accounts whose movement deviates materially between periods. Aggregates lines per account into a net total for each period, then surfaces accounts where the period-over-period change crosses a materiality threshold (≥5% relative AND ≥$100 absolute; severity high at ≥50%, medium at ≥20%, low at ≥5%). Inputs are two CSV exports — periodACsv (earlier period) and periodBCsv (later period). Optional periodALabel / periodBLabel for human-readable flag messages (e.g. "Q1 FY2024" vs "Q2 FY2024"). Max 5,000 rows per period; max 5 MB each. Use this when a user pastes two periods and asks "what changed?", "show me variances", "what jumped period-over-period". Returns a flag list ordered by largest delta, a roll-up, and a shareable URL. Both periods must be the same source — mixing QBO + Xero in one call returns an error.

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": {
      "periodACsv": "<periodACsv>",
      "periodBCsv": "<periodBCsv>"
    },
    "name": "analyze_journal_variance"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodACsvYesRaw CSV text of the EARLIER period's journal-entry export (QBO Journal Entries or Xero Manual Journals). Source is auto-detected from the headers.
periodBCsvYesRaw CSV text of the LATER period's journal-entry export. Source is auto-detected from the headers (must match periodACsv).
periodALabelNoOptional human label for the earlier period — e.g. "Q1 FY2024". Used in flag messages.
periodBLabelNoOptional human label for the later period — e.g. "Q2 FY2024".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds the substantive behavior: the materiality rules (≥5% relative AND ≥$100 absolute), severity tiers at 50/20/5%, hard limits of 5,000 rows and 5 MB per period, source auto-detection from headers, and the error on mismatched sources. It also previews the return payload (flag list ordered by largest delta, roll-up, shareable URL).

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 purpose in the first clause, then thresholds, inputs, limits, usage, and returns in a logical order. It is dense with parenthetical asides and repeats the severity scale just after the threshold rule, but nearly every sentence carries usable information.

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?

No output schema exists, yet the description summarizes the return shape (ordered flag list, roll-up, shareable URL), the failure mode for mixed sources, and the input size ceilings. For a two-input analysis tool, nothing an agent needs to call it correctly is missing.

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 the schema already documents all four parameters, including that periodACsv is the earlier period and labels feed flag messages. The description largely restates that; its only real addition is the 5,000-row cap, which is more a behavioral constraint than parameter semantics.

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 (compare two periods of journal-entry data, flag accounts by period-over-period movement) and pins the mechanism (aggregate lines per account, net total per period). It is clearly distinguishable from siblings like analyze_qbo_journal_anomalies or analyze_xero_journal_cleanup, which operate on a single period rather than a two-period diff.

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 trigger phrasings ("what changed?", "show me variances", "what jumped period-over-period") and a hard when-not condition: mixing QBO and Xero in one call returns an error. No sibling alternative is named for the single-period case, so it stops short of full routing guidance.

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