Skip to main content
Glama
dave1362

RCA-MCP Connector

rca_graph_score_paths

Read-onlyIdempotent

Rank causal paths from root causes to a target incident node by confidence, edge weight, and path length to identify the strongest manually-asserted causal chains in a graph.

Instructions

Find and rank all causal paths from every root (no-incoming-edge) node to a target incident node. Score = geometric-mean(edge weights) × avg_confidence / sqrt(hops) — shorter, higher-weight, higher-confidence paths rank above longer or weaker ones.

Use this on a graph you've built by hand (rca_graph_create + rca_graph_add_edge) to see which manually-asserted causal chains are strongest. For a data-driven ranking instead of a hand-built graph, use rca_analysis_run with a model family like granger_causality or dowhy_causal_inference instead.

Args: params (PathScoreInput): - graph_id: the graph to search - target_node: the incident/effect node to trace backward from (must exist in the graph; check with rca_graph_get) - top_k: how many top-ranked paths to return, 1-50 (default 10)

Returns: str: JSON {target_node, paths_found, top_paths: [ScoredPath, ...]} ranked by score descending; empty list if no path from any root node reaches the target

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.1.15
    • addedInput schema / $defs / PathScoreInput / properties / client_id / description
      Added value: +"Client namespace ID"
    • addedInput schema / $defs / PathScoreInput / properties / token / description
      Added value: +"API key to authenticate this request"
  2. Changed1 schema field changedv4.1.14
    • addedInput schema / $defs / PathScoreInput / properties / graph_id / description
      Added value: +"Graph to search"
  3. First observedv4.1.13

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool read-only, idempotent, and non-destructive; the description adds the scoring formula, the root-node precondition, backward tracing semantics, and empty-list behavior when no path exists. It also notes that target_node must already exist in the graph, giving a useful precondition beyond what annotations convey.

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 compact and front-loaded: action first, then scoring formula, then a short usage rule, then a bulleted argument list, then the return contract. There is no filler and no repetition of information already carried by annotations.

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

Completeness5/5

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

Given the tool's complexity, the description covers the algorithm, scoring, prerequisites, the manual-graph use case, the alternative tool, and empty-result behavior. The output schema exists and the description still summarizes the return shape, leaving no obvious gap for an agent to call it correctly.

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?

With schema description coverage at 0%, the description compensates well for graph_id, target_node, and top_k by explaining what the graph is searched for, requiring target_node to exist, and giving top_k's range and default. It does not restate token/client_id, though those are auth/namespace fields already present in the schema, so the gap is minor.

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 opens with a specific action ('Find and rank all causal paths') tied to a concrete resource (root-to-target paths in an RCA graph) and a precise scoring formula. It distinguishes the tool from data-driven analysis by naming rca_analysis_run as the alternative, so an agent can select it without inspecting siblings.

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?

Explicitly states when to use: on a hand-built graph created via rca_graph_create + rca_graph_add_edge, to compare manually asserted causal chains. It also gives a clear exclusion: for data-driven ranking use rca_analysis_run with granger_causality or dowhy_causal_inference instead, and directs checking target existence with rca_graph_get.

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