Skip to main content
Glama
field-analytics

field-analytics

by cicerao

explain_change

Compares a metric across two periods and returns the groups that drove the change, so you can answer why a number rose or fell without calculating contributions yourself.

Instructions

Compare a metric between two periods and return the groups that moved it most.

Period A is the baseline (start_a to end_a) and period B is the period being explained. Use this when someone asks why a number went up or down. Report the movers it returns and read its notes. Do not work out contributions yourself.

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": {
      "metric": "<metric>",
      "start_a": "<start_a>",
      "end_a": "<end_a>",
      "start_b": "<start_b>",
      "end_b": "<end_b>"
    },
    "name": "explain_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNo
end_aYes
end_bYes
metricYes
regionNo
start_aYes
start_bYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose useful traits: the return is a set of movers, it carries "notes" the agent should read, and contributions are precomputed so the agent must not derive them manually. It omits permissions, how many movers come back, ordering, and what the notes contain, so it is helpful but not complete.

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?

Three short blocks, front-loaded with the core action, then the period semantics, then the usage trigger and the do-not-substitute warning. Every sentence adds information and nothing is repeated from the schema.

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?

For a seven-parameter analytical tool with no annotations and no output schema, the definition covers purpose, period roles, and the shape of the result, which is the essential core. It leaves the metric identifier, filter behavior for site/region, and date formats undocumented in both schema and prose, which is a real gap at this complexity.

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% — the seven parameters have only bare titles, so the description must compensate. It genuinely clarifies the four date parameters by defining period A as the baseline (start_a to end_a) and period B as the period being explained, but it says nothing about how to identify the metric, whether site/region are optional filters, or the expected date format.

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 gives a specific verb and resource ("Compare a metric between two periods") plus the output shape ("return the groups that moved it most"), and then disambiguates the two periods so the agent understands the baseline-vs-explained framing. That framing also separates it in practice from a plain metric query tool without needing to name a sibling.

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?

"Use this when someone asks why a number went up or down" is an explicit, actionable trigger condition, and "Do not work out contributions yourself" steers the agent away from a wrong alternative behavior. It stops short of naming a sibling tool or stating when not to use it (e.g. single-period lookups), which keeps it out of the top band.

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