Skip to main content
Glama
ShadowGraph

ShadowGraph

Official

shadowgraph_review

Evaluate reopen rules and persist deduplicated owned signals, returning only due review decisions with items, completeness, and signal IDs.

Instructions

Evaluate reopen rules and persist signals; return only due decisions as { items, completeness }, with signal IDs. shadowgraph_review_signals reads saved signals; shadowgraph_reconsider explains all verdicts; shadowgraph_review_context adds context; shadowgraph_ack_review closes a signal. Persists deduplicated owned signals; every call commits a revision. Grants widen audited reads only. No choice or lifecycle changes.

Input Schema

NameRequiredDescriptionDefault
factsNoTemporary key/value overrides for object rules; unlisted keys use stored facts. Example: facts:{ready:true} tests {key:"ready",value:true}. This does not record a fact or fire a string rule; changedFacts supplies those changed-key signals.
grantIdNoAlias for accessId; conflicting identifiers are refused.
projectNoProject or confirmed workspace binding; otherwise origin-only. No identity returns an empty scoped view.
accessIdNoGrant ID, rechecked at use. Widens reads only, never write authority. Presenting an access key commits a revision and bounded operational audit: at most one aggregate per grant, surface, outcome and UTC day. Conflicts with a different grantId are refused.
originIdNoCapture-origin id; with no project the record belongs to it alone.
changedFactsNoEphemeral changed-key signals for string-form reopenWhen rules; not stored facts. Example: changedFacts:["budget"] fires reopenWhen:["budget"]. Object rules instead read values from facts overrides or stored facts.

Output Schema

