Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

pretrends_slope_for_power

Read-only

Compute the minimum detectable slope of a linear pre-trend given target power and significance, using event-study estimates and pre-period covariance to evaluate pre-trend test sensitivity.

Instructions

Slope of a linear pre-trend the pre-test would detect target_power Validation: certified parity evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNoWhich pre-test to solve against; see :func:`pretrends_power`.individual
alphaNoSignificance level of the pre-test.
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
resultYesEvent-study result with pre-treatment estimates and SEs. As with :func:`pretrends_power`, supply the full pre-period covariance via ``model_info['vcv_pre']`` -- the diagonal fallback overstates the detectable slope.
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.
target_powerNoPower the returned slope achieves. 0.5 is the ``pretrends``
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

C2.4/5.0
Behavior2/5

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

With readOnlyHint=true and openWorldHint=false, annotations already cover the safety profile, but the description adds no operational behavior such as computation mode, cache behavior, or data requirements. The 'Validation: certified parity evidence' note is not a behavioral disclosure and may be read as an unrelated validation tag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, but the first sentence is only a fragment and the second sentence, 'Validation: certified parity evidence,' is not a usable instruction. This is under-specification rather than disciplined concision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a specialized ten-parameter pretrends function with many sibling tools, the description is not complete enough: it names the output concept but omits when to use it, what inputs are required, and how it relates to pretrends_power. The rich schema and safe annotations mitigate this, but the description itself still leaves selection and invocation to inference.

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 baseline is 3; the description does not need to re-document the ten parameters. It only reinforces the role of target_power within its sentence, adding little beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The phrase 'Slope of a linear pre-trend the pre-test would detect ``target_power``' identifies the output as a detectable slope for a target power, but it is a noun phrase rather than an explicit 'computes/returns' action. The appended 'Validation: certified parity evidence' fragment obscures rather than clarifies the purpose, so an agent must infer the tool's behavior from its name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given for when to call this tool versus sibling pre-trend functions such as pretrends_power, pretrends_test, or pretrends_equivalence. There is also no mention of the required event-study result or full covariance precondition; that is left entirely to the schema.

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