Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

llm_dag_propose

Read-only

Propose a candidate directed acyclic graph from variable names and a domain description, generating a causal hypothesis for humans or constraint-based discovery to validate.

Instructions

Propose a candidate DAG from variable names + domain description. Assumptions: LLM-proposed graphs / priors are hypotheses to validate, not statistical identification; Human review or data-driven falsification is required before any causal claim. Pre-conditions: Domain context and a bounded list of candidate variables; A configured, logged LLM provider for reproducibility. Failure modes: Proposals are unstable across runs or include hallucinated variables/edges -> Fix the model release and seed, add constraints, and cross-check with constraint-based discovery. Alternatives: sp.llm_dag_constrained, sp.causal_discovery, sp.dag. Typical minimum N: 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducible stochastic steps.
clientNoAn LLM client implementing ``.complete(prompt: str) -> str``. If ``None``, use the deterministic heuristic backend.
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
domainNoFree-text domain description (e.g. "labor economics, education and earnings"). Helps the LLM but ignored by the heuristic backend.
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_pathNoAbsolute 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.
variablesYesNames of variables in the dataset.
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.

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 with readOnlyHint=true, the description goes well beyond annotations by stating that outputs are hypotheses to validate, not statistical identification, and that human review or data-driven falsification is required. It also discloses instability and hallucination failure modes with concrete fixes, which is valuable behavioral context far beyond the structured hints.

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 information-dense but well organized with labeled sections (Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N). Every sentence adds distinct value—no filler—and the core purpose is front-loaded in the first sentence.

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 tool with 10 parameters and a rich output schema, the description covers the conceptual framing, prerequisites, failure modes, mitigations, alternatives, and even a minimum-N heuristic. The output schema handles return-value details, so nothing essential is missing for an agent to call this tool correctly.

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 parameter already has a detailed description in the schema. The tool description reinforces that `variables` and `domain` are the core inputs, but adds no new parameter-level semantics beyond what the schema provides, so the baseline of 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 states a specific verb ('propose'), a concrete resource ('candidate DAG'), and the inputs ('variable names + domain description'). It also explicitly names sibling alternatives later, so an agent can distinguish this from sp.dag, sp.causal_discovery, and sp.llm_dag_constrained without opening their schemas.

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?

The description provides clear pre-conditions (domain context, bounded variables, configured/logged LLM provider), failure modes, and a list of alternative tools. However, it does not explicitly state when to choose one alternative over another (e.g., 'use sp.llm_dag_constrained when you already have structural constraints'), so the routing guidance is helpful but not fully explicit.

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