Skip to main content
Glama
USHIKUNDESUYO

shiwake-mcp

benford_analysis

Detect anomalies in journal entry populations by comparing leading digit distributions to Benford's law, returning MAD and chi-square statistics.

Instructions

金額の先頭桁の分布をベンフォードの法則と比較し、MAD と χ² を返す。母集団の性質を見るための道具で、個別仕訳の判定には使えない。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
digitsNo1 = 先頭1桁、2 = 先頭2桁。既定は 1。
amountsNojournals の代わりに金額だけを渡す場合。
journalsNo仕訳の配列。簡易形 { date, debit_account, credit_account, amount } か、明細形 { date, lines: [{ account, debit, credit }] } のどちらでも受ける。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It states that the tool returns MAD and χ² and that it is not for individual judgment, but it does not explicitly mention that it is read-only or describe how it handles edge cases (e.g., zero or negative amounts). Since the name and nature imply a non-mutating analysis, the description is adequate but not rich.

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?

Two sentences with no filler. The core purpose and a critical usage constraint are front-loaded, and every word earns its place.

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 the tool's moderate complexity (3 params, no output schema, no annotations), the description covers the essential usage distinction and return metrics. It does not detail the exact output shape, but for a simple statistical result this is a minor gap. Overall, the description is sufficiently complete for an agent to call the tool 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% – all three parameters (digits, amounts, journals) have clear descriptions in the schema. The tool description adds little beyond the schema, but it does clarify the overall purpose, which indirectly aids parameter understanding. Baseline 3 is appropriate when schema fully documents parameters.

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 verb ('compare'), a specific resource (leading-digit distribution of amounts), and the output (MAD and χ²). It also explicitly distinguishes the tool from individual-entry judgment, which differentiates it from siblings like screen_journals and detect_duplicates.

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 clearly states when to use it (for population properties) and when not to (for individual journal judgment). It does not name an alternative tool explicitly, but the exclusion is unambiguous and sufficient for an agent to avoid misuse.

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