Skip to main content
Glama

get_canonical_example

Retrieve validated causal DAGs from the engine's test suite by ID for few-shot prompting, regression checks, and teaching. Ensures analyze_dag output matches expected values.

Instructions

Return one of the canonical validated DAGs from the engine's test suite by ID (T01–T15 for backdoor / adjustment-set canonical structures, EM01–EM20 for effect-modification structures from VanderWeele-Robins 2007 and Weinberg 2007). Useful for few-shot prompting, regression checks, and teaching. The returned DAG is the same one the engine is validated against, so analyze_dag's output on it will match the listed expected values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTest ID. Main-suite IDs are T01–T15; effect-modification IDs are EM01–EM20.
Behavior4/5

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

With no annotations, the description carries the transparency burden and does well by stating the DAG is canonical, validated, and identical to the one used for engine validation, making downstream analyze_dag output predictable. It does not describe error behavior or the exact return format, but as a simple getter it provides meaningful behavioral context beyond just 'returns a DAG.'

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 sentences, each earning its place: the first states what is returned and the ID families, the second gives use cases, and the third explains the useful property of matching validated expected values. No filler or redundancy; information density is high and front-loaded.

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?

For a single-parameter getter with no output schema and no annotations, the description is largely sufficient: it covers scope, ID format, use cases, and the relationship to analyze_dag. It stops short of specifying the exact return representation (e.g., dagitty string vs. JSON object), which is a minor gap for an agent expecting to consume the DAG.

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?

The schema already describes the id parameter with 100% coverage, including the T/EM ranges, so baseline is 3. The description adds semantic depth by explaining that T IDs correspond to backdoor/adjustment-set structures and EM IDs to effect-modification structures from specific references, and by noting the validation relationship with analyze_dag.

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 uses a specific verb ('Return') and clearly identifies the resource ('canonical validated DAGs from the engine's test suite') with explicit ID ranges (T01–T15, EM01–EM20). This distinguishes it from sibling tools like analyze_dag or parse_dagitty, which operate on rather than retrieve canonical examples.

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?

It provides clear usage context: 'few-shot prompting, regression checks, and teaching.' It also notes that returned DAGs are the ones the engine is validated against, implying use for testing analyze_dag against expected values. No explicit exclusions or alternatives are given, but the intended use cases are clear.

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