Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

network_exposure

Read-only

Estimate causal effects under network interference using a Horvitz-Thompson estimator with user-supplied exposure mappings. Handles Bernoulli randomization with conservative variance.

Instructions

Aronow-Samii Horvitz-Thompson estimator for arbitrary interference via a user-supplied exposure mapping. Handles Bernoulli randomisation designs with simulated conservative variance. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Known limitations: design='complete' is reserved but not implemented; passing it raises NotImplementedError. Use design='bernoulli' with p_treat=K/N as an approximation only if that matches the assignment mechanism you are willing to assume. Assumptions: Exposure mapping is correctly specified (as4 / as3 / as2 -- Aronow-Samii hierarchy); Positivity: every exposure level has positive probability under the design; Network adjacency is fixed / known (measurement error in ties introduces bias). Pre-conditions: adjacency is a binary n x n matrix encoding network ties; Y, Z have same length n; randomisation design is known (bernoulli with p_treat, or complete). Failure modes: Some exposure level has < 5 observed units -> Switch to a coarser mapping (as4 -> as3) or increase sample size; Variance estimate extremely conservative (wide CI) -> HT-style variance is conservative by design -- use sp.spillover for...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
YYesOutcome vector
ZYesTreatment vector (0/1)
n_simNoNumber of sim.
designNoRandomisation designbernoulli
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
mappingNoExposure mappingas4
p_treatNoMarginal treatment probability
adjacencyYesAdjacency matrix (n x n) or sparse
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.
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

A3.9/5.0
Behavior5/5

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

The description goes far beyond the readOnlyHint annotation. It details validation tiers, known limitations (complete design not implemented), assumptions (correct exposure mapping, positivity, fixed adjacency), pre-conditions (binary matrix, same lengths, known design), and failure modes (low exposure cell counts, conservative variance). This gives an agent a rich understanding of the tool's behavior and edge cases.

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 long but well-structured with labeled sections (Validation, Known limitations, Assumptions, Pre-conditions, Failure modes). Each sentence adds substantive information for a complex estimator. It is front-loaded with the core purpose and then provides necessary details. It earns its length, though it could be tightened slightly.

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 tool with 13 parameters and complex statistical assumptions, the description covers essential context: estimator type, assumptions, pre-conditions, limitations, and failure modes. It does not describe return values, but an output schema exists, so that is not a gap. It is reasonably complete for an agent to decide whether and how to call it.

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 all parameters are documented in the schema. The description adds some context about p_treat and design (e.g., approximation conditions), but it does not provide additional semantics for each parameter beyond what the schema already states. The description adds marginal value over the schema, so a baseline 3 is appropriate.

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 clearly states the tool computes an Aronow-Samii Horvitz-Thompson estimator for arbitrary interference with a user-supplied exposure mapping. It names a specific estimator and method, so the purpose is unambiguous. However, it does not explicitly contrast with sibling tools like 'spillover' or 'interference', so it doesn't fully distinguish from alternatives.

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 provides some usage conditions: it warns that design='complete' is not implemented and raises NotImplementedError, and it advises using design='bernoulli' only if the assignment mechanism matches. It also gives failure-mode guidance (switch to coarser mapping or increase sample size). But it never explicitly says when to choose this tool over siblings or names alternatives, leaving the selection logic implicit.

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