Skip to main content
Glama

Financial Fraud & Anomaly Detection

Financial Fraud & Anomaly Detection — Saifs AI

financial_anomaly
Read-only

Flag unusual ledger entries, possible duplicate payments and earnings-manipulation red flags for human review. Inputs: transactions (entry id, date, amount or debit / credit, vendor / party, invoice number, account, user; Tally / QuickBooks / ERP headers as exported), invoices, numbers + field_name (Benford only), financials (company-year statements), watch_snapshot (from the last run), item (to explain), approval_limits, job (benford_analysis, flag_anomalous_transactions, detect_duplicate_payments, earnings_manipulation_score, watch_transactions, explain_flag). Returns decision cards first, Benford digit tests with chi-square and Nigrini MAD, entries for review with reasons, duplicate groups and split invoices, Beneish M-Scores, drift alerts and an updated watch snapshot. Uses Benford's law, Beneish M-Score and robust z-scores. Flags for review; not an accusation, not proof, not an audit opinion. Not for ids or bounded numbers (Benford is refused), credit scoring, or judging individuals. Bigger exports: financial_anomaly_get_engine.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "financial_anomaly"
  }
}

Input Schema

NameRequiredDescriptionDefault
jobNoOmit to run everything the inputs allow.
itemNoWhat to explain: entry id, invoice number, {'row': n} or {'company': name}.
seedNo
as_ofNo
forgetNo
mappingNoHeader -> standard field overrides.
numbersNoA single column of measured amounts for a Benford test only.
invoicesNoAP invoices (same fields), checked with transactions.
peer_minNo
min_valueNo
date_orderNo
field_nameNoName of the numbers column (used for applicability: ids, codes and rates are refused).
financialsNoCompany-year statements for the M-Score: company, year, sales, cogs (or gross profit), receivables, current_assets, ppe, total_assets, depreciation, sga, current_liabilities, long_term_debt, net_income, cfo (Schedule III names fine).
max_listedNo
transactionsNoLedger / payment / journal / expense rows as exported: entry id, date, amount (or debit / credit), vendor or party, invoice number, account, user, department, currency. No emails, phones or ID numbers.
snapshot_saltNoOptional secret that salts the snapshot's hashed keys; reuse it every run.
watch_snapshotNowatch_snapshot from the last run (counts and salted hashes only).
approval_limitsNoApproval limits, e.g. [10000, 100000] - for split-invoice and just-below-limit checks.
currency_symbolNoSymbol on the cards, e.g. '₹' (lakh / crore grouping) or '$'. Default: the currency the data is written in.
m_score_thresholdNo
split_window_daysNo
min_duplicate_amountNo
duplicate_window_daysNo
exclude_financial_companiesNo

Output Schema

NameRequiredDescriptionDefault
watchNo
alertsNo
statusYes1 = processed, 0 = refused (see decisions)
benfordNo
explainNo
messageNo
metadataYes
decisionsYesPlain-language cards, priority order. Relay these first.
disclaimerYesReview-only framing; relay it with every answer.
duplicatesNo
assumptionsNo
watch_snapshotNo
transaction_flagsNo
data_quality_reportNo
earnings_manipulationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 readOnly/closed-world/non-destructive, yet the description adds substantial context: it explains the methods used (Benford's law, Beneish M-Score, robust z-scores), the output shape (decision cards first, chi-square and Nigrini MAD, duplicate groups), the privacy constraint ('No emails, phones or ID numbers'), the snapshot salting requirement, and the crucial caveat that flags are for review, not accusations, proof, or an audit opinion. That is well beyond the annotations, though it omits runtime/rate/size limits beyond the sibling pointer.

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, then inputs, then returns, then guardrails — a sensible order for a many-parameter tool. It is dense and reads as a run-on packed paragraph with long parenthetical field lists, but nearly every clause carries information an agent needs to pick the job and shape the payload.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 24 params, nested objects, and an output schema that already documents return values, the description supplies the input contracts, method basis, and use/avoid boundaries. Remaining gaps are the undocumented tuning defaults and the absence of any note on result volume or performance for large exports beyond the sibling redirect.

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 24 parameters and only 50% schema coverage, the description does real work: it defines the expected columns for transactions (entry id, date, amount or debit/credit, vendor/party, invoice number, account, user; Tally/QuickBooks/ERP headers), the financials field list for the M-Score, the numbers + field_name pairing for Benford, the meaning of watch_snapshot, item, and approval_limits. Tuning params like seed, peer_min, split_window_days, duplicate_window_days, snapshot_salt and exclude_financial_companies are left to their schema text, so it compensates for the biggest gaps but not all of them.

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?

Opens with a specific verb and object — 'Flag unusual ledger entries, possible duplicate payments and earnings-manipulation red flags for human review' — and then enumerates the six jobs (benford_analysis, detect_duplicate_payments, earnings_manipulation_score, watch_transactions, explain_flag, flag_anomalous_transactions) so the agent can distinguish them without opening the enum. It also explicitly separates itself from the sibling by naming 'financial_anomaly_get_engine' for bigger exports.

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?

Gives explicit exclusions — not for ids or bounded numbers (Benford is refused), not credit scoring, not judging individuals — and a routing rule to the sibling tool for larger exports. The only implicit part is choosing among jobs, but the job enum plus input-type listing covers that adequately.

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.