Skip to main content
Glama
ShadowGraph

ShadowGraph

Official

shadowgraph_supersede

Destructive

Mark a decision as superseded by a replacement in the same project so it leaves current context while its searchable history and replacement relation remain recorded.

Instructions

Mark one decision superseded by a replacement in the same project. shadowgraph_record_decision creates the replacement; shadowgraph_update_status changes state without replacement. Returns previous, replacement and relation. Both IDs must be owned in the same project/origin. History stays searchable; even repeats commit a revision.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "decisionId": "<decisionId>",
      "replacementId": "<replacementId>"
    },
    "name": "shadowgraph_supersede"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNoRationale or explanation for replacing the previous decision.
projectNoOwning project; required unless originId is set, else the write is refused.
originIdNoCapture-origin ID for unattributed records when project is omitted.
decisionIdYesThe decision being replaced. It becomes superseded and is excluded from current context.
changeSummaryNoSummary of differences or architectural changes introduced by the replacement.
replacementIdYesThe decision replacing it. Must be in the same project and must not be superseded, archived, abandoned, or stale.

Output Schema

NameRequiredDescriptionDefault
previousYesA newly recorded decision with its canonical ID, rejected alternatives, and initial confidence basis.
relationYesThe supersedes relationship, or null when a repeated supersession found none to report.
replacementYesA newly recorded decision with its canonical ID, rejected alternatives, and initial confidence basis.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.44.5
    • changedOutput schema / properties / previous / description
      Previous value: -"A stored decision, including its alternatives and auditable confidence basis."New value: +"A newly recorded decision with its canonical ID, rejected alternatives, and initial confidence basis."
    • changedOutput schema / properties / replacement / description
      Previous value: -"A stored decision, including its alternatives and auditable confidence basis."New value: +"A newly recorded decision with its canonical ID, rejected alternatives, and initial confidence basis."
  2. Changed12 schema fields changedv0.44.1
    • addedInput schema / properties / changeSummary
      Added value: +{
      +  "description": "Summary of differences or architectural changes introduced by the replacement.",
      +  "type": "string"
      +}
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Rationale or explanation for replacing the previous decision.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / previous / properties / changeSummary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Summary of changes from superseded decisions."
      +}
    • addedOutput schema / properties / previous / properties / reopenWhen
      Added value: +{
      +  "description": "Rules recorded directly on the decision that make it reconsiderable.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / previous / properties / tags
      Added value: +{
      +  "description": "Labels or extracted keywords stored with the decision.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / previous / properties / task
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Task or problem context this decision addresses."
      +}
    • addedOutput schema / properties / previous / properties / visibility
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Visibility boundary: project or global."
      +}
    • addedOutput schema / properties / replacement / properties / changeSummary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Summary of changes from superseded decisions."
      +}
    • addedOutput schema / properties / replacement / properties / reopenWhen
      Added value: +{
      +  "description": "Rules recorded directly on the decision that make it reconsiderable.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / replacement / properties / tags
      Added value: +{
      +  "description": "Labels or extracted keywords stored with the decision.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / replacement / properties / task
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Task or problem context this decision addresses."
      +}
    • addedOutput schema / properties / replacement / properties / visibility
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Visibility boundary: project or global."
      +}
  3. Changed1 schema field changedv0.43.6
    • changedInput schema / properties / originId / description
      Previous value: -"Capture-origin id; with no project the record belongs to it alone."New value: +"Capture-origin ID for unattributed records when project is omitted."
  4. Addedv0.42.3
  5. Removedv0.42.1
  6. Changed3 schema fields changedv0.40.1
    • addedInput schema / properties / decisionId / description
      Added value: +"The decision being replaced. It becomes superseded and is excluded from current context."
    • addedInput schema / properties / replacementId / description
      Added value: +"The decision replacing it. Must be in the same project and must not be superseded, archived, abandoned, or stale."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Both sides of the supersession and the relationship that records it.",
      +  "properties": {
      +    "previous": {
      +      "description": "A stored decision, including its alternatives and auditable confidence basis.",
      +      "properties": {
      +        "actor": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Who performed the write."
      +        },
      +        "alternatives": {
      +          "description": "Rejected alternatives, each with id, label, reasonRejected, status, and the reopenWhen rules that make it reconsiderable.",
      +          "type": "array"
      +        },
      +        "assumptions": {
      +          "description": "Assumptions the decision rests on. Searchable content.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "chosen": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The option that was chosen."
      +        },
      +        "client": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Which client performed the write."
      +        },
      +        "confidence": {
      +          "description": "Auditable confidence: initial, current (0-1), policy, a history entry per move, and a basis summarising the contributions it was folded from. Legacy records may lack basis.",
      +          "type": "object"
      +        },
      +        "createdAt": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 creation time."
      +        },
      +        "evidence": {
      +          "description": "Normalised evidence entries: source, type, sourceClass, confidence, observedAt, detail.",
      +          "type": "array"
      +        },
      +        "failedAttempts": {
      +          "description": "Attempt identifiers or notes attached to this decision.",
      +          "type": "array"
      +        },
      +        "goal": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "What the decision was trying to achieve."
      +        },
      +        "id": {
      +          "description": "Stable entity identifier.",
      +          "type": "string"
      +        },
      +        "kind": {
      +          "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +          "type": "string"
      +        },
      +        "migration": {
      +          "description": "Present only on migrated records; records the legacy value a field was mapped from.",
      +          "type": "object"
      +        },
      +        "outcome": {
      +          "anyOf": [
      +            {
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The recorded outcome, or null until one is recorded."
      +        },
      +        "project": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Project namespace; records imported from a schema that predates projects may carry null."
      +        },
      +        "reviewAfter": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 instant after which shadowgraph_maintain marks this decision stale."
      +        },
      +        "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."
      +        },
      +        "status": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Lifecycle state. Legacy records may carry a value this build does not recognise; shadowgraph_validate reports those."
      +        },
      +        "supersededBy": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Identifier of the decision that replaced this one."
      +        },
      +        "supersedes": {
      +          "description": "Identifiers of decisions this one replaced.",
      +          "type": "array"
      +        },
      +        "title": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Short name of the decision."
      +        },
      +        "updatedAt": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 time of the last change."
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "relation": {
      +      "anyOf": [
      +        {
      +          "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": "null"
      +        }
      +      ],
      +      "description": "The supersedes relationship, or null when a repeated supersession found none to report."
      +    },
      +    "replacement": {
      +      "description": "A stored decision, including its alternatives and auditable confidence basis.",
      +      "properties": {
      +        "actor": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Who performed the write."
      +        },
      +        "alternatives": {
      +          "description": "Rejected alternatives, each with id, label, reasonRejected, status, and the reopenWhen rules that make it reconsiderable.",
      +          "type": "array"
      +        },
      +        "assumptions": {
      +          "description": "Assumptions the decision rests on. Searchable content.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "chosen": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The option that was chosen."
      +        },
      +        "client": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Which client performed the write."
      +        },
      +        "confidence": {
      +          "description": "Auditable confidence: initial, current (0-1), policy, a history entry per move, and a basis summarising the contributions it was folded from. Legacy records may lack basis.",
      +          "type": "object"
      +        },
      +        "createdAt": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 creation time."
      +        },
      +        "evidence": {
      +          "description": "Normalised evidence entries: source, type, sourceClass, confidence, observedAt, detail.",
      +          "type": "array"
      +        },
      +        "failedAttempts": {
      +          "description": "Attempt identifiers or notes attached to this decision.",
      +          "type": "array"
      +        },
      +        "goal": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "What the decision was trying to achieve."
      +        },
      +        "id": {
      +          "description": "Stable entity identifier.",
      +          "type": "string"
      +        },
      +        "kind": {
      +          "description": "Entity kind: decision, attempt, memory, fact, relation, review, or alternative.",
      +          "type": "string"
      +        },
      +        "migration": {
      +          "description": "Present only on migrated records; records the legacy value a field was mapped from.",
      +          "type": "object"
      +        },
      +        "outcome": {
      +          "anyOf": [
      +            {
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "The recorded outcome, or null until one is recorded."
      +        },
      +        "project": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Project namespace; records imported from a schema that predates projects may carry null."
      +        },
      +        "reviewAfter": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 instant after which shadowgraph_maintain marks this decision stale."
      +        },
      +        "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."
      +        },
      +        "status": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Lifecycle state. Legacy records may carry a value this build does not recognise; shadowgraph_validate reports those."
      +        },
      +        "supersededBy": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Identifier of the decision that replaced this one."
      +        },
      +        "supersedes": {
      +          "description": "Identifiers of decisions this one replaced.",
      +          "type": "array"
      +        },
      +        "title": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Short name of the decision."
      +        },
      +        "updatedAt": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO 8601 time of the last change."
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "kind"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "previous",
      +    "replacement",
      +    "relation"
      +  ],
      +  "type": "object"
      +}
  7. 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 destructiveHint=true and idempotentHint=false, and the description adds real context beyond them: history stays searchable after supersession, and even repeated identical calls commit a revision (reinforcing non-idempotency). It does not explain whether the supersession is reversible or what permission scope governs it, leaving some mutation risk unstated.

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 in a deliberate order: action, sibling disambiguation, return shape, constraints. No filler and the disambiguation follows immediately after the purpose statement.

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 destructive, non-idempotent six-parameter tool, the description covers effect on current context, history retention, ownership constraints, and return payload. With an output schema present, it correctly does not expand on return value structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds a cross-parameter constraint the schema does not convey: both IDs must be owned in the same project/origin. That materially reduces the chance of an invalid pairing.

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 ('Mark one decision superseded by a replacement') and scopes it ('in the same project'). It then explicitly names the two siblings that could be confused with it, so an agent can distinguish supersede-with-replacement from create-new and state-change.

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 clear routing guidance: shadowgraph_record_decision creates the replacement, shadowgraph_update_status changes state without a replacement — both are decision points an agent needs. It stops short of explicit 'do not use this when…' exclusions or prerequisites ordering, so it is clear context rather than a full routing rule.

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