NameRequiredDescriptionDefault
itemsYesAll known matching items inside this boundary.
completenessYesDeclares exactly what this response left out, so a truncated result can never look complete.
readProvenanceNoOriginal read bounds; reuse intersects these with currently valid authority.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.42.4
    • changedOutput schema / properties / completeness / properties / capture / properties / gaps / items / properties / reason / enum
      Previous value: -[
      -  "maxQueueDepth",
      -  "maxStoreBytes",
      -  "maxItemsPerSession",
      -  "session_in_another_project",
      -  "raw_expired",
      -  "transcript_unrecognised",
      -  "session_left_project",
      -  "transcript_rewritten",
      -  "transcript_reanchored",
      -  "transcript_incomplete_at_end",
      -  "transcript_line_oversized",
      -  "tool_calls_not_captured"
      -]New value: +[
      +  "maxQueueDepth",
      +  "maxStoreBytes",
      +  "maxItemsPerSession",
      +  "session_in_another_project",
      +  "raw_expired",
      +  "prior_setup",
      +  "transcript_unrecognised",
      +  "session_left_project",
      +  "transcript_rewritten",
      +  "transcript_reanchored",
      +  "transcript_incomplete_at_end",
      +  "transcript_line_oversized",
      +  "tool_calls_not_captured"
      +]
    • addedOutput schema / properties / completeness / properties / capture / properties / priorSetup
      Added value: +{
      +  "description": "Unextracted items of no or an earlier setup; never extracted by the current one.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed2 schema fields changedv0.42.3
    • changedInput schema / properties / changedFacts / description
      Previous value: -"Fact keys that just changed. Only string-form reopenWhen rules match this list; it is an ephemeral signal, not durable state."New value: +"Ephemeral changed-key signals for string-form reopenWhen rules; not stored facts. Example: changedFacts:[\"budget\"] fires reopenWhen:[\"budget\"]. Object rules instead read values from facts overrides or stored facts."
    • changedInput schema / properties / facts / description
      Previous value: -"Fact key/value overrides evaluated instead of the stored facts of the same key. Stored facts are used for every key not listed here, so reopen rules still work after a restart."New value: +"Temporary key/value overrides for object rules; unlisted keys use stored facts. Example: facts:{ready:true} tests {key:\"ready\",value:true}. This does not record a fact or fire a string rule; changedFacts supplies those changed-key signals."
  3. Changed1 schema field changedv0.42.2
    • changedInput schema / properties / accessId / description
      Previous value: -"Grant ID, rechecked at use."New value: +"Grant ID, rechecked at use. Widens reads only, never write authority. Presenting an access key commits a revision and bounded operational audit: at most one aggregate per grant, surface, outcome and UTC day. Conflicts with a different grantId are refused."
  4. Changed5 schema fields changedv0.42.1
    • addedInput schema / properties / accessId
      Added value: +{
      +  "description": "Grant ID, rechecked at use.",
      +  "type": "string"
      +}
    • addedInput schema / properties / grantId
      Added value: +{
      +  "description": "Alias for accessId; conflicting identifiers are refused.",
      +  "type": "string"
      +}
    • addedInput schema / properties / originId
      Added value: +{
      +  "description": "Capture-origin id; with no project the record belongs to it alone.",
      +  "type": "string"
      +}
    • changedInput schema / properties / project / description
      Previous value: -"Review only this project. Omit to review every project."New value: +"Project or confirmed workspace binding; otherwise origin-only. No identity returns an empty scoped view."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "completeness": {
      +      "description": "Declares exactly what this response left out, so a truncated result can never look complete.",
      +      "properties": {
      +        "capture": {
      +          "description": "Scoped unprocessed capture, when present.",
      +          "properties": {
      +            "blocked": {
      +              "description": "Items blocked.",
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "expired": {
      +              "description": "Raw expired before extraction; a gap, not backlog.",
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "extractionAvailable": {
      +              "description": "Whether extraction runs.",
      +              "type": "boolean"
      +            },
      +            "failed": {
      +              "description": "Items failed.",
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "gaps": {
      +              "description": "Capture refusal/unread gaps; no identities.",
      +              "items": {
      +                "properties": {
      +                  "from": {
      +                    "description": "Gap start time.",
      +                    "type": "string"
      +                  },
      +                  "reason": {
      +                    "description": "Why capture has a gap.",
      +                    "enum": [
      +                      "maxQueueDepth",
      +                      "maxStoreBytes",
      +                      "maxItemsPerSession",
      +                      "session_in_another_project",
      +                      "raw_expired",
      +                      "transcript_unrecognised",
      +                      "session_left_project",
      +                      "transcript_rewritten",
      +                      "transcript_reanchored",
      +                      "transcript_incomplete_at_end",
      +                      "transcript_line_oversized",
      +                      "tool_calls_not_captured"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "sessions": {
      +                    "description": "Sessions covered by this gap.",
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "to": {
      +                    "anyOf": [
      +                      {
      +                        "type": "string"
      +                      },
      +                      {
      +                        "type": "null"
      +                      }
      +                    ],
      +                    "description": "End time, if known."
      +                  }
      +                },
      +                "required": [
      +                  "reason",
      +                  "from",
      +                  "to"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "limited": {
      +              "description": "Admission limits; accepted items kept.",
      +              "items": {
      +                "properties": {
      +                  "ceiling": {
      +                    "description": "The limit value.",
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "limit": {
      +                    "description": "The limit reached.",
      +                    "enum": [
      +                      "maxQueueDepth",
      +                      "maxStoreBytes"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "since": {
      +                    "description": "When refusal began.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "limit",
      +                  "ceiling",
      +                  "since"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "oldestPendingAt": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Oldest pending capture."
      +            },
      +            "pending": {
      +              "description": "Items waiting.",
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "processing": {
      +              "description": "Items claimed.",
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "workerErrors": {
      +              "description": "Scoped worker stops; fixed codes.",
      +              "items": {
      +                "properties": {
      +                  "at": {
      +                    "description": "Stop timestamp.",
      +                    "type": "string"
      +                  },
      +                  "reason": {
      +                    "description": "Worker stop code.",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "reason",
      +                  "at"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "pending",
      +            "processing",
      +            "failed",
      +            "blocked",
      +            "oldestPendingAt",
      +            "extractionAvailable",
      +            "limited",
      +            "gaps"
      +          ],
      +          "type": "object"
      +        },
      +        "complete": {
      +          "description": "Known-candidate coverage; false for unresolved scope, withheld detail or pending capture; not recall.",
      +          "type": "boolean"
      +        },
      +        "limitSource": {
      +          "description": "Whose choice bounded the result.",
      +          "enum": [
      +            "caller",
      +            "default"
      +          ],
      +          "type": "string"
      +        },
      +        "limitation": {
      +          "description": "Limits of this view.",
      +          "properties": {
      +            "code": {
      +              "description": "Stable limitation code.",
      +              "type": "string"
      +            },
      +            "detail": {
      +              "description": "What this view cannot establish.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "detail"
      +          ],
      +          "type": "object"
      +        },
      +        "losslessItems": {
      +          "description": "False when returned items have withheld or transformed detail.",
      +          "type": "boolean"
      +        },
      +        "omitted": {
      +          "description": "total minus returned.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "quarantined": {
      +          "description": "Items withheld as possibly purged.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "returned": {
      +          "description": "Items in this response.",
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "scope": {
      +          "description": "The resolved read boundary.",
      +          "properties": {
      +            "grant": {
      +              "anyOf": [
      +                {
      +                  "type": "null"
      +                },
      +                {
      +                  "properties": {
      +                    "accessId": {
      +                      "description": "The currently rechecked grant identifier.",
      +                      "type": "string"
      +                    },
      +                    "expiresAt": {
      +                      "description": "Earliest effective expiry of this read authority.",
      +                      "type": "string"
      +                    },
      +                    "surface": {
      +                      "description": "Actual runtime surface of this read.",
      +                      "enum": [
      +                        "cli",
      +                        "mcp",
      +                        "http"
      +                      ],
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "accessId",
      +                    "expiresAt",
      +                    "surface"
      +                  ],
      +                  "type": "object"
      +                }
      +              ],
      +              "description": "Effective rechecked grant, or null."
      +            },
      +            "originPresented": {
      +              "description": "Usable origin presented; not project selection.",
      +              "type": "boolean"
      +            },
      +            "project": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Resolved project, or null."
      +            },
      +            "requestState": {
      +              "description": "Whether a project was resolved.",
      +              "enum": [
      +                "project_selected",
      +                "project_unresolved"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "project",
      +            "requestState",
      +            "originPresented",
      +            "grant"
      +          ],
      +          "type": "object"
      +        },
      +        "total": {
      +          "description": "Items that matched in total.",
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "scope",
      +        "returned",
      +        "total",
      +        "complete",
      +        "omitted",
      +        "losslessItems"
      +      ],
      +      "type": "object"
      +    },
      +    "items": {
      +      "description": "All known matching items inside this boundary.",
      +      "items": {
      +        "description": "One decision whose rejected alternatives are due for reconsideration.",
      +        "properties": {
      +          "alternativesToReconsider": {
      +            "description": "Labels of the alternatives to look at again; all of them when the trigger was not alternative-specific.",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "decisionId": {
      +            "description": "The decision to reconsider.",
      +            "type": "string"
      +          },
      +          "reason": {
      +            "description": "Comma-separated causes: the fact keys whose reopenWhen rules matched, \"review date reached\", or \"decision outcome failed\".",
      +            "type": "string"
      +          },
      +          "reviewSignalId": {
      +            "description": "Pass this to shadowgraph_ack_review to acknowledge this review.",
      +            "type": "string"
      +          },
      +          "reviewSignalStatus": {
      +            "description": "Whether this review is open or acknowledged, or unpersisted: no stored signal, because context is a read or the evaluation was wider. Entries are recomputed from current evidence; an acknowledged one still appears.",
      +            "enum": [
      +              "open",
      +              "acknowledged",
      +              "unpersisted"
      +            ],
      +            "type": "string"
      +          },
      +          "title": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ],
      +            "description": "Decision title, when the stored decision has one."
      +          },
      +          "violatedConditions": {
      +            "description": "The conditions that actually fired, each naming its operator, expected and observed value, and the fact it was computed from.",
      +            "items": {
      +              "description": "One evaluated reopen condition. Verdict \"unknown\" means it could not be evaluated from available evidence, which is not a pass.",
      +              "properties": {
      +                "alternativeId": {
      +                  "description": "Alternative carrying it.",
      +                  "type": "string"
      +                },
      +                "alternativeLabel": {
      +                  "description": "Label of that alternative.",
      +                  "type": "string"
      +                },
      +                "attemptId": {
      +                  "description": "Attempt the condition belongs to, for a reusableWhen rule.",
      +                  "type": "string"
      +                },
      +                "conflictingEvidence": {
      +                  "description": "Equally applicable facts that disagree. The verdict rests on the deterministic winner.",
      +                  "items": {
      +                    "description": "A fact a verdict came from. Unrecorded fields are omitted, never filled in.",
      +                    "properties": {
      +                      "factId": {
      +                        "description": "The observed fact.",
      +                        "type": "string"
      +                      },
      +                      "observedAt": {
      +                        "description": "When observed, if recorded.",
      +                        "type": "string"
      +                      },
      +                      "sourceClass": {
      +                        "description": "Provenance class, if recorded.",
      +                        "type": "string"
      +                      },
      +                      "validFrom": {
      +                        "description": "Validity start, if recorded.",
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "anyOf": [
      +                          {
      +                            "type": "string"
      +                          },
      +                          {
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "boolean"
      +                          },
      +                          {
      +                            "type": "null"
      +                          },
      +                          {
      +                            "type": "array"
      +                          },
      +                          {
      +                            "type": "object"
      +                          }
      +                        ],
      +                        "description": "A stored value, any lossless JSON value."
      +                      },
      +                      "verificationStatus": {
      +                        "description": "Verification status, if recorded.",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "factId",
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "decisionId": {
      +                  "description": "Decision the condition belongs to, for a reopenWhen rule.",
      +                  "type": "string"
      +                },
      +                "evidence": {
      +                  "description": "Provenance of the value used.",
      +                  "type": "object"
      +                },
      +                "expected": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "number"
      +                    },
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    },
      +                    {
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "object"
      +                    }
      +                  ],
      +                  "description": "A stored value, any lossless JSON value."
      +                },
      +                "key": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "Fact key read."
      +                },
      +                "observed": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "number"
      +                    },
      +                    {
      +                      "type": "boolean"
      +                    },
      +                    {
      +                      "type": "null"
      +                    },
      +                    {
      +                      "type": "array"
      +                    },
      +                    {
      +                      "type": "object"
      +                    }
      +                  ],
      +                  "description": "A stored value, any lossless JSON value."
      +                },
      +                "operator": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ],
      +                  "description": "Operator the rule declared."
      +                },
      +                "reason": {
      +                  "description": "Why this verdict.",
      +                  "type": "string"
      +                },
      +                "unit": {
      +                  "description": "Unit the rule declared, if any.",
      +                  "type": "string"
      +                },
      +                "verdict": {
      +                  "description": "Evaluation result.",
      +                  "enum": [
      +                    "true",
      +                    "false",
      +                    "unknown"
      +                  ],
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "key",
      +                "operator",
      +                "verdict",
      +                "reason"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "decisionId",
      +          "reason",
      +          "alternativesToReconsider"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "readProvenance": {
      +      "description": "Original read bounds; reuse intersects these with currently valid authority.",
      +      "properties": {
      +        "accessId": {
      +          "description": "Original grant, revalidated on every reuse.",
      +          "type": "string"
      +        },
      +        "expiresAt": {
      +          "description": "Original effective expiry; reuse cannot extend it.",
      +          "type": "string"
      +        },
      +        "request": {
      +          "description": "Original request ownership, preserved during expansion.",
      +          "properties": {
      +            "originId": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Original capture origin, or null when absent."
      +            },
      +            "project": {
      +              "anyOf": [
      +                {
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Original resolved project, or null when unresolved."
      +            }
      +          },
      +          "required": [
      +            "project",
      +            "originId"
      +          ],
      +          "type": "object"
      +        },
      +        "scope": {
      +          "description": "Finite explicit owner bounds; project names, origins and legacy attribution are disjoint.",
      +          "properties": {
      +            "legacyAttributions": {
      +              "description": "Explicit legacy ownership classes; neither is a named project.",
      +              "items": {
      +                "enum": [
      +                  "legacy_ambiguous",
      +                  "legacy_unattributed"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "originIds": {
      +              "description": "Exact nonempty origin identifiers for unattributed content.",
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "projects": {
      +              "description": "Exact named projects, including a real project named default if requested.",
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "surfaces": {
      +          "description": "Original permitted surfaces; reuse can only narrow them.",
      +          "items": {
      +            "enum": [
      +              "cli",
      +              "mcp",
      +              "http"
      +            ],
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "version": {
      +          "const": 1,
      +          "description": "Version of this bounded read provenance.",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "version",
      +        "request",
      +        "accessId",
      +        "scope",
      +        "surfaces",
      +        "expiresAt"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "items",
      +    "completeness"
      +  ],
      +  "type": "object"
      +}
  5. Changed3 schema fields changedv0.40.1
    • addedInput schema / properties / changedFacts / description
      Added value: +"Fact keys that just changed. Only string-form reopenWhen rules match this list; it is an ephemeral signal, not durable state."
    • changedInput schema / properties / facts / description
      Previous value: -"Optional overrides; these take precedence over stored facts."New value: +"Fact key/value overrides evaluated instead of the stored facts of the same key. Stored facts are used for every key not listed here, so reopen rules still work after a restart."
    • addedInput schema / properties / project / description
      Added value: +"Review only this project. Omit to review every project."
  6. First observedv0.40.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false) the description discloses real side-effect behavior: deduplicated owned-signal persistence, a revision commitment on every call, grants widening audited reads only, and the explicit negative scope 'No choice or lifecycle changes'. The contradiction-free negative scoping is genuinely valuable, though it doesn't cover failure/conflict behavior at the tool level (conflict refusal lives only in the schema).

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?

Four dense sentences, front-loaded with purpose and return shape, then sibling routing, then side effects. Semicolon-compressed jargon ('Grants widen audited reads only. No choice or lifecycle changes.') is efficient but telegraphic, costing a little readability.

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?

The tool mutates state and has an output schema, so the description needn't explain return values — yet it does, plus persistence, revision, and scope boundaries. Complete enough for correct invocation; the only minor gap is that conflict/refusal behavior is left entirely to schema text.

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%, with detailed per-parameter text for facts, accessId/grantId aliasing, changedFacts and originId, so the schema carries the semantics. The description adds nothing parameter-specific except the return shape, so baseline 3 applies.

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 opening clause states a specific verb pair and resource: 'Evaluate reopen rules and persist signals', plus the return contract ('only due decisions as { items, completeness }, with signal IDs'). It then explicitly separates itself from shadowgraph_review_signals (reads saved signals), shadowgraph_reconsider (explains verdicts), and shadowgraph_ack_review (closes a signal), so an agent can discriminate without opening any schema.

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?

It gives a clear division of labor by naming the four sibling alternatives and what each does, which routes the agent effectively. What it lacks is an explicit 'call this when...' trigger condition or exclusion; the agent must infer that this is the evaluate-and-persist entry point from the verb structure alone.

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