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
timeNo
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. Added

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses how collinearity is handled (VIF > 5 or pairwise |r| > 0.8) and that entangled candidates are flagged not_separable rather than ranked with a confident wrong number. It also details the per-candidate outputs. These behaviors go well beyond the readOnly/idempotent annotations and are internally consistent.

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 dense but each sentence adds a distinct useful fact: method, collinearity handling, returned metrics, alternative tool, supported data, and constraints. The key 'confounder-aware' concept is front-loaded, and no sentence is 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?

For a regression-style analysis tool with no output schema, it covers algorithm, failure mode, return fields, data sources, and candidate constraints. However, the optional `time` parameter is left undocumented in both the schema and description, which is a minor completeness gap for constructing a fully valid call.

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 coverage is 80%, so the baseline is 3; the description adds meaningful semantics by explaining entity omission for entity-less series and enforcing the 2-15 candidate count. It does not clarify the undocumented `time` parameter, but the schema covers the rest and the description complements rather than repeats it.

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 states a precise technical behavior: 'fits ONE multiple regression of the target on ALL candidates jointly' and distinguishes it from the sibling find_drivers by name. It clearly identifies the resource (driver decomposition) and the specific method (confounder-aware joint regression), far beyond the generic title.

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?

It explicitly says 'Use this instead of find_drivers when candidates may overlap...' giving a concrete alternative and the condition that selects it. It also clarifies supported data sources and the entity-omission case for private KPI series, so an agent knows when this tool applies.

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