Skip to content
Docs menu

Tool reference · Errors, rules & self-improvement

self_error_log

Logs a mistake or failure with a category so the memory can spot repeating error patterns.

local stdio server writes

When to use

  • A command failed, an API returned an error or an assumption turned out wrong.
  • You noticed you were going in circles (category loop_detected).
  • You fixed a mistake and want the fix recorded next to it.

Parameters

NameTypeDefaultDescription
descriptionrequired string — What went wrong: symptom, expectation vs reality
categoryrequired "code_error" | "logic_error" | "config_error" | "api_error" | "timeout" | "loop_detected" | "wrong_assumption" | "missing_context" — Error category for pattern grouping
severity "low" | "medium" | "high" | "critical" "medium" —
fix string "" How it was fixed (empty if unresolved)
context string "" What was being done when error occurred
project string "general" —
tags string[] — —

Example

Arguments

{
  "description": "Ran migrations against the test DB; expected dev DB",
  "category": "config_error",
  "severity": "medium",
  "fix": "Set DATABASE_URL in .env.local",
  "context": "Adding orders.status column",
  "project": "my-api"
}

Result shape

{
  "logged": true,
  "error_id": 231
}

When 3 or more errors of the same category appear in 30 days, the result also has a pattern object with a suggestion to add or upvote an insight.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Log an error/failure for pattern analysis. Call AUTOMATICALLY when: bash command fails, wrong assumption discovered, API returns error, config issue found, loop detected, or any mistake occurs. System detects patterns (3+ same category) and suggests insights.

Found a mistake? Open an issue on GitHub.

Search