Skip to main content
Glama

detect_design

Read-only

Infers the study design (panel, cross-section, RD, or IV-style) from column shapes and types, returning the guess and the columns that drove it. Run it first when a pasted CSV lacks context.

Instructions

Auto-detect the study design (panel / cross-section / RD / IV-style) from column shapes and types. Returns the guessed design plus the columns that drove the inference. Call this BEFORE recommend() when the user pastes a CSV with no context.

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": "detect_design"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNoPayload depth; agent is the fullest.agent
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.
id_col_hintNoUnit id column.
data_recordsNoSmall inline table as row objects.
time_col_hintNoTime column.
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.2/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 known and the description correctly avoids contradicting it. What it adds — that inference is heuristic and returns the driving columns — is useful, but it says nothing about what happens with ambiguous or mixed signals (confidence, ties, fallback) or that id_col_hint/time_col_hint can override the guess.

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 short sentences, zero filler: what it does, what it returns, when to call it — in that order. The actionable sequencing constraint is placed where an agent will read it, with no restatement of the tool name or schema.

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?

The output schema and rich annotations carry the return shape and safety profile, so the description needn't repeat them, and it does cover the primary zero-context path end to end. The gap is the non-primary paths available in the ten-parameter schema — result_id/as_handle caching and explicit column hints — which go unmentioned for a fairly broad input surface.

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%, so the baseline is 3; the description rises above it by framing the tool as operating on externally supplied data shapes, which implicitly explains the data_path/data_csv/data_records family. It still leaves the interplay between the id_col_hint/time_col_hint parameters and the auto-detection logic unstated, which is the one parameter behavior worth calling out.

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?

It gives a specific verb and object ('Auto-detect the study design') and enumerates the exact design classes it can return (panel / cross-section / RD / IV-style). It also states the output ('guessed design plus the columns that drove the inference') and explicitly positions itself relative to the sibling recommend(), so an agent can tell it apart from the pipeline_* tools.

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?

The when-to-use rule is explicit: call it BEFORE recommend() when a CSV arrives with no context. The ordering constraint is the most important guidance an agent needs. It stops short of stating the inverse condition (skip it when the user already names a method or passes data_id from a prior describe_data), so it is clear but not fully exhaustive.

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