Skip to main content
Glama

guardian_review

Sanity-check a causal claim ("cause drove effect") before acting on it.

Provide exactly one of csv (CSV text), data (list of row objects) or dataset_id (a dataset uploaded via guardian_request_upload; use this for more than ~200 rows; single-use, deleted when reviewed) containing columns named by cause and effect. Returns a verdict -- pass (act), caution (act carefully), or hold (do not act; the effect looks confounded or unsupported) -- with the naive correlational effect versus the confounder-adjusted causal effect and its confidence interval, the confounders adjusted for, a confidence score, a plain-English interpretation, and a recommended action, plus the estimator used and the inferred causal DAG. All numbers are deterministic statistics (never LLM-generated); the LLM may only choose an estimator id from a fixed whitelist and write the interpretation prose.

Args: cause: Treatment column the claim says drives the outcome (e.g. "ad_spend"). effect: Outcome column (e.g. "new_customers"). csv: Dataset as CSV text (header row required). data: Dataset as a list of row records (alternative to csv). dataset_id: ID returned by guardian_request_upload after uploading the CSV (alternative to csv/data; for datasets above ~200 rows). Single-use: the dataset is deleted when reviewed, so re-upload to retry. known_confounders: Columns to adjust for; otherwise discovered automatically. context: Free-text business context, e.g. "Q3 promo evaluation". Accepted but not currently used in the analysis or interpretation. units: Display-only unit hints by column, e.g. {"ad_spend": "USD"}. step: A concrete treatment step (e.g. 1000 for a $1,000 spend increase) to restate the effect in business terms (cost per incremental outcome, ...). time_col: Column to order rows by for time series (autocorrelation-robust standard errors and adstock). adstock: Opt-in geometric-adstock transform for a lagged/carryover treatment. se: Standard-error flavor; "auto" diagnoses autocorrelation when time_col is given. test_design: true (or an options object) also returns how many periods a spend-cut test needs to confirm the effect. estimator: Primary-effect estimator. Omit (or "auto") to follow config.estimator (default "rule": the deterministic choice); to let the LLM choose, set config.estimator="llm" ("llm"/"rule" are NOT accepted here); or force "ols_adjusted", "aipw", "ipw", "psm" or "dml_forest" (always wins over config). The response reports the estimator used (estimator.id, .source, .rationale, .fallback_reason) and the inferred dag. config: Per-step engine config, an object with optional keys cleaning, discovery, estimator, summary, each "rule" (deterministic, no LLM) or "llm". Defaults when omitted or partial: cleaning="llm", discovery="llm", estimator="rule", summary="rule". The LLM never computes a number: cleaning proposes derived columns / null-imputation strategies (pandas computes the values), discovery prunes/orients the discovered DAG (cause/effect are always yours), estimator picks a whitelisted id, summary writes the prose ("rule", the default, is a fixed template that explains the why with no AI). An "llm" step falls back to "rule" when the server has no Gemini key or the call fails; the response's engine_steps reports requested vs used per step with a fallback reason. Unknown keys or values are rejected. Use all "rule" for a fully deterministic, reproducible run. seed: Optional base random seed (default 42) for every seeded step; the seeds used are returned in stamp.seeds. cate: Opt-in list of dataset columns to stratify by for subgroup effects (returned in cate); columns are validated against the dataset. sensitivity: Opt-in; true also returns sensitivity checks (sensitivity).

Every response carries `stamp` (core/guardian versions, estimator, resolved
config, seeds, data_fingerprint) and `llm_decisions` (audit/replay records):
a changed answer with an unchanged `stamp.data_fingerprint` came from a Syl
release or config change, not from your data. Only cleaning/discovery/estimator
set to "llm" can change a number; summary never does.

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": {
      "cause": "<cause>",
      "effect": "<effect>"
    },
    "name": "guardian_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
