Skip to main content
Glama
ShadowGraph

ShadowGraph

Official

shadowgraph_record_outcome

Destructive

Record an outcome for an existing decision to update its evidence-weighted confidence and capture lessons learned; optionally transition lifecycle state or auto-advance on success/failure.

Instructions

Record what happened to an existing decision and update its evidence-weighted confidence. Do not use for evidence (shadowgraph_confidence_evidence) or state-only moves (shadowgraph_update_status changes the lifecycle state). Replaces prior outcome and recalculates confidence; does not change lifecycle status unless autoTransition or decisionStatus/lifecycleStatus is supplied (conflicts error).

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>",
      "outcome": "<outcome>"
    },
    "name": "shadowgraph_record_outcome"
  }
}

Input Schema

NameRequiredDescriptionDefault
outcomeYesOutcome: status, sourceClass, lessons, lifecycle state.
projectNoOwning project; required unless originId is set, else the write is refused.
originIdNoCapture-origin ID for unattributed records when project is omitted.
decisionIdYesIdentifier of an existing decision, as returned by shadowgraph_record_decision, shadowgraph_search, or shadowgraph_retrieve.
autoTransitionNoTop-level alias to auto-transition decision lifecycle to validated or failed.
decisionStatusNoTop-level alias for target lifecycle status to transition the decision into.
lifecycleStatusNoTop-level alias for decisionStatus specifying target decision lifecycle status.

Output Schema

