Skip to main content
Glama

honest_did

Read-only

Computes honest confidence intervals for event-study/DID estimates under parallel-trends violations, using a fitted result and smoothness or relative-magnitude restrictions.

Instructions

Rambachan-Roth (2023) 'honest' DID sensitivity analysis. Operates on a fitted event-study / DID result: pass result_id from a prior sp.event_study / sp.callaway_santanna / sp.did_imputation / sp.sun_abraham fit run with as_handle=true (or use the honest_did_from_result tool, which auto-extracts the event-study coefficients). Returns honest confidence intervals under varying degrees of parallel-trends violation (smoothness or relative-magnitude restrictions). Call this when a pre-trend test rejects at low power instead of abandoning the design. Validation: certified parity evidence.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
eNoEvent-time period (post-treatment horizon) to build the honest CI for.
alphaNoSignificance level for the honest CI.
detailNoPayload depth; agent is the fullest.agent
m_gridNoGrid of M bounds on the parallel-trends violation to sweep.
methodNoRestriction family: 'smoothness' (second differences) or 'relative_magnitude'.smoothness
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.
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.3/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 and there is an output schema, so the bar is lower; the description still adds real context by stating the input must be a handled fit, naming the two restriction families, and noting the output is CIs robust to parallel-trends violations. It does not describe cost of sweeping large m_grids or the parity-evidence detail, but nothing material is missing or contradicted.

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?

Front-loaded with the method and purpose, then prerequisites, return value, and usage condition in a compact block with no filler. The second sentence is long and stacks four sibling fit names, which slightly taxes readability, but every clause carries information.

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?

Given an output schema, full annotation coverage, and twelve fully described parameters, the description supplies exactly the missing pieces: the prerequisite handle workflow, the sibling alternative, and the decision rule for when to reach for it. Only the cost/behavior of sweeping m_grid and how parity evidence is surfaced remain unstated.

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 coverage is 100% with enum and default documentation, so the schema carries the parameter burden and baseline is 3. The description does add provenance semantics for result_id (must come from a prior fit with as_handle=true) and names the restriction families matching the method enum, but adds nothing for the data_* inputs or max_output_bytes.

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?

Names the specific method (Rambachan-Roth 2023 honest DID sensitivity), the resource it operates on (a fitted event-study/DID result), and what it returns (honest confidence intervals under smoothness or relative-magnitude restrictions). It also explicitly contrasts itself with the sibling honest_did_from_result, so an agent can distinguish the two without opening either schema.

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?

Gives an explicit usage condition ('call this when a pre-trend test rejects at low power instead of abandoning the design') and names the concrete alternative path (honest_did_from_result, which auto-extracts coefficients) plus the prerequisite of a prior fit run with as_handle=true. That is when-to-use, when-to-use-the-other, and the precondition in three sentences.

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