Skip to main content
Glama

classify_effect_modification

Classify effect-modification structures in causal DAGs into five types—direct, indirect, common-cause, proxy, pure-interaction—to clarify whether subgroup effects are interpretable as pure modification or require adjusted estimands.

Instructions

For each modifier annotation on the DAG, classify the effect-modification structure per VanderWeele & Robins (2007) and Weinberg (2007). The five types and their regulatory implications: • direct — modifier is structurally independent of the E-D system; subgroup-specific effects are interpretable as pure modification. • indirect — modifier acts through a mediator; subgroup effects conflate modification with mediation. • common-cause — modifier shares an ancestor with the exposure; subgroup effects are confounded unless the ancestor is also adjusted. • proxy — modifier is unobserved; subgroup analyses rest on a downstream proxy. • pure-interaction — modifier has a direct edge to the outcome; the appropriate estimand is the joint effect, not a subgroup-specific effect (Weinberg 2007).

Outputs are conditional on the encoded structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dagYesCanonical DAG with modifiers populated.
Behavior3/5

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

With no annotations available, the description carries the full burden. It discloses the five classification categories and their meanings, which is valuable behavioral context. However, it does not state what the function actually returns (e.g., a map, list, or report), nor does it mention whether it is read-only, what happens if the DAG lacks modifiers, or any assumptions about the input structure. 'Outputs are conditional on the encoded structure' is vague.

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?

The description begins with a clear one-sentence purpose, followed by a structured bullet list of the five classification types. While it is lengthy, the complexity of the taxonomy justifies the detail. The text is well-organized and front-loaded with the main verb and resource.

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

Completeness3/5

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

The tool has no output schema, so the description should compensate by explaining return values and behavior. It explains the classification types thoroughly but does not describe the output format, how results are per-modifier, or edge cases like DAGs without modifiers. Given the moderate complexity, the description is adequate but not 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 already describes the 'dag' parameter as 'Canonical DAG with modifiers populated', and coverage is 100%. The description adds context by saying 'For each modifier annotation on the DAG', which clarifies that the input must contain annotations, but this is a minor addition beyond the schema. The description focuses more on output taxonomy than on parameter semantics.

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?

The description clearly states the tool's verb ('classify') and resource ('modifier annotation on the DAG'), and differentiates it from siblings by focusing on effect-modification structure. It specifies the classification framework (VanderWeele & Robins 2007, Weinberg 2007), making the purpose precise and unambiguous.

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?

The description implies when to use the tool (when you have a DAG with modifier annotations), but it does not explicitly contrast it with sibling tools like analyze_dag or check_overadjustment. There is no 'use this when' or 'for other analyses see X' guidance, so the agent is left to infer the tool's niche.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Black-Swan-Causal-Labs/dagstudio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server