seNoStandard-error type. `auto` checks for autocorrelation and picks for you when `time_col` is given. `HAC` requires `time_col`.auto
csvNoDataset as UTF-8 CSV text with a header row. For about 200 rows or fewer; above that use `dataset_id`.
cateNoOpt-in. Columns to split by for subgroup effects, returned in `cate`. Checked against the dataset.
dataNoDataset as row objects keyed by column name (alternative to `csv`).
seedNoBase random seed (default 42) for every seeded step. Seeds used come back in `stamp.seeds`.
stepNoThe proposed change in the cause (e.g. 500 for +$500 a period). Restates the effect at that size and adds `scaled_effect` and `business` (e.g. cost per incremental outcome). Omit to skip both.
causeYesName of the treatment column the claim says drives the outcome (e.g. 'ad_spend'). Must exist in the dataset.
unitsNoDisplay-only unit labels by column, e.g. {'ad_spend': 'USD'}. Changes labels only, never a number.
configNoChooses, per step (cleaning, discovery, estimator, summary), a fixed `rule` or `llm` help. Defaults llm / llm / rule / rule. A partial object is merged over defaults; unknown keys or values are rejected. An `llm` step falls back to `rule` if no LLM is available (`engine_steps` reports it). Only cleaning, discovery and estimator set to `llm` can change a number; set them to `rule` for strict reproducibility.
effectYesName of the outcome column (e.g. 'conversion_value'). Must exist in the dataset.
adstockNoOpt-in carryover transform for a lagged cause such as ad spend. `time_col` is required. `decay` is a fixed value in [0, 1); omit to grid-search by AIC over `grid`. Returns `adstock`.
contextNoFree-text note about the decision (e.g. 'Q3 promo evaluation'). Accepted but currently not used in the analysis or interpretation; it never changes a number.
time_colNoDate or period column. Rows are sorted by it; enables autocorrelation-robust standard errors (`se` auto/HAC) and sets the cadence for `test_design`. Must exist.
estimatorNo`auto` or omitted follows `config.estimator` (default `rule`, a deterministic choice). A named estimator forces that method and overrides config. If not eligible for the data or it fails, Guardian uses the rule choice and reports why in `estimator.fallback_reason`. To let the LLM choose, set `config.estimator='llm'`; 'llm' and 'rule' are NOT accepted here.
dataset_idNoID returned by `guardian_request_upload` after you upload the CSV. Use for more than about 200 rows. Usable only by the same API key and only once: deleted when reviewed, even if the review fails, and expires after 30 minutes.
sensitivityNoOpt-in. `true` also runs sensitivity checks (E-value, CI fragility), returned in `sensitivity`.
test_designNo`true` or an options object also returns `test_design`: how many periods a spend-cut test needs to confirm the effect. Deterministic.
known_confoundersNoColumns that affect both cause and effect (e.g. seasonality, brand-query share). Always adjusted for, in addition to any discovered automatically. Each must exist. The name is `known_confounders`, not `confounders`. Never list downstream columns such as roas, clicks or conversions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • addedInput schema / properties / adstock / description
      Added value: +"Opt-in carryover transform for a lagged cause such as ad spend. `time_col` is required. `decay` is a fixed value in [0, 1); omit to grid-search by AIC over `grid`. Returns `adstock`."
    • addedInput schema / properties / cate / description
      Added value: +"Opt-in. Columns to split by for subgroup effects, returned in `cate`. Checked against the dataset."
    • addedInput schema / properties / cause / description
      Added value: +"Name of the treatment column the claim says drives the outcome (e.g. 'ad_spend'). Must exist in the dataset."
    • addedInput schema / properties / config / description
      Added value: +"Chooses, per step (cleaning, discovery, estimator, summary), a fixed `rule` or `llm` help. Defaults llm / llm / rule / rule. A partial object is merged over defaults; unknown keys or values are rejected. An `llm` step falls back to `rule` if no LLM is available (`engine_steps` reports it). Only cleaning, discovery and estimator set to `llm` can change a number; set them to `rule` for strict reproducibility."
    • addedInput schema / properties / context / description
      Added value: +"Free-text note about the decision (e.g. 'Q3 promo evaluation'). Accepted but currently not used in the analysis or interpretation; it never changes a number."
    • addedInput schema / properties / csv / description
      Added value: +"Dataset as UTF-8 CSV text with a header row. For about 200 rows or fewer; above that use `dataset_id`."
    • addedInput schema / properties / data / description
      Added value: +"Dataset as row objects keyed by column name (alternative to `csv`)."
    • addedInput schema / properties / dataset_id / description
      Added value: +"ID returned by `guardian_request_upload` after you upload the CSV. Use for more than about 200 rows. Usable only by the same API key and only once: deleted when reviewed, even if the review fails, and expires after 30 minutes."
    • addedInput schema / properties / effect / description
      Added value: +"Name of the outcome column (e.g. 'conversion_value'). Must exist in the dataset."
    • addedInput schema / properties / estimator / description
      Added value: +"`auto` or omitted follows `config.estimator` (default `rule`, a deterministic choice). A named estimator forces that method and overrides config. If not eligible for the data or it fails, Guardian uses the rule choice and reports why in `estimator.fallback_reason`. To let the LLM choose, set `config.estimator='llm'`; 'llm' and 'rule' are NOT accepted here."
    • addedInput schema / properties / known_confounders / description
      Added value: +"Columns that affect both cause and effect (e.g. seasonality, brand-query share). Always adjusted for, in addition to any discovered automatically. Each must exist. The name is `known_confounders`, not `confounders`. Never list downstream columns such as roas, clicks or conversions."
    • addedInput schema / properties / se / description
      Added value: +"Standard-error type. `auto` checks for autocorrelation and picks for you when `time_col` is given. `HAC` requires `time_col`."
    • addedInput schema / properties / seed / description
      Added value: +"Base random seed (default 42) for every seeded step. Seeds used come back in `stamp.seeds`."
    • addedInput schema / properties / sensitivity / description
      Added value: +"Opt-in. `true` also runs sensitivity checks (E-value, CI fragility), returned in `sensitivity`."
    • addedInput schema / properties / step / description
      Added value: +"The proposed change in the cause (e.g. 500 for +$500 a period). Restates the effect at that size and adds `scaled_effect` and `business` (e.g. cost per incremental outcome). Omit to skip both."
    • addedInput schema / properties / test_design / description
      Added value: +"`true` or an options object also returns `test_design`: how many periods a spend-cut test needs to confirm the effect. Deterministic."
    • addedInput schema / properties / time_col / description
      Added value: +"Date or period column. Rows are sorted by it; enables autocorrelation-robust standard errors (`se` auto/HAC) and sets the cadence for `test_design`. Must exist."
    • addedInput schema / properties / units / description
      Added value: +"Display-only unit labels by column, e.g. {'ad_spend': 'USD'}. Changes labels only, never a number."
  2. Changed6 schema fields changed
    • addedInput schema / $defs / EngineConfigIn
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Per-step engine mode: ``\"rule\"`` (deterministic, no LLM) or ``\"llm\"``.\n\nOmitted steps take their defaults: ``cleaning=\"llm\"``, ``discovery=\"llm\"``,\n``estimator=\"rule\"``, ``summary=\"rule\"``. An ``\"llm\"`` step falls back to the rule\npath (and says so in the response's ``engine_steps``) when no server-side Gemini\nkey is configured or the LLM call fails. The LLM never computes a number.",
      +  "properties": {
      +    "cleaning": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "rule",
      +            "llm"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Derived-column proposals and null imputation. Default 'llm'.",
      +      "title": "Cleaning"
      +    },
      +    "discovery": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "rule",
      +            "llm"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "LLM pruning/orienting of the discovered DAG. Guardian always supplies cause/effect, so this only affects prune/orient. Default 'llm'.",
      +      "title": "Discovery"
      +    },
      +    "estimator": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "rule",
      +            "llm"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Primary-effect estimator choice. Default 'rule'.",
      +      "title": "Estimator"
      +    },
      +    "summary": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "rule",
      +            "llm"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Interpretation prose. Default 'rule': a fixed, audit-friendly template that explains the why (confounder importance, interval, adjustment set, estimator). 'llm' lets Gemini write prose (never numbers).",
      +      "title": "Summary"
      +    }
      +  },
      +  "title": "EngineConfigIn",
      +  "type": "object"
      +}
    • addedInput schema / properties / cate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cate"
      +}
    • addedInput schema / properties / config
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/EngineConfigIn"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / estimator
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "ols_adjusted",
      +        "aipw",
      +        "ipw",
      +        "psm",
      +        "dml_forest"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "const": "auto",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Estimator"
      +}
    • addedInput schema / properties / seed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Seed"
      +}
    • addedInput schema / properties / sensitivity
      Added value: +{
      +  "default": false,
      +  "title": "Sensitivity",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed1 schema field changed
    • addedInput schema / properties / dataset_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Dataset Id"
      +}
  5. First observed

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so thoroughly: it discloses that all numbers are deterministic statistics and never LLM-generated, exactly which engine steps can move a number, the fallback to rule mode when no Gemini key is present, and the stamp/llm_decisions audit trail for replay. The single-use deletion and version-attribution semantics are the kind of behavioral context annotations would otherwise have to supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The purpose and return contract are front-loaded and well organized, but the definition then reproduces an Args block that duplicates almost verbatim what the already-complete schema describes. For an 18-parameter tool this makes the definition long and repetitive, and some of that space would be better spent on guidance not already in structured fields.

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?

This is a complex, 18-parameter statistical tool with no output schema, and the description still covers the return payload in detail: verdict, naive vs confounder-adjusted effect with confidence interval, adjustment set, confidence score, prose interpretation, recommended action, estimator metadata and inferred DAG. Determinism guarantees and audit fields are also explained, leaving little an agent must infer before calling it.

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 100%, so the schema already documents all 18 parameters and the baseline is 3. The description earns an extra point by resolving genuinely non-obvious interactions the schema only hints at, notably that 'llm'/'rule' are not accepted as estimator values and that the estimator overrides config, plus flagging that context is accepted but unused.

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 opening sentence gives a concrete verb and resource: sanity-check a causal claim ("cause drove effect") before acting. It enumerates the three possible verdicts and what each means for action, so an agent knows exactly what the tool produces and how to react, without needing to compare schemas against guardian_request_upload.

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?

Usage is clearly framed ("before acting on it") and the definition routes between input modes, stating that dataset_id is for >200 rows and that it is single-use so a re-upload is needed to retry. It also spells out the estimator/config precedence. It stops short of an explicit when-not-to-use statement or a named competing tool for smaller claims, which keeps it below a 5.

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.