Skip to main content
Glama
LiLara-AI

ShadowGraph

Official

shadowgraph_rebuild

Read-onlyIdempotent

Rebuilds a projection from the store's journal to report whether the fold completed, leaving journal and live graph untouched.

Instructions

Replay this store's own journal into a projection and report whether the fold was complete. shadowgraph_journal reads the entries themselves, shadowgraph_validate diagnoses the live graph. Reads only: the journal is untouched and the live graph is not replaced by the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requireFullHistoryNoWhen true, refuse to rebuild if pre-journal metadata-only entries exist, returning rebuildable:false instead of a fold that silently starts later. Defaults to false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesTrue when the fold ran; it does not by itself mean the projection is complete.
legacyYesEntries recognised as pre-journal or non-replayable, each with a why.
reasonYesWhy the projection is not rebuildable, or null when it is.
appliedYesEntries folded into the projection.
skippedYesEntries not folded, each carrying seq, type, and a stable why such as unknown_entry_type or unsupported_schema_version.
duplicatesYesSequence numbers appearing more than once, each { seq, count }. A repeated sequence cannot be totally ordered, so it makes the fold untrustworthy.
projectionYesThe projection folded from the journal.
replayedToYesHighest sequence folded.
rebuildableYesTrue only when every entry in the replay range was folded and the result is trustworthy.
journalEpochYesFirst replayable sequence.
replayedFromYesLowest sequence folded.

Schema Changelog

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

  1. Changed2 schema fields changedv0.40.1
    • changedInput schema / properties / requireFullHistory / description
      Previous value: -"When true, refuse to rebuild if pre-journal metadata-only entries exist."New value: +"When true, refuse to rebuild if pre-journal metadata-only entries exist, returning rebuildable:false instead of a fold that silently starts later. Defaults to false."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The rebuild report and the projection it produced.",
      +  "properties": {
      +    "applied": {
      +      "description": "Entries folded into the projection.",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "duplicates": {
      +      "description": "Sequence numbers appearing more than once, each { seq, count }. A repeated sequence cannot be totally ordered, so it makes the fold untrustworthy.",
      +      "type": "array"
      +    },
      +    "journalEpoch": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "First replayable sequence."
      +    },
      +    "legacy": {
      +      "description": "Entries recognised as pre-journal or non-replayable, each with a why.",
      +      "type": "array"
      +    },
      +    "ok": {
      +      "description": "True when the fold ran; it does not by itself mean the projection is complete.",
      +      "type": "boolean"
      +    },
      +    "projection": {
      +      "description": "The projection folded from the journal.",
      +      "properties": {
      +        "facts": {
      +          "description": "Facts reconstructed by the fold.",
      +          "items": {
      +            "description": "A stored fact with its provenance claim and validity window.",
      +            "properties": {
      +              "actor": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Who performed the write."
      +              },
      +              "client": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Which client performed the write."
      +              },
      +              "confidence": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Caller-declared confidence in the observation, 0-1."
      +              },
      +              "createdAt": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "ISO 8601 creation time."
      +              },
      +              "expiresAt": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Caller-declared expiry instant, or null."
      +              },
      +              "id": {
      +                "description": "Stable entity identifier.",
      +                "type": "string"
      +              },
      +              "key": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Fact name, unique per project among active facts."
      +              },
      +              "kind": {
      +                "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +                "type": "string"
      +              },
      +              "observedAt": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "ISO 8601 time the fact was observed."
      +              },
      +              "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."
      +              },
      +              "source": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "Legacy alias of sourceClass, retained for compatibility."
      +              },
      +              "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."
      +              },
      +              "status": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "active, superseded, or expired."
      +              },
      +              "temporal": {
      +                "description": "Bi-temporal window: validFrom, validTo, recordedAt, invalidatedAt.",
      +                "type": "object"
      +              },
      +              "updatedAt": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "ISO 8601 time of the last change."
      +              },
      +              "validityPolicy": {
      +                "description": "Declared expiry inputs and the effective expiration boundary derived from them.",
      +                "type": "object"
      +              },
      +              "value": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "boolean"
      +                  },
      +                  {
      +                    "type": "null"
      +                  },
      +                  {
      +                    "type": "array"
      +                  },
      +                  {
      +                    "type": "object"
      +                  }
      +                ],
      +                "description": "The observed value, any lossless JSON value."
      +              },
      +              "verification": {
      +                "description": "Present only on a signed verification: the attestation this build checked.",
      +                "type": "object"
      +              },
      +              "verificationStatus": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "description": "unverified, contradicted, expired, or verified. Only the separately configured signed-evidence verifier can produce verified."
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "idempotency": {
      +          "description": "Retry-key entries reconstructed by the fold.",
      +          "type": "array"
      +        },
      +        "records": {
      +          "description": "Decisions, attempts, and memories reconstructed by the fold.",
      +          "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 reconstructed by the fold.",
      +          "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"
      +        },
      +        "schemaVersion": {
      +          "description": "Schema version of the rebuilt projection.",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "schemaVersion",
      +        "records",
      +        "facts",
      +        "relations",
      +        "idempotency"
      +      ],
      +      "type": "object"
      +    },
      +    "reason": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Why the projection is not rebuildable, or null when it is."
      +    },
      +    "rebuildable": {
      +      "description": "True only when every entry in the replay range was folded and the result is trustworthy.",
      +      "type": "boolean"
      +    },
      +    "replayedFrom": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Lowest sequence folded."
      +    },
      +    "replayedTo": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Highest sequence folded."
      +    },
      +    "skipped": {
      +      "description": "Entries not folded, each carrying seq, type, and a stable why such as unknown_entry_type or unsupported_schema_version.",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "rebuildable",
      +    "reason",
      +    "projection",
      +    "journalEpoch",
      +    "replayedFrom",
      +    "replayedTo",
      +    "applied",
      +    "skipped",
      +    "legacy",
      +    "duplicates"
      +  ],
      +  "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, idempotentHint, and destructiveHint, but the description adds concrete context: 'the journal is untouched and the live graph is not replaced by the result.' This is especially useful because 'rebuild' could otherwise imply destructive replacement. No contradiction with annotations exists.

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 sentences, each earning its place: the main action, sibling differentiation, and read-only clarification are all included without redundancy. The most important information is front-loaded.

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?

The tool has an output schema, a single optional parameter that is fully documented, and annotations covering safety and idempotency. The description adds the necessary scoping and no-side-effect guarantees, so an agent has everything needed to call this tool correctly.

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?

The sole parameter, requireFullHistory, is fully documented in the schema with a clear explanation of true/false behavior and its return effect. The description itself adds no parameter-specific information, but with 100% schema coverage, the baseline of 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?

The description opens with a specific verb and resource: 'Replay this store's own journal into a projection and report whether the fold was complete.' It further distinguishes itself from shadowgraph_journal and shadowgraph_validate, so an agent can tell exactly which operation this tool performs.

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 two sibling tools and contrasts them with this one: shadowgraph_journal reads entries, shadowgraph_validate diagnoses the live graph, while shadowgraph_rebuild replays the journal into a projection. This gives clear guidance on when to choose this tool versus alternatives.

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