Skip to main content
Glama

explain_change

Read-only

Explain WHY a number changed between two periods: the change split by a dimension (status, technician, service type, customer…), biggest movers first, with values that appeared or disappeared flagged. Give the table, the metric (a count, or the sum or average of a numeric column), the dimension, the date column that places each row in a period, and the baseline (period_a) and comparison (period_b) windows. Try another dimension when the first doesn't explain it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional title for the driver table (e.g. 'What drove the revenue drop').
limitNoHow many top drivers to show (default 12, max 50).
tableYesThe table to analyze (a read-allowlisted table).
metricYesWhat to measure: { agg: 'count' | 'sum' | 'avg', column? }. Use count for record volume; sum/avg require a numeric column (e.g. { agg:'sum', column:'total_amount' }).
filtersNoOptional equality filters applied to BOTH periods, each { column, value } (e.g. narrow to one branch). Values are matched exactly.
period_aYesThe BASELINE window { from, to } as YYYY-MM-DD (from inclusive, to exclusive). This is the 'before'.
period_bYesThe COMPARISON window { from, to } as YYYY-MM-DD. This is the 'after' — the change is B minus A.
dimensionYesThe column to break the change down by (e.g. 'status', 'technician_name', 'service_type'). Each distinct value becomes a driver row.
date_columnYesThe date/timestamp column that places each record into a period (e.g. 'created_at', 'scheduled_date').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so safety behavior is covered. The description adds output-oriented behavior: results are split by dimension, sorted by biggest movers, and flagged when values appeared or disappeared. It does not cover pagination or performance limits, though limit is documented in the schema.

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?

Front-loads the purpose in the first sentence, then gives compact invocation guidance and a useful iteration tip. The description is appropriately sized with no filler or unnecessary repetition.

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?

No output schema exists, but the description explains the output shape: change split by dimension, biggest movers first, flagged appeared/disappeared values. Combined with the rich parameter schema and read-only annotations, an agent has enough context to invoke this analytical 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%, so the schema already documents all 9 parameters in detail. The description restates key concepts like metric, dimension, date_column, and the baseline/comparison windows, but adds no syntax or constraints beyond what the schema provides.

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?

States a specific analytical action: explain why a number changed between two periods, split by a dimension, biggest movers first. The purpose is clear and specific, but the description does not explicitly distinguish this tool from sibling analytics tools such as compare_record, revenue_by_month, or run_sql.

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?

Provides implied usage context ('between two periods') and an iteration tip ('Try another dimension when the first doesn't explain it'). However, it gives no explicit guidance on when to choose this tool over alternative analytics or SQL tools, and no when-not conditions.

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.