Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

scigan

Read-only

Estimates causal dose-response curves from observational data with continuous treatments, controlling for covariates to answer what outcome each dose would produce.

Instructions

Adversarial dose-response estimator (Bica et al. 2020). Assumptions: Unconfoundedness given covariates X for the continuous treatment; Positivity over the dose support; The adversarial generator recovers the counterfactual dose distribution (Bica et al. 2020). Pre-conditions: data with a continuous treatment (dose), outcome and covariates; torch is installed (neural extra) -- imported lazily. Failure modes: Unstable adversarial training -- dose-response estimates vary across seeds -> Average across seeds or use the smoother varying-coefficient estimator. Alternatives: sp.vcnet, sp.dose_response. Typical minimum N: 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome variable column name or outcome array.
detailNoPayload depth: 'minimal' (~150 tokens) for sub-step calls where only the point estimate is needed; 'standard' (~1K tokens) for diagnostics + coefficient table; 'agent' (~2K tokens, default) adds violations / next_steps / suggested_functions so the LLM can plan its next call without another round-trip.agent
t_gridNoGrid of t values to evaluate.
as_handleNoIf true, cache the fitted result on the server and return result_id + result_uri alongside the JSON payload so a subsequent tools/call can chain without re-running.
data_pathYesAbsolute path or URL to a data file. Supported: .csv / .tsv / .txt (delimited), .parquet / .pq, .feather / .arrow, .xlsx / .xls, .dta (Stata), .json / .jsonl. Schemes: file://, s3://, gs://, https://.
result_idNoOptional handle to a previously-fitted result (returned by an earlier call when as_handle=true). Tools that operate on a fitted object accept this in place of re-supplying data_path + columns.
treatmentYesTreatment indicator, treatment variable, or treatment array.
covariatesYesCovariate matrix, DataFrame, or column names.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
propensity_weightsNopropensity_weights parameter (Optional[np.ndarray]).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Even though readOnlyHint=true and openWorldHint=false are already in annotations, the description adds substantial behavioral context beyond that: the adversarial training is unstable across seeds, torch is imported lazily, and the generator recovers the counterfactual dose distribution. These details inform the agent about runtime behavior and variability that annotations cannot convey.

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?

The description is dense and well-organized, covering purpose, assumptions, pre-conditions, failure modes, alternatives, and minimum N in a compact block. Every sentence adds useful information, though it is longer than the minimal ideal and could benefit from clearer labeling (e.g., bullet points), which keeps it from a 5.

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?

For a complex 11-parameter estimation tool, the description covers the essential decision factors: statistical assumptions, data requirements, software dependency, sample size floor, failure modes, and alternatives. An output schema exists, so return-value details are already structured. Nothing critical is missing for an agent to decide whether and how to invoke this tool.

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 baseline is 3. The description adds value by clarifying that the treatment must be continuous (a dose), which is not stated in the schema's treatment property ('Treatment indicator, treatment variable, or treatment array'). This extra constraint helps the agent verify inputs before calling.

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 states the tool is an 'Adversarial dose-response estimator (Bica et al. 2020)', which clearly conveys that it estimates dose-response curves using a specific adversarial method. It lacks an explicit action verb like 'estimates', but the noun phrase is functionally clear. It also distinguishes itself from sp.vcnet and sp.dose_response by naming them as alternatives.

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?

The description provides explicit when-to-use guidance: it lists assumptions, pre-conditions (continuous treatment, torch installed), and typical minimum N. It gives clear failure-mode guidance—'dose-response estimates vary across seeds'—and tells the agent to average across seeds or use an alternative. This is strong, actionable routing information.

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

Deploy Server

Other Tools