shadowgraph_record_attempt
Record one solution attempt with its result and optional context, then return the stored record; link it to a related decision and use an idempotency key to deduplicate retries.
Instructions
Record one attempt with its solution and result, returning the stored attempt. Link relatedTo to an existing decision. shadowgraph_record_decision records choices, shadowgraph_record_outcome updates one, shadowgraph_record_fact records facts. Appends an attempt and journal entry and commits a revision; idempotencyKey deduplicates retries (conflicts error); resultClass overrides wording.
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": {
"solution": "<solution>",
"result": "<result>"
},
"name": "shadowgraph_record_attempt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Free-form labels stored with the attempt. Searchable content. | |
| task | No | Task or problem context this attempt was trying to solve. Searchable content. | |
| actor | No | Who performed this write, such as an agent or person name. Stored for audit; never used to grant trust. | |
| client | No | Which client software performed this write, such as the host application name. | |
| reason | No | Why it turned out that way. Searchable content. | |
| result | Yes | What happened. Required, non-empty, and searchable content. When resultClass is omitted, words such as failed, error, or regression surface the attempt in shadowgraph_context failedAttempts; a captured attempt's wording is never read. | |
| project | No | Owning project; required unless originId is set, else the write is refused. | |
| originId | No | Capture-origin ID for unattributed records when project is omitted. | |
| solution | Yes | What was tried. Required, non-empty, and searchable content. | |
| relatedTo | No | Identifiers of related entities such as decisions or other attempts. | |
| sessionId | No | Caller-owned identifier that groups related writes in the audit trail. | |
| visibility | No | Visibility scope for cross-project recall and context: project (default) or global. | |
| environment | No | Where it was tried, such as a runtime, OS, or version. Searchable content, so a later attempt can be matched to the same environment. | |
| resultClass | No | Optional classification: failed, succeeded, or inconclusive. Overrides wording-based failure detection when provided. | |
| sourceClass | No | Claimed origin, never proof: agent_claimed (the default), tool_observed, human_confirmed, or production_verified. It weights confidence only. An unrecognised label downgrades to agent_claimed, kept verbatim in sourceRaw. | |
| reusableWhen | No | Conditions for reusing this attempt: legacy keys, symbolic strings, or structured rules using stored facts and key/value or target/expected aliases. Symbolic operators: >=, <=, ==, !=, >, <. All must hold; unresolved conditions block reuse. | |
| idempotencyKey | No | Retry identity within the project or origin and operation (also scope/type/key for memory). Reuse it to recover the original canonical ID; this key is never an entity ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Stable entity identifier. | |
| kind | Yes | Entity kind: decision, attempt, memory, fact, relation, review, or alternative. | |
| tags | No | Labels or extracted keywords stored with the attempt. | |
| task | No | Task or problem context this attempt was trying to solve. | |
| actor | No | Who performed the write. | |
| client | No | Which client performed the write. | |
| reason | No | Why it turned out that way, verbatim as recorded. | |
| result | No | What happened. | |
| project | No | Project namespace; null for an unattributed record or one imported from before projects. | |
| solution | No | What was tried. | |
| createdAt | No | ISO 8601 creation time. | |
| relatedTo | No | Identifiers of related entities. | |
| sessionId | No | Session identifier recorded with the write. | |
| sourceRaw | No | The original origin label when it differed from sourceClass. Audit only; never evidence. | |
| updatedAt | No | ISO 8601 time of the last change. | |
| visibility | No | Visibility boundary: project or global. | |
| causalClaim | No | The cause, attributed apart from the attempt: state recorded (the reason, agent_claimed), unknown, not_recorded, or legacy_freetext (a reason stored before causes were, never classed or evidenced). | |
| environment | No | Where it was tried. | |
| resultClass | No | Declared or observed: failed, succeeded, or inconclusive. If absent: not captured (no captureRef or outcomeEvidence), the wording heuristic classifies; captured, the outcome is undetermined. | |
| sourceClass | No | Claimed origin class recorded with the write. A claim, never proof. | |
| reusableWhen | No | Conditions recorded for reusing the attempt. All must hold, and none may be unresolved. | |
| schemaVersion | No | Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded. |