Skip to main content
Glama

Detect statement anomalies

detect_statement_anomalies
Read-onlyIdempotent

Screen camt.05x statements for duplicate references, unusual fee deductions, and velocity spikes to flag potential anomalies before deeper review.

Instructions

Screen a camt.05x statement for deterministic, rule-based anomalies.

Use this as a fast, explainable first pass over an incoming statement
before deeper review or reversal. It applies three fixed heuristics over
the parsed entry list (see ``list_entries``) and never calls out to a model
or the network, so the same statement always yields the same result:

* **Duplicate references** (severity ``HIGH``) -- two or more entries share
  an end-to-end id (or, absent one, an entry reference), a classic
  double-payment signal.
* **Unusual fee deductions** (severity ``MEDIUM``) -- a fee/charge debit
  whose amount exceeds a fixed fraction (25%) of the largest ordinary
  transaction amount on the statement.
* **Velocity spikes** (severity ``LOW``/``MEDIUM``) -- a booking-date window
  whose entry count runs far above the statement's median per-window count.

Returns ``{"anomalies": [{"type", "severity", "detail", "entry_refs"}],
"checked_entries": <int>}``; ``anomalies`` is empty for a clean statement.
Returns an ``{"error": ...}`` payload instead if the XML cannot be parsed.

Args:
    statement_xml: The raw statement XML as a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statement_xmlYesThe raw camt.05x statement XML document as a string, with its root camt <Document> element. Every booked entry across all its statements is screened; no file path is accepted.
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description adds meaningful behavioral detail: it never calls a model or network, is deterministic, applies three fixed heuristics with severity levels, and returns an error payload on unparseable XML. This gives the agent a precise model of what the tool will and will not do.

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 detailed but tightly organized: purpose, usage context, deterministic guarantee, three bulleted heuristics, and return shape. Every sentence adds necessary information, and the bullet list makes the heuristic rules easy to scan.

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?

With no output schema, the description fully specifies the return payload shape, including the empty-anomalies case and the error case. It also references list_entries for context and documents the single input parameter via the schema, making the tool complete for correct invocation.

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?

The schema already covers the single parameter fully, including the requirement for raw XML with a root camt <Document> element and the exclusion of file paths. The description's Args section mostly restates this, adding no new parameter-level meaning beyond what the schema provides, so the baseline 3 applies.

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 opens with a specific verb and resource: 'Screen a camt.05x statement for deterministic, rule-based anomalies.' It clearly distinguishes this from sibling tools like parse_statement, validate_statement, and classify_entry by framing it as a fast, explainable first-pass anomaly detector over parsed entries.

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?

The description explicitly states when to use it: 'as a fast, explainable first pass over an incoming statement before deeper review or reversal.' It does not name specific alternative tools or state when not to use it, but the context is clear enough for an agent to select it appropriately.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sebastienrousseau/camt053-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server