Skip to main content
Glama
LiLara-AI

ShadowGraph

Official

shadowgraph_retrieve

Read-onlyIdempotent

Retrieve records matching a content query plus their one-hop graph neighbors, showing related decisions and attempts even when they don't match the query.

Instructions

Retrieve records matching a content query together with their one-hop graph neighbours. shadowgraph_search returns matches only, shadowgraph_recall ranks scoped memory, shadowgraph_traverse walks from a known id, shadowgraph_context builds a project working set. Reads only. A neighbour can appear with no content match of its own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoRestrict results to decisions or to attempts. A structured filter, never a content match.
limitNoMaximum items to return, 1-1000; the default is 50 and completeness.limitSource reports which applied. Out of range is rejected, never silently clamped.
queryNoWhitespace-separated terms matched against the declared content fields (title, goal, chosen, assumption, evidence, alternative, attempt solution, attempt result, attempt reason, environment), exactly as in shadowgraph_search. Omit to retrieve by filters alone.
offsetNoItems to skip before this window. Ordering is total and deterministic, so paging cannot drop or duplicate an item.
statusNoReturn only decisions in this lifecycle state. A structured filter, so matching it is never counted as a content match.
projectNoRestrict to one project, including which neighbours may be pulled in.
minConfidenceNoReturn only decisions whose current confidence is at least this value, 0-1. A structured filter, never a content match.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYesThe window actually applied to the matching items.
itemsYesThe items in this window, in deterministic order.
completenessYesDeclares exactly what this response left out, so a truncated result can never look complete.

