Skip to main content
Glama

decompose_drivers

Read-onlyIdempotent

CONFOUNDER-AWARE DRIVER ANALYSIS: fits ONE multiple regression of the target on ALL candidates jointly, so each effect is estimated holding the other candidates constant. Distinguishes "it was the weather" from "a promo ran at the same time": candidates too entangled to separate (VIF > 5 or pairwise |r| > 0.8) are flagged not_separable (named pairs) instead of ranked with a confident wrong number. Returns per candidate: standardized coefficient (effect size), raw slope, p-value, VIF, pairwise r (for the pairwise-vs-joint contrast), and the best lead/lag vs the target. Use this instead of find_drivers when candidates may overlap (promo calendars, weather, seasonality) or when you need honest independent effect sizes. Works on public indicators (World Bank, FRED, Eurostat, OECD) and on your own connected series (Google Search Console, GA4, Meta Ads, Shopify); omit entity for an entity-less private KPI series. 2-15 candidates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeNoOptional time window. "2010-2023" keeps 2010 through 2023, "2019-01-2024-06" works by month, and a single "2015" keeps 2015 onward. Omitted or unparseable = the whole series.
entityNoEntity code (e.g. DEU). Omit for entity-less private series.
max_lagNoMax lead/lag periods to scan per candidate (0 disables, default 5, max 20)
candidatesYesCandidate indicator ids to decompose jointly (2-15)
target_indicatorYesThe KPI you want to explain

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / time / description
      Added value: +"Optional time window. \"2010-2023\" keeps 2010 through 2023, \"2019-01-2024-06\" works by month, and a single \"2015\" keeps 2015 onward. Omitted or unparseable = the whole series."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description's added value is the analytic behavior: entangled candidates with VIF > 5 or |r| > 0.8 are flagged not_separable rather than ranked with 'a confident wrong number', and the 2-15 candidate bound is stated. It does not mention cost, rate limits, or runtime for large scans, but the core computational behavior is unusually 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core concept in the first clause and every sentence carries information (method, flagging rule, return fields, when-to-use, data sources, limits). It is long for a tool description and the 'weather vs promo' illustration is decorative, but nothing is padded.

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?

With no output schema, the description enumerates the return payload per candidate (standardized coefficient, raw slope, p-value, VIF, pairwise r, best lead/lag), plus input limits and supported data sources. For a statistically complex tool, an agent has what it needs to invoke and interpret it.

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 five parameters including time-window formats and entity omission; the baseline is 3. The description roughly restates these (2-15 candidates, omit entity for private series) rather than adding format or syntax detail beyond the schema.

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?

States a specific verb and resource ('fits ONE multiple regression of the target on ALL candidates jointly') and explains exactly how it differs from the sibling find_drivers ('use this instead of find_drivers when candidates may overlap'). An agent can distinguish it without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the alternative (find_drivers) and the condition that selects this one instead (candidates may overlap, or you need honest independent effect sizes). It also names the applicable data domains, so the selection decision is fully determined.

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.

Resources