Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

notears

Read-only

Learn a causal DAG from data to map variable relationships and support evidence-backed causal decision-making.

Instructions

Learn a DAG from data using NOTEARS (Zheng et al. 2018). Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Causal Markov condition and faithfulness (PC/GES/FCI); Causal sufficiency for PC/GES (no latent confounders); FCI relaxes this; Acyclicity; LiNGAM additionally assumes a linear non-Gaussian model. Pre-conditions: Constraint-/score-based discovery needs i.i.d. observational data with enough samples for reliable conditional-independence tests; Invariance-based discovery (ICP) needs data labelled by environment / intervention. Failure modes: Unstable skeleton / many undirected edges -- faithfulness or sample size is the likely culprit -> Increase the sample, relax the CI-test threshold, or switch to FCI if latent confounders are plausible. Alternatives: sp.pc_algorithm, sp.fci, sp.ges, sp.lingam. Typical minimum N: 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
h_tolNoConvergence threshold for acyclicity constraint h(W).
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
lambda1NoL1 penalty weight for sparsity. Higher = sparser graph.
rho_maxNoMaximum penalty parameter rho.
max_iterNoMaximum augmented Lagrangian iterations.
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.
variablesNoColumn names to use. If None, uses all numeric columns.
w_thresholdNoThreshold for pruning small edge weights. Edges with |W_ij| < w_threshold are removed.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
random_stateNoRandom seed.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already mark the tool read-only and not open-world, and the description adds non-obvious behavioral context: failure modes (unstable skeleton / undirected edges), a likely diagnosis (faithfulness or sample size), remediation steps, and a minimum sample-size heuristic. This goes beyond the structured annotations without contradicting them.

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 lead sentence is sharp and the labels (Validation, Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N) make it scannable, but parts of the body is boilerplate from other causal-discovery methods (PC/GES/FCI/LiNGAM) and the 'validated evidence tier' sentence is vague. These weaken the otherwise compact structure.

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 13-parameter tool with a full output schema, the description covers the main non-schema context an agent needs: sample-size expectations, failure modes, data preconditions at a high level, and which alternative tool to switch to. It is not complete regarding NOTEARS-specific statistical assumptions, but schema and output schema carry the rest.

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% and each of the 13 parameters has a meaningful schema description (e.g., w_threshold pruning, as_handle caching, detail payload depth). The tool description itself adds no parameter-level meaning, so a baseline 3 is appropriate.

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 is a specific verb+resource+algorithm statement: 'Learn a DAG from data using NOTEARS (Zheng et al. 2018).' This distinguishes it from DAG-learning siblings like pc_algorithm, ges, and fci by naming the exact method, even though later assumptions text is generic.

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

Usage Guidelines3/5

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

The description lists Alternatives and includes one conditional routing rule ('switch to FCI if latent confounders are plausible'), plus a typical minimum N. However, it never states the conditions under which NOTEARS is preferred over pc_algorithm, ges, or lingam, and the pre-conditions/assumptions section reads like a generic causal-discovery template rather than NOTEARS-specific guidance.

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