Skip to main content
Glama
LiLara-AI

ShadowGraph

Official

shadowgraph_traverse

Read-onlyIdempotent

Walk relationship links from an entity ID to reveal connected memory nodes within a project and scope.

Instructions

Walk relationships outward from one entity id and return what is reached. Find ids first with shadowgraph_search or shadowgraph_recall; shadowgraph_retrieve searches content and adds neighbours. Reads only. Memory outside the requested project and scope stays hidden.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesEntity id to start from. Must exist.
depthNoHow many relationship hops to follow, 1-10. Defaults to 1. Anything outside the range is rejected.
scopeNoScope selector. Omitted or partial fields mean explicit nulls, not "any": identity is the exact (project, userId, agentId, runId, memoryType, key) tuple, so a run-scoped memory never leaks into a user-only read.
projectNoProject whose memory nodes are visible during the walk. Defaults to "default"; decisions, facts, and attempts are not filtered by it.
relationNoFollow only relationships with this exact name. Omit to follow all of them.
directionNoout follows relationships whose from is in the frontier, in follows their to, both follows either. Defaults to both.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYesThe entity the walk started from.
depthYesThe hop limit that was applied.
nodesYesEntities reached, root first. Mixed kinds, including alternatives synthesised from their decision.
directionYesThe direction that was applied.
relationsYesRelationships traversed. Named relations, not "edges".

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed7 schema fields changedv0.40.1
    • addedInput schema / properties / depth / description
      Added value: +"How many relationship hops to follow, 1-10. Defaults to 1. Anything outside the range is rejected."
    • addedInput schema / properties / direction / description
      Added value: +"out follows relationships whose from is in the frontier, in follows their to, both follows either. Defaults to both."
    • addedInput schema / properties / id / description
      Added value: +"Entity id to start from. Must exist."
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Project whose memory nodes are visible during the walk. Defaults to \"default\"; decisions, facts, and attempts are not filtered by it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / relation / description
      Added value: +"Follow only relationships with this exact name. Omit to follow all of them."
    • addedInput schema / properties / scope
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Scope selector. Omitted or partial fields mean explicit nulls, not \"any\": identity is the exact (project, userId, agentId, runId, memoryType, key) tuple, so a run-scoped memory never leaks into a user-only read.",
      +  "properties": {
      +    "agentId": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Agent this memory belongs to, or null for none."
      +    },
      +    "runId": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Single run or task this memory belongs to, or null for none."
      +    },
      +    "userId": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Person this memory belongs to, or null for none."
      +    }
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The reachable subgraph.",
      +  "properties": {
      +    "depth": {
      +      "description": "The hop limit that was applied.",
      +      "maximum": 10,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "direction": {
      +      "description": "The direction that was applied.",
      +      "enum": [
      +        "in",
      +        "out",
      +        "both"
      +      ],
      +      "type": "string"
      +    },
      +    "nodes": {
      +      "description": "Entities reached, root first. Mixed kinds, including alternatives synthesised from their decision.",
      +      "items": {
      +        "description": "One stored entity: a decision, attempt, memory, fact, or alternative. Fields vary by kind, and an entity imported from an older schema may carry fewer of them.",
      +        "properties": {
      +          "actor": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Who performed the write."
      +          },
      +          "client": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Which client performed the write."
      +          },
      +          "createdAt": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "ISO 8601 creation time."
      +          },
      +          "id": {
      +            "description": "Stable entity identifier.",
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +            "type": "string"
      +          },
      +          "project": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Project namespace; records imported from a schema that predates projects may carry null."
      +          },
      +          "schemaVersion": {
      +            "description": "Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded.",
      +            "type": "integer"
      +          },
      +          "sessionId": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Session identifier recorded with the write."
      +          },
      +          "sourceClass": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Claimed origin class recorded with the write. A claim, never proof."
      +          },
      +          "sourceRaw": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The original origin label when it differed from sourceClass. Audit only; never evidence."
      +          },
      +          "updatedAt": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "ISO 8601 time of the last change."
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "relations": {
      +      "description": "Relationships traversed. Named relations, not \"edges\".",
      +      "items": {
      +        "description": "A stored relationship between two entities.",
      +        "properties": {
      +          "actor": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Who performed the write."
      +          },
      +          "client": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Which client performed the write."
      +          },
      +          "createdAt": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "ISO 8601 creation time."
      +          },
      +          "from": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Source entity identifier."
      +          },
      +          "id": {
      +            "description": "Stable entity identifier.",
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +            "type": "string"
      +          },
      +          "project": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Project namespace; records imported from a schema that predates projects may carry null."
      +          },
      +          "relation": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Relationship name, such as depends_on or supersedes."
      +          },
      +          "schemaVersion": {
      +            "description": "Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded.",
      +            "type": "integer"
      +          },
      +          "sessionId": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Session identifier recorded with the write."
      +          },
      +          "sourceClass": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Claimed origin class recorded with the write. A claim, never proof."
      +          },
      +          "sourceRaw": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "The original origin label when it differed from sourceClass. Audit only; never evidence."
      +          },
      +          "temporal": {
      +            "description": "Bi-temporal window for the relationship.",
      +            "type": "object"
      +          },
      +          "to": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Target entity identifier."
      +          },
      +          "updatedAt": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "ISO 8601 time of the last change."
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "from",
      +          "to",
      +          "relation"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "root": {
      +      "description": "The entity the walk started from.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "root",
      +    "direction",
      +    "depth",
      +    "nodes",
      +    "relations"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.40.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description adds a meaningful behavioral boundary: memory outside the requested project and scope stays hidden. This goes beyond the annotations and clarifies the privacy/visibility model.

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 tightly written sentences with no filler. The purpose is front-loaded, followed by sibling routing, then the read-only and scope-boundary behavior. Every sentence earns its place.

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?

With a rich output schema and strong annotations, the description covers what is needed for selection and invocation: prerequisites, alternative tools, and the scope-privacy boundary. Minor gaps like result shape are already addressed by the output schema.

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 description coverage is 100%, and each parameter already has detailed semantic documentation. The description only adds context for the starting id; depth, scope, relation, and direction semantics are fully handled by the schema, so baseline 3 is appropriate.

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?

Description states a specific action and resource: walking relationships outward from one entity id and returning what is reached. It also distinguishes itself from siblings by directing the agent to shadowgraph_search or shadowgraph_recall for finding ids and noting shadowgraph_retrieve's content-plus-neighbors behavior.

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?

Provides clear routing guidance: find ids first with shadowgraph_search or shadowgraph_recall, and use shadowgraph_retrieve when content search plus neighbors is needed. It does not exhaustively state when not to use the tool, but the context is strong enough for correct selection.

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

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/LiLara-AI/shadowgraph'

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