Skip to main content
Glama

Explain graph node

explain_node
Read-onlyIdempotent

Trace the origin of a lesson or recommendation by displaying one Experience Graph node with its direct relations and typed edges to related tasks, executions, and outcomes.

Instructions

Show one Experience Graph node with its direct relations. Returns: structured 'root', 'nodes' (Task, Execution, ToolCall, Outcome, Experience, Lesson, Context or CandidatePath and their stored fields) and typed 'edges' (used, caused, failed_with, resolved_by, recommended_for). Embeddings are omitted. Use when: tracing why a lesson or recommendation exists, after finding an id with search_experience or get_execution_context. Not for: searching by topic (use search_experience). Side effects: none; read-only. Errors: an MCP error reports 'Unknown graph node' for an id that does not exist, and an MCP error is returned until the project is approved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idYesId of an Experience Graph node: an experience id from search_experience (starts with 'exp-'), the execution id from get_execution_context, or any node id from an earlier explain_node result.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYesId of the graph node that was requested.
edgesYesDirect typed relationships to or from the root node.
nodesYesThe root node and directly related nodes; embeddings are omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.5.1
    • addedInput schema / properties / node_id / maxLength
      Added value: +160
    • addedInput schema / properties / node_id / minLength
      Added value: +1
    • addedOutput schema / $defs
      Added value: +{
      +  "GraphEdge": {
      +    "properties": {
      +      "relation": {
      +        "description": "Typed relationship between the source and target nodes.",
      +        "enum": [
      +          "used",
      +          "caused",
      +          "failed_with",
      +          "resolved_by",
      +          "recommended_for"
      +        ],
      +        "title": "Relation",
      +        "type": "string"
      +      },
      +      "source": {
      +        "description": "Source node id.",
      +        "title": "Source",
      +        "type": "string"
      +      },
      +      "target": {
      +        "description": "Target node id.",
      +        "title": "Target",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "source",
      +      "relation",
      +      "target"
      +    ],
      +    "title": "GraphEdge",
      +    "type": "object"
      +  },
      +  "GraphNode": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "id": {
      +        "description": "Stable node id within this project's local Experience Graph.",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "kind": {
      +        "description": "Experience Graph node type.",
      +        "enum": [
      +          "Task",
      +          "Context",
      +          "CandidatePath",
      +          "Execution",
      +          "ToolCall",
      +          "Outcome",
      +          "Experience",
      +          "Lesson"
      +        ],
      +        "title": "Kind",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "id"
      +    ],
      +    "title": "GraphNode",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / edges
      Added value: +{
      +  "description": "Direct typed relationships to or from the root node.",
      +  "items": {
      +    "$ref": "#/$defs/GraphEdge"
      +  },
      +  "title": "Edges",
      +  "type": "array"
      +}
    • addedOutput schema / properties / nodes
      Added value: +{
      +  "description": "The root node and directly related nodes; embeddings are omitted.",
      +  "items": {
      +    "$ref": "#/$defs/GraphNode"
      +  },
      +  "title": "Nodes",
      +  "type": "array"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • addedOutput schema / properties / root
      Added value: +{
      +  "description": "Id of the graph node that was requested.",
      +  "title": "Root",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "root",
      +  "nodes",
      +  "edges"
      +]
    • changedOutput schema / title
      Previous value: -"explain_nodeOutput"New value: +"ExplainNodeResult"
  2. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / node_id / description
      Added value: +"Id of an Experience Graph node: an experience id from search_experience (starts with 'exp-'), the execution id from get_execution_context, or any node id from an earlier explain_node result."
  3. First observedv0.1.3

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description reinforces with 'Side effects: none; read-only.' It also adds non-redundant behavioral details: embeddings are omitted, and error behavior (unknown id yields 'Unknown graph node', and errors until project approval) is disclosed. This exceeds the annotation baseline.

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 is compact and well-structured with labeled sections (Returns:, Use when:, Not for:, Side effects:, Errors:). The main purpose is front-loaded, and every section contributes either to usage or safety. Slightly verbose but efficient.

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 an output schema exists (per context signals), the description needn't enumerate return fields, but it summarizes types (root, nodes, edges) and omissions (embeddings). It also covers error conditions and usage context, making it complete for a single-parameter read-only tool. Minor gap: output schema description is not in the text, but that is acceptable.

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 100% and the parameter description for node_id already explains valid id sources (experience id, execution id, or previous explain_node result). The description adds little beyond reusing this guidance, so it stays at the baseline for well-covered schemas.

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 states a specific verb+resource ('Show one Experience Graph node') and explicitly differentiates from the sibling search_experience in 'Not for: searching by topic'. The return structure (root, nodes, edges) is also outlined, making the tool's exact scope unambiguous.

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?

The description provides explicit 'Use when' guidance ('tracing why a lesson or recommendation exists, after finding an id with search_experience or get_execution_context') and a clear exclusion ('Not for: searching by topic (use search_experience)'), giving agents a definitive decision rule among siblings.

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