Schema Changelog

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

  1. Changed8 schema fields changedv0.40.1
    • addedInput schema / properties / kind / description
      Added value: +"Restrict results to decisions or to attempts. A structured filter, never a content match."
    • changedInput schema / properties / limit / description
      Previous value: -"Page size. Omitted means a declared default, never silent truncation."New value: +"Maximum items to return, 1-1000; the default is 50 and completeness.limitSource reports which applied. Out of range is rejected, never silently clamped."
    • addedInput schema / properties / minConfidence / description
      Added value: +"Return only decisions whose current confidence is at least this value, 0-1. A structured filter, never a content match."
    • changedInput schema / properties / offset / description
      Previous value: -"Page offset."New value: +"Items to skip before this window. Ordering is total and deterministic, so paging cannot drop or duplicate an item."
    • addedInput schema / properties / project / description
      Added value: +"Restrict to one project, including which neighbours may be pulled in."
    • addedInput schema / properties / query / description
      Added value: +"Whitespace-separated terms matched against the declared content fields (title, goal, chosen, assumption, evidence, alternative, attempt solution, attempt result, attempt reason, environment), exactly as in shadowgraph_search. Omit to retrieve by filters alone."
    • addedInput schema / properties / status / description
      Added value: +"Return only decisions in this lifecycle state. A structured filter, so matching it is never counted as a content match."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Matching records plus their one-hop neighbours, with pagination and completeness.",
      +  "properties": {
      +    "completeness": {
      +      "description": "Declares exactly what this response left out, so a truncated result can never look complete.",
      +      "properties": {
      +        "complete": {
      +          "description": "True only when every matching item is present.",
      +          "type": "boolean"
      +        },
      +        "contentFields": {
      +          "description": "The declared content fields a query term could match.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "includesGraphNeighbours": {
      +          "description": "Always true: this result may contain items reached by relationship rather than by content.",
      +          "type": "boolean"
      +        },
      +        "limitSource": {
      +          "description": "Whose choice bounded the result.",
      +          "enum": [
      +            "caller",
      +            "default"
      +          ],
      +          "type": "string"
      +        },
      +        "losslessItems": {
      +          "description": "Always true: each returned item is a full-fidelity record, never a summary or a truncated field.",
      +          "type": "boolean"
      +        },
      +        "omitted": {
      +          "description": "total minus returned.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "returned": {
      +          "description": "Items in this response.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "scope": {
      +          "description": "The project, query, and structured filters that produced this result, so it explains its own derivation.",
      +          "type": "object"
      +        },
      +        "total": {
      +          "description": "Items that matched in total.",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "scope",
      +        "returned",
      +        "total",
      +        "complete",
      +        "omitted",
      +        "losslessItems",
      +        "limitSource",
      +        "contentFields",
      +        "includesGraphNeighbours"
      +      ],
      +      "type": "object"
      +    },
      +    "items": {
      +      "description": "The items in this window, in deterministic order.",
      +      "items": {
      +        "description": "One hit, which may be a content match or a one-hop graph neighbour.",
      +        "properties": {
      +          "filters": {
      +            "description": "The structured filters that were applied.",
      +            "type": "object"
      +          },
      +          "graphBoost": {
      +            "description": "1 for an item included as a graph neighbour, 0 for a direct content match.",
      +            "type": "number"
      +          },
      +          "matched": {
      +            "description": "The content fields that actually matched, never schema keys.",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "matchedBy": {
      +            "description": "content when query terms matched, filter when only structured filters applied, graph when the item was pulled in as a neighbour.",
      +            "enum": [
      +              "content",
      +              "filter",
      +              "graph"
      +            ],
      +            "type": "string"
      +          },
      +          "reason": {
      +            "description": "Human-readable explanation built from matched, so it can never claim a match it cannot name.",
      +            "type": "string"
      +          },
      +          "reasons": {
      +            "description": "All reasons this item is present.",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "record": {
      +            "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"
      +          },
      +          "score": {
      +            "description": "Relevance score; 0 when no query terms were supplied.",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "record",
      +          "score",
      +          "matched",
      +          "reason",
      +          "matchedBy",
      +          "filters",
      +          "graphBoost",
      +          "reasons"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "page": {
      +      "description": "The window actually applied to the matching items.",
      +      "properties": {
      +        "hasMore": {
      +          "description": "True when matching items exist beyond this window.",
      +          "type": "boolean"
      +        },
      +        "limit": {
      +          "description": "Window size applied, whether the caller set it or the default did.",
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "offset": {
      +          "description": "Index of the first item returned.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "total": {
      +          "description": "Matching items before the window was applied.",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "offset",
      +        "limit",
      +        "total",
      +        "hasMore"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "items",
      +    "page",
      +    "completeness"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.40.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is known without description. The description adds genuinely useful behavior beyond that: results include one-hop neighbours and 'a neighbour can appear with no content match of its own', which is non-obvious and affects how an agent interprets results. It does not contradict any annotation.

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?

Four short sentences, all informative, with the core operation front-loaded before the sibling comparison. The 'Reads only' sentence and the neighbour-without-match note each add a distinct fact; there is no filler or repetition of schema content.

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?

For a read-only, idempotent, 7-parameter tool with an output schema, the description is complete: it defines the core behavior, distinguishes it from four relevant alternatives, and flags the non-obvious neighbour behavior. Return-value format is covered by the existing output schema, so nothing an agent needs to select or invoke it correctly is missing.

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 every parameter (kind, limit, query, offset, status, project, minConfidence) has its own detailed schema description. The tool description therefore does not need to compensate for undocumented parameters, and the baseline of 3 applies. It does add a small cross-reference by saying the query matches 'exactly as in shadowgraph_search', but the schema already carries the semantics.

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 verb-resource pair: 'Retrieve records matching a content query together with their one-hop graph neighbours', which precisely identifies the tool's function and its unique feature. It also names four sibling tools and states what they do instead, making the differentiation immediate and 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 names the sibling alternatives (shadowgraph_search, shadowgraph_recall, shadowgraph_traverse, shadowgraph_context) and contrasts what each returns or does, so an agent knows when to pick this tool over each one. The phrase 'shadowgraph_search returns matches only' provides a concrete when-not signal, and 'shadowgraph_traverse walks from a known id' covers the main other entry point.

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