Skip to main content
Glama

pipeline_iv

Read-only

Runs end-to-end instrumental-variable analysis: IV regression, first-stage strength diagnostics, Anderson-Rubin intervals, and e-values, returning a markdown report and result ID.

Instructions

End-to-end IV workflow: ivreg -> first-stage F (effective + Olea-Pflueger) -> Anderson-Rubin CI -> e-value. Returns one markdown report + result_id.

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": {
      "formula": "<formula>"
    },
    "name": "pipeline_iv"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNoPayload depth; agent is the fullest.agent
data_idNoData handle (d_...) from load_data; replaces data_path.
formulaYes'y ~ x_exog + (d_endog ~ z_instrument)' style.
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

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description usefully adds that the output is a single markdown report plus a result_id, but it does not explain the as_handle caching behavior it references, the byte budget, or how failure in a mid-pipeline stage is reported. Note the description says it 'returns ... result_id' unconditionally, while as_handle defaults to false, which may mislead slightly about default output.

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?

Two terse sentences, front-loaded with the pipeline stages and followed by the return contract. No filler; every clause conveys distinct 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?

With a full output schema, complete parameter coverage, and read-only annotations, the description supplies the missing piece: what the pipeline composes and what it returns. It is nearly complete; only the relationship to sibling estimators and the multi-input data sourcing options (data_id vs data_path vs inline) are left unaddressed.

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 every one of the nine parameters is already documented in the schema. The description adds no parameter-level detail beyond the arrow notation hinting at the formula syntax, which the schema already spells out. Baseline 3 applies when the schema does the heavy lifting.

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 names a concrete verb+resource ('End-to-end IV workflow') and enumerates the exact chained stages (ivreg -> first-stage F with effective and Olea-Pflueger -> Anderson-Rubin CI -> e-value). This clearly separates it from the single-step siblings iv and ivreg. It stops short of stating the resource/estimand explicitly beyond 'IV', but the stage list is specific enough to identify the tool.

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?

Usage is only implied by the word 'End-to-end': an agent can infer this is the bundled pipeline versus the granular ivreg/iv siblings. There is no explicit 'use this when you want all diagnostics in one call, use ivreg when you need a single stage' statement, and no prerequisites (e.g., data must be loaded) are given.

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