Skip to main content
Glama

preflight

Read-only

Validate a dataset's design assumptions before fitting a causal method, returning PASS/WARN/FAIL to surface issues such as overlap, cohort sizes, IV strength, and cutoff density.

Instructions

Run pre-fit identification checks for a chosen method on a DataFrame. Verdict in {PASS, WARN, FAIL}. ALWAYS call this before fitting on an unfamiliar dataset to surface design problems (overlap, cohort sizes, IV first-stage F, running-variable density at the cutoff).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "method": "<method>"
    },
    "name": "preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
yNoOutcome column.
idNoUnit id column.
timeNo
cohortNo
detailNoPayload depth; agent is the fullest.agent
methodYesEstimator name: 'did', 'rd', 'iv', 'synth', 'matching', 'dml', ...
data_idNoData handle (d_...) from load_data; replaces data_path.
data_csvNoSmall inline table as CSV text.
as_handleNoCache the fit and return its result_id.
data_pathNoAbsolute path of a data file on the server.
result_idNoHandle of an earlier fit made with as_handle=true.
treatmentNo
covariatesNo
instrumentNo
running_varNo
data_recordsNoSmall inline table as row objects.
max_output_bytesNoResult byte budget (default 262144; 0 = none).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the description needn't prove it is safe. It adds real behavioral content beyond that: the three-valued verdict, and the specific diagnostics it surfaces (overlap, cohort sizes, IV first-stage F, running-variable density at the cutoff), which tells the agent what a WARN or FAIL actually means. It does not say whether the checks are method-specific subsets or how a verdict is rolled up across multiple failed checks.

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?

Three sentences with the action first, the return contract second, and the call-condition last. No repetition of schema fields and no filler.

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?

An output schema and annotations exist, and the description covers purpose, return contract, and the trigger condition, which is the core an agent needs. For a 17-parameter tool it is slightly thin on how inputs vary by method and on the four alternative data-source parameters, though the schema documents those.

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?

With 17 parameters at 65% schema coverage, the schema does most of the work and the baseline is 3. The description adds indirect meaning by naming diagnostics that map to parameters (IV first-stage F implies instrument, running-variable density implies running_var, cohort sizes imply cohort), but it never explains inputs, the data-source options, or method-dependent parameter relevance directly.

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?

States a specific verb and resource ('Run pre-fit identification checks ... on a DataFrame') and names the output form (verdict in PASS/WARN/FAIL). It is clear about what the tool does but never differentiates itself from the closely named siblings check_identification, detect_design, or audit, so an agent must infer the boundary.

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?

Gives an explicit, emphatic when-to-use rule: 'ALWAYS call this before fitting on an unfamiliar dataset.' That is strong positive guidance, but there is no when-not-to-use (e.g., familiar data, or after a prior PASS) and no alternative tool is named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.