NameRequiredDescriptionDefault
idYesStable entity identifier.
goalNoWhat the decision was trying to achieve.
kindYesEntity kind: decision, attempt, memory, fact, relation, review, or alternative.
tagsNoLabels or extracted keywords stored with the decision.
taskNoTask or problem context this decision addresses.
actorNoWho performed the write.
titleNoShort name of the decision.
chosenNoThe option that was chosen.
clientNoWhich client performed the write.
statusNoLifecycle state. Legacy records may carry a value this build does not recognise; shadowgraph_validate reports those.
outcomeNoThe recorded outcome, or null until one is recorded.
projectNoProject namespace; null for an unattributed record or one imported from before projects.
evidenceNoNormalised evidence entries: source, type, sourceClass, confidence, observedAt, detail.
createdAtNoISO 8601 creation time.
migrationNoPresent only on migrated records; records the legacy value a field was mapped from.
sessionIdNoSession identifier recorded with the write.
sourceRawNoThe original origin label when it differed from sourceClass. Audit only; never evidence.
updatedAtNoISO 8601 time of the last change.
confidenceNoAuditable 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.
reopenWhenNoRules recorded directly on the decision that make it reconsiderable.
supersedesNoIdentifiers of decisions this one replaced.
visibilityNoVisibility boundary: project or global.
assumptionsNoAssumptions the decision rests on. Searchable content.
reviewAfterNoISO 8601 instant after which shadowgraph_maintain marks this decision stale.
sourceClassNoClaimed origin class recorded with the write. A claim, never proof.
alternativesNoRejected alternatives, each with id, label, reasonRejected, status, and the reopenWhen rules that make it reconsiderable.
supersededByNoIdentifier of the decision that replaced this one.
changeSummaryNoSummary of changes from superseded decisions.
schemaVersionNoStorage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded.
failedAttemptsNoAttempt identifiers or notes attached to this decision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.44.5
    • changedOutput schema / description
      Previous value: -"A stored decision, including its alternatives and auditable confidence basis."New value: +"The updated decision record reflecting the recorded outcome and recalculated confidence."
  2. Changed1 schema field changedv0.44.2
    • changedInput schema / properties / outcome / description
      Previous value: -"The outcome to record."New value: +"Outcome: status, sourceClass, lessons, lifecycle state."
  3. Changed11 schema fields changedv0.44.1
    • addedInput schema / properties / autoTransition
      Added value: +{
      +  "description": "Top-level alias to auto-transition decision lifecycle to validated or failed.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / decisionStatus
      Added value: +{
      +  "description": "Top-level alias for target lifecycle status to transition the decision into.",
      +  "type": "string"
      +}
    • addedInput schema / properties / lifecycleStatus
      Added value: +{
      +  "description": "Top-level alias for decisionStatus specifying target decision lifecycle status.",
      +  "type": "string"
      +}
    • addedInput schema / properties / outcome / properties / autoTransition
      Added value: +{
      +  "description": "Automatically step decision lifecycle to validated on success or failed on failure.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / outcome / properties / decisionStatus
      Added value: +{
      +  "description": "Target decision lifecycle state to transition into upon recording this outcome.",
      +  "type": "string"
      +}
    • addedInput schema / properties / outcome / properties / lifecycleStatus
      Added value: +{
      +  "description": "Alias for decisionStatus specifying target lifecycle state to transition into.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / changeSummary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Summary of changes from superseded decisions."
      +}
    • addedOutput schema / properties / reopenWhen
      Added value: +{
      +  "description": "Rules recorded directly on the decision that make it reconsiderable.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / tags
      Added value: +{
      +  "description": "Labels or extracted keywords stored with the decision.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / task
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Task or problem context this decision addresses."
      +}
    • addedOutput schema / properties / visibility
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Visibility boundary: project or global."
      +}
  4. 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."
  5. Changed3 schema fields changedv0.42.1
    • addedInput schema / properties / originId
      Added value: +{
      +  "description": "Capture-origin id; with no project the record belongs to it alone.",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Owning project; required unless originId is set, else the write is refused.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / project / description
      Previous value: -"Project namespace; records imported from a schema that predates projects may carry null."New value: +"Project namespace; null for an unattributed record or one imported from before projects."
  6. Changed7 schema fields changedv0.40.1
    • addedInput schema / properties / decisionId / description
      Added value: +"Identifier of an existing decision, as returned by shadowgraph_record_decision, shadowgraph_search, or shadowgraph_retrieve."
    • addedInput schema / properties / outcome / description
      Added value: +"The outcome to record."
    • addedInput schema / properties / outcome / properties / lessons / description
      Added value: +"What was learned, stored with the outcome."
    • addedInput schema / properties / outcome / properties / observedAt / description
      Added value: +"ISO 8601 time the outcome was observed. Defaults to now."
    • addedInput schema / properties / outcome / properties / sourceClass / description
      Added value: +"Claimed origin of this outcome observation. It weights how far confidence moves; it never verifies anything."
    • addedInput schema / properties / outcome / properties / status / description
      Added value: +"successful raises confidence, failed lowers it and makes the decision due for review, mixed lowers it by half, and unknown moves nothing because \"we do not know\" is not evidence."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "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"
      +}
  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 flag destructiveHint=true and idempotentHint=false, and the description adds real value on top: it discloses that a prior outcome is replaced, that confidence is recalculated directionally, that lifecycle state is untouched unless a transition parameter is supplied, and that conflicting inputs error. It does not say whether the replaced outcome is recoverable or how conflicts are surfaced, which keeps it short of a 5.

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?

Front-loaded with purpose, then exclusions, then side-effect caveats in two dense sentences with no filler. Slight redundancy from re-enumerating autoTransition/decisionStatus/lifecycleStatus in the final clause, but each statement carries information.

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?

An output schema exists and annotations cover safety, so the description only needs to cover the tricky semantics, which it does: replacement, confidence recalc, conditional transitions, and conflict errors. The one gap is the project/originId precondition (project required unless originId set, else the write is refused), which is left entirely to the schema.

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 would be 3, but the description adds genuinely non-obvious semantics: decisionStatus and lifecycleStatus are aliases for the same target state, and supplying them alongside autoTransition can produce an error. That alias/conflict relationship is not obvious from the schema alone.

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?

States a specific verb and resource ('Record what happened to an existing decision') plus the side effect ('update its evidence-weighted confidence'). It explicitly distinguishes itself from shadowgraph_confidence_evidence and shadowgraph_update_status, so an agent can route without opening sibling schemas.

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?

Provides explicit when-not guidance with the exact alternative named for each case: evidence goes to shadowgraph_confidence_evidence, state-only moves go to shadowgraph_update_status. This is the rare definition that fully closes the routing question.

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