Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

llm_unobserved_confounders

Read-only

Enumerate plausible unobserved confounders that could bias causal estimates, enabling sensitivity analysis and falsification checks before drawing conclusions.

Instructions

Enumerate plausible unobserved confounders for a study. 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
clientNoLLM client with ``.complete(prompt: str) -> str``.
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
domainNodomain parameter (str).health
outcomeYesFree-text descriptions (used by LLM, ignored by heuristic).
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.
treatmentYesFree-text descriptions (used by LLM, ignored by heuristic).
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.
point_estimate_rrNoObserved risk ratio; suggested E-values are scaled relative to this so the user can read "to nullify a RR of X you'd need an unobserved RR of Y".

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?

With readOnlyHint=true already covering the safety profile, the description adds substantial behavioral context: the assumption that LLM-proposed graphs are only hypotheses requiring validation, pre-conditions for reproducibility, and explicit failure modes with remediation steps ('Proposals are unstable... -> Fix the model release and seed, add constraints...'). This goes far beyond what annotations provide, giving the agent operational awareness of potential pitfalls and how to respond.

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 well-structured and front-loaded: the purpose appears in the first sentence, followed by logically labeled sections (Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N). Every sentence adds distinct value—safety caveats, prerequisites, troubleshooting, and routing—without redundancy. The length is justified given the tool's complexity.

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?

Given the tool's complexity (11 parameters, output schema provided, rich annotations), the description covers everything an agent needs to decide when to call this tool and what to expect: purpose, usage boundaries, preconditions, failure modes, and alternatives. The output schema handles return details, so no further description is necessary. The inclusion of 'Typical minimum N: 1' and provider requirements rounds out the context comprehensively.

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%, so the schema fully documents all 11 parameters. The description reinforces that a 'domain context' and 'bounded list of candidate variables' are needed, which maps loosely to the domain and data_columns parameters, but it adds no new semantic detail about individual parameters beyond what the schema already provides. 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, 'Enumerate plausible unobserved confounders for a study,' uses a specific verb ('enumerate') and a clear resource ('plausible unobserved confounders'), making the tool's purpose immediately obvious. It distinguishes itself from nearby siblings like llm_dag_propose and llm_sensitivity_priors by focusing on confounders rather than DAGs or prior elicitation, though it does not explicitly name those siblings.

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 explicit pre-conditions ('Domain context and a bounded list of candidate variables; A configured, logged LLM provider') that tell an agent when this tool is appropriate. It also names three alternatives (sp.llm_dag_constrained, sp.causal_discovery, sp.dag), giving some routing context. However, it does not explicitly explain when to choose each alternative over this tool, and the listed alternatives are not the most closely related siblings (llm_dag_propose, llm_sensitivity_priors), which slightly weakens the 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