Skip to main content
Glama
ledgerlens

ledgerlens

by vovaddk

detect_anomalies

Read-only

Flag unusually large purchases and months where a spending category spiked using robust z-scores. Adjust threshold and minimum amount to identify outliers in imported bank-statement data.

Instructions

Flag unusually large purchases and months where a category spiked.

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": "detect_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
monthNoCalendar month, YYYY-MM.
currencyNoReporting currency for converted totals.UAH
thresholdNoRobust z-score cut-off; lower = more.
min_amountNoIgnore single expenses below this amount.

Output Schema

NameRequiredDescriptionDefault
itemsYes
notesYes
currencyYes
thresholdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real value by naming the two anomaly types that can be returned, but it says nothing about how results are ranked, how many are returned, or what happens when no anomalies exist.

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?

A single front-loaded sentence with no filler, and both detection modes are stated before any caveats. It is efficient, though the extreme terseness leaves no room for the disambiguation that would make the definition self-sufficient.

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

Completeness3/5

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

With an output schema and full annotation coverage, the description does not need to explain return values, and it correctly describes the two result categories. It stops short of the completeness expected for a detection tool: no mention of data scope (all history vs. a given month) or of hysteresis/false-positive behavior.

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 month, currency, threshold and min_amount are all documented in the schema. The description adds no additional meaning about how these parameters interact with the two anomaly classes (e.g. that min_amount suppresses large-purchase flags).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb ('Flag') plus two concrete anomaly classes: unusually large purchases and category spike months. That is far more informative than the bare name, but it never contrasts itself with the closest sibling, detect_recurring, leaving an agent to infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the scope ('purchases', 'months where a category spiked'), which tells the agent this is a retrospective outlier scan rather than a listing query. There is no explicit when-to-use, when-not-to-use, or pointer to alternatives such as spending_breakdown for plain totals.

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