Skip to main content
Glama

query_intervention

Compute counterfactual downstream probabilities after intervening on a target value. Read-only: severs incoming edges and propagates along cause edges to show affected descendants.

Instructions

Counterfactual query P(downstream | do(target = value)). Severs the target's incoming edges and propagates along CAUSES edges only. READ-ONLY: returns projected probabilities for causal descendants; does NOT modify the graph. Use for 'if I change X, what downstream is affected?' — distinct from query_relevant (evidential association) and propagate_from (which mutates).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
valueYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses read-only status, that it severs incoming edges, propagates along CAUSES edges only, returns projected probabilities, and does not modify the graph. It does not cover error behavior (e.g., unknown id) or performance characteristics, keeping it short of a 5.

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?

Opens with the formal definition, then the graph mechanic, then the read-only guarantee, then the routing sentence. Dense but every sentence carries distinct, load-bearing information with no filler.

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?

No output schema or annotations exist, so the description must explain behavior and returns; it does explain the returned projected probabilities for causal descendants. It is largely sufficient for a two-param tool, missing only edge-case/error handling detail.

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 coverage is 0%, so the description must compensate. It maps the do(target = value) notation onto the two params conceptually, but never clarifies what 'id' actually references (belief name, UUID, etc.) or how it is resolved, leaving a real gap for the caller.

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?

States a precise operation (counterfactual intervention query) with the formal semantics P(downstream | do(target = value)) and the exact graph operation performed. Explicitly names the sibling tools it differs from, so an agent can select it without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit user-facing trigger phrase ('if I change X, what downstream is affected?') and distinguishes itself from two named alternatives: query_relevant (evidential association) and propagate_from (which mutates). When-to-use, when-not, and alternative selection are all covered.

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