Skip to main content
Glama
h-kazuki-pixel

metric-shift-mcp-server

変化の要因分解

metric_shift_localize
Read-onlyIdempotent

Identify which attribute combinations explain a metric shift by comparing a target period against a weekday-adjusted baseline. Runs offline on CSV data.

Instructions

「先週から売上(予約件数)が落ちた。どこで?」に答える。基準期間から曜日補正つきの予測値を作り、対象期間の実績との乖離がどの属性組合せ(例: 曜日=火 かつ 時間帯=夜、チャネル=web)に集中しているかを特定する。Squeeze(ISSRE 2019)アルゴリズムの独自実装。相関に基づく絞り込みであり因果の証明ではない。列名が不明な場合は先に metric_shift_inspect_data で確認すること。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoデータを直接渡す場合のオブジェクト配列(最大1000行)。file_path とは排他
deltaNo局在化の早期終了閾値δ(既定0.9)。通常は変更不要
measureYes分析する指標。件数なら "count"、金額などは数値列の名前(その列の合計を分析)
file_pathNoCSVファイルの絶対パス。ヘッダー行必須。UTF-8(BOM可)。rows とは排他
dimensionsYes分析の切り口(1〜6個)。列名、または予約語 __weekday__(曜日)/ __timeband__(時間帯)
target_periodYes対象期間(変化が起きた期間)
max_candidatesNo返す原因候補の最大数(既定3)
baseline_periodYes基準期間(正常だった頃)。1週間以上を推奨。対象期間と重複不可
datetime_columnNo日時列の名前。省略時は自動推定。対応形式: ISO 8601 / YYYY-MM-DD / YYYY/MM/DD(時刻付き可)
response_formatNo出力形式(既定markdown)。jsonは機械可読の全数値
timeband_boundariesNo__timeband__ の区切り時刻(既定: 朝6/昼11/夜17/深夜22)
top_n_per_dimensionNo集約時に次元ごとに保持する値の数(既定10)
merge_rare_categoriesNo希少カテゴリを「その他」に自動集約するか(既定true)。次元ごとに件数上位10を保持
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is known. The description adds valuable behavioral context: the day-of-week correction, the Squeeze algorithm, and the explicit statement that results are correlation-based and not causal proof. No contradiction with annotations.

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 compact—four sentences in Japanese—and front-loaded with the primary purpose. Each sentence adds meaningful information: the question answered, the method (prediction + deviation), the algorithm/limitation, and a practical prerequisite. No unnecessary filler.

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 complexity (13 parameters, nested objects, no output schema), the description adequately covers the core logic and usage context. It explains what the tool does and how to interpret results, though it does not describe the output format in detail. The prerequisite hint about the sibling tool rounds out the picture.

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?

Schema description coverage is 100%, so each parameter's meaning is well-documented in the schema. The description adds extra semantic context by giving an example attribute combination (weekday=Tue AND timeband=evening) and by clarifying the role of dimensions/reserved words, which helps the agent map the analysis concept to 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 starts with a concrete question ('Where did sales drop?') and clearly states the tool's function: build a day-of-week-adjusted prediction from the baseline and identify attribute combinations where the deviation concentrates. It explicitly names the algorithm (Squeeze) and distinguishes itself from the sibling tool by directing users to metric_shift_inspect_data when column names are unknown.

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 frames the usage context—localizing where a metric change occurred. It explicitly mentions using metric_shift_inspect_data first if column names are unknown, which is a concrete alternative. It also includes a caution about correlation vs. causation, but does not enumerate additional when-not-to-use scenarios.

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/h-kazuki-pixel/metric-shift-mcp-server'

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