Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

synthdid_plot

Read-only

Plot observed vs synthetic trajectories to diagnose synthetic control fit and support causal analysis.

Instructions

Plot observed vs synthetic trajectory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axNoax parameter.
titleNotitle parameter (Optional[str]).
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
resultYesOutput of :func:`sdid`.
figsizeNofigsize parameter (Tuple[float, float]).
ci_alphaNoci_alpha parameter (float).
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.
synth_colorNosynth_color parameter (str).#E74C3C
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
treated_colorNotreated_color parameter (str).#2C3E50

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations indicate readOnlyHint=true, and the description 'Plot' is consistent with a read-only action, so there's no contradiction. The description adds minimal behavioral transparency beyond a plot action; it does not disclose that it likely requires a fitted result from sdid, that it may produce a figure object, or how it handles errors. Given annotations cover safety, a 3 is appropriate because the description is clear but lacks depth.

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?

The description is a single sentence with no unnecessary words. It is concise and front-loads the core action. It earns a 5 for zero waste.

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 that the tool has a detailed schema and an output schema info not shown, but required params are minimal (result), the description is adequate for an agent to understand the basic function. However, it misses context on the required input (a result from sdid) and the typical usage pattern (chain from sdid or synthdid_estimate). The description is complete enough for a simple plot tool, but could mention that it expects a result object from :func:`sdid`. Since no explicit output schema is shown but indicated, the description is reasonably complete.

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?

The schema has 100% coverage, with detailed descriptions for parameters like 'result', 'ax', 'title', 'detail', etc. The description itself adds no parameter-specific semantics; it just states the plot action. The schema already explains each parameter, so the baseline 3 is appropriate. The description does not compensate with additional clarity beyond the schema.

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 'Plot observed vs synthetic trajectory.' clearly states the tool's purpose: to generate a plot comparing observed and synthetic trajectories. It specifies the verb 'plot' and the resources involved (observed vs synthetic), which is clear. However, it does not explicitly differentiate from sibling tools like synthplot, synthdid_rmse_plot, or synthdid_units_plot, which are also plotting tools. Given the name synthdid_plot, the purpose is understood but the distinction from similar siblings is not explicit.

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?

The description does not indicate when to use this tool versus alternatives. It does not mention the context (e.g., after running synthdid_estimate) or contrast with similar plotting tools such as synthplot, synthdid_rmse_plot, or synthdid_units_plot. Sibling tools exist that serve overlapping functions, but no guidance is provided.

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