Tool reference · Errors, rules & self-improvement
self_insight
Creates, votes on, edits, lists and promotes insights, which are lessons drawn from repeated errors.
local stdio server writes
Caution. downvote archives the insight once its importance reaches 0.
When to use
- self_error_log reported a pattern and you want to write down the lesson (action "add").
- An existing insight proved right again (action "upvote") or wrong (action "downvote").
- An insight is strong enough to become a permanent rule (action "promote").
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
actionrequired | "add" | "upvote" | "downvote" | "edit" | "list" | "promote" | — | — |
id | integer | — | Insight ID (for upvote/downvote/edit/promote) |
content | string | — | Insight text (for add/edit) |
category | string | — | Error category (for add) |
context | string | "" | — |
source_error_ids | integer[] | — | Error IDs that spawned this (for add) |
project | string | "general" | — |
tags | string[] | — | — |
Example
Arguments
{
"action": "add",
"content": "Check which DATABASE_URL is loaded before running migrations.",
"category": "config_error",
"source_error_ids": [
229,
230,
231
],
"project": "my-api"
} Result shape
{
"action": "added",
"id": 58,
"importance": 2
} If a very similar insight already exists, add upvotes it instead and returns action "auto_upvoted". Promotion requires importance >= 5 and confidence >= 0.8.
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:
Manage insights from error patterns (ExpeL-style). Actions: add (create, importance=2), upvote (+1), downvote (-1, auto-archive at 0), edit, list, promote (to rule when importance>=5 AND confidence>=0.8). Call 'add' when pattern detected. Call 'upvote' when insight confirmed again.