Skip to main content
Glama
Analytics MCP Server

Analytics MCP Server

by piyusht007

explain_change

Read-onlyIdempotent

Explains why a KPI changed between two periods using shift-share analysis that separates rate and mix effects, then returns ranked drivers and a narrative.

Instructions

Explain why a KPI changed between period_a and period_b. Runs a contribution (shift-share) analysis for each dimension, splitting every segment's contribution into a rate effect (the segment got better/worse) and a mix effect (its share of volume shifted). Returns ranked top_drivers, per-dimension breakdowns and a narrative.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "kpi": "<kpi>",
      "period_a": "<period_a>",
      "period_b": "<period_b>"
    },
    "name": "explain_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
kpiYes
top_nNo
filtersNo
period_aYes
period_bYes
dimensionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so safety is covered. The description adds real behavioral substance beyond that: it discloses the decomposition method (rate effect vs. mix effect) and the shape of returned content (ranked top_drivers, per-dimension breakdowns, narrative). It does not state computational cost or handling of missing data, but the core behavior is well disclosed.

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-loaded with the purpose, then the method, then the output shape in three tight sentences. Every clause carries information and there is no 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?

An output schema exists, so the description need not fully enumerate return values, and the annotations carry the safety profile. What remains missing is parameter-level guidance for periods and filters, which matters for a 6-parameter analytical tool.

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 0% across 6 parameters, so the description must compensate. It clarifies period_a/period_b as the comparison window and implies dimensions are decomposed individually, but it never defines the expected period format, the meaning of top_n ranking, or the structure of the filters object. Partial compensation only.

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?

The description names a specific verb and resource ('Explain why a KPI changed between period_a and period_b') and even specifies the analytical method (shift-share contribution decomposition). It does not explicitly distinguish itself from siblings like compare_periods or query_kpi, so an agent must infer that those tools surface the data while this one attributes the cause.

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 only implied: the agent can infer this is the attribution tool to reach for after noticing a change. There is no explicit when-to-use/when-not statement and no named alternative for the simpler 'what changed' case.

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