Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

cluster_cross_interference

Read-only

Estimates direct and spillover treatment effects in cluster-randomized trials where treatment in neighboring clusters influences outcomes, using precomputed neighbor treatment shares.

Instructions

Cluster-randomised trial under cross-cluster interference (Ding et al. 2025). Estimates direct + spillover effects when treatment of one cluster affects outcomes in adjacent clusters. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Partial interference: spillovers operate within clusters but not across cluster boundaries; Exposure mapping correctly captured by neighbour_treat_share (user-precomputed share of treated neighbours); Cluster-level treatment is binary and randomized (cluster RCT). Pre-conditions: Cluster identifier column plus individual-level outcome; Cluster-level binary treatment column; Precomputed neighbour_treat_share column from spatial/network adjacency. Failure modes: neighbour_treat_share missing or not a valid 0-1 share -> Precompute the treated-neighbour share per cluster from your adjacency matrix before calling; Too few clusters for cluster-robust inference -> Increase the number of clusters or use a design with weaker cluster requirements. Alternatives: sp.inward_outward_spillover, sp.network_hte, sp.interference, sp.spillover. Typical minimum N: 30.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome variable column name or outcome array.
treatYesTreatment indicator or first-treatment-period column.
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
clusterYesCluster identifier column for clustered standard errors.
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.
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.
neighbour_treat_shareYesColumn with neighbours' treatment share

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
Behavior4/5

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

With annotations only providing readOnlyHint and openWorldHint, the description carries the transparency burden. It discloses modeling assumptions (partial interference, exposure mapping), failure modes, and pre-conditions. It does not describe the return structure or any side effects, but for a read-only estimator this is strong disclosure.

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 longer than average but well-organized into labeled sections (Validation, Assumptions, Pre-conditions, Failure modes, Alternatives). It front-loads the core purpose and method citation, and each labeled block earns its place by providing actionable guidance.

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 complex estimator with 10 parameters, assumptions, and failure modes, the description covers the essentials: what it does, when to use it, what inputs are required, and what can go wrong. The output schema covers return values, and remaining gaps (e.g., precise statistical formula details) are not necessary for correct invocation.

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 description coverage is 100%, which sets a baseline of 3. The description adds value by clarifying the key parameter's role ('user-precomputed share of treated neighbours') and the requirement that treatment is cluster-level and binary, helping the agent understand how cluster, treat, and neighbour_treat_share relate.

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 description states a specific verb and resource: 'Estimates direct + spillover effects when treatment of one cluster affects outcomes in adjacent clusters' under cluster-randomised interference. It cites the method (Ding et al. 2025) and explicitly lists alternatives, distinguishing it from siblings like sp.inward_outward_spillover and sp.spillover.

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?

It provides explicit pre-conditions (cluster column, binary treatment, precomputed neighbour_treat_share), failure modes with remediation (precompute share, increase number of clusters), and a named alternatives list. This leaves little ambiguity about when to use this tool versus related tools.

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