Skip to main content
Glama

LexGrid Financial Risk & CSRD ESG

Financial Trend & Forensic Anomaly (Beneish + Benford)

financial_trend_anomaly
Read-onlyIdempotent

[Deterministic forensic accounting analysis. Pure calculation, read-only, side-effect free]. Evaluates multi-period financial statements across 2+ fiscal years: CAGR revenue and EBITDA growth, profitability margins (ROE, ROI, ROS, EBITDA margin), Beneish M-Score for earnings manipulation detection, and Benford Law first-digit distribution tests against sector ATECO/NACE benchmarks. Usage: Use this tool to detect aggressive revenue recognition, accounting anomalies, or fraudulent manipulation in historical financial statements. Do NOT use for bankruptcy prediction (use 'corporate_default_predictor') or intrinsic enterprise valuation (use 'dcf_wacc_valuation'). Returns: JSON object with { beneishMScore: number, earningsManipulationRisk: 'LOW' | 'MEDIUM' | 'HIGH', benfordAnomalyDetected: boolean, cagrRevenue: number, marginTrends: object, forensicFlags: string[] }.

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": {
      "periods": "<periods>"
    },
    "name": "financial_trend_anomaly"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodsYesAt least 2 chronological balance sheet periods for trend analysis
atecoNaceCodeNoSector ATECO/NACE code (e.g. J.62.01, C.25) for industry benchmarks

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • changedInput schema / properties / periods / description
      Previous value: -"At least 2 chronological balance sheet periods"New value: +"At least 2 chronological balance sheet periods for trend analysis"
    • addedInput schema / properties / periods / items / properties / cogs / description
      Added value: +"Cost of Goods Sold in EUR (for Beneish GMI)"
    • addedInput schema / properties / periods / items / properties / currentAssets / description
      Added value: +"Current assets in EUR"
    • addedInput schema / properties / periods / items / properties / depreciation / description
      Added value: +"Depreciation and amortization in EUR (for Beneish DEPI)"
    • addedInput schema / properties / periods / items / properties / ebit / description
      Added value: +"Operating profit (EBIT) in EUR"
    • addedInput schema / properties / periods / items / properties / ebitda / description
      Added value: +"EBITDA in EUR"
    • addedInput schema / properties / periods / items / properties / equity / description
      Added value: +"Net equity in EUR"
    • addedInput schema / properties / periods / items / properties / netIncome / description
      Added value: +"Net income / profit in EUR"
    • addedInput schema / properties / periods / items / properties / operatingCashFlow / description
      Added value: +"Operating cash flow in EUR (for Beneish TATA)"
    • addedInput schema / properties / periods / items / properties / receivables / description
      Added value: +"Trade receivables in EUR (for Beneish DSRI)"
    • addedInput schema / properties / periods / items / properties / revenue / description
      Added value: +"Total revenue in EUR"
    • addedInput schema / properties / periods / items / properties / sgaExpenses / description
      Added value: +"Selling, general and admin expenses in EUR (for Beneish SGAI)"
    • addedInput schema / properties / periods / items / properties / totalAssets / description
      Added value: +"Total balance sheet assets in EUR"
    • addedInput schema / properties / periods / items / properties / totalDebt / description
      Added value: +"Total financial debt in EUR (for Beneish LVGI)"
    • addedInput schema / properties / periods / items / properties / year / description
      Added value: +"Fiscal year (e.g. 2024, 2025)"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds that the tool is deterministic, pure calculation, and side-effect free, and it specifies the forensic outputs and risk categories, though it does not discuss data-quality limitations or failure modes.

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?

The description is front-loaded with the core purpose, followed by clear Usage and Returns sections. Every sentence contributes either scope, routing guidance, methodology, or output expectations, with no unnecessary filler.

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?

For a two-parameter analytical tool with no output schema, the description supplies the missing return-value information via a JSON shape and risk fields. It also covers methodology, alternatives, and side-effect expectations, making the definition complete enough for an agent to call it correctly.

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 description coverage is 100%, so the schema already documents all fields and the two required periods. The description reinforces that periods span 2+ fiscal years and that the ATECO/NACE code is used for sector benchmarks, but it adds little syntax or constraint detail beyond the schema.

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 states a specific analytical verb and resource: evaluating multi-period financial statements for CAGR, margins, Beneish M-Score, and Benford Law anomalies. It clearly distinguishes this forensic analysis from bankruptcy prediction and valuation by naming the relevant sibling tools.

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?

It gives explicit when-to-use guidance for detecting aggressive revenue recognition, accounting anomalies, or fraud in historical statements. It also gives explicit when-not-to-use guidance, directing bankruptcy prediction to corporate_default_predictor and valuation to dcf_wacc_valuation.

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