kb_delete
Delete knowledge-base entities or exact relationship triples after dependency checks, with dryRun previews and plan-based handling for authored sources.
Instructions
Delete entities by ID, or exact relationship triples. Use only for intentional removals after dependency checks. Do not use as a bulk cleanup shortcut. An entity authored in a Markdown or YAML source is not deleted directly: the call writes nothing and returns outcome plan_returned with a hash-bound deletionPlan and a nextActions entry holding the exact kb_apply_plan input ({plan, approvedPlanHash}); apply that unmodified, or repeat this call with approvedPlanHash = deletionPlan.planHash to apply the freshly computed plan in one step (a stale or different hash fails with DELETE_PLAN_HASH_MISMATCH and writes nothing). Authored requirements are never deleted: outcome supersession_required points to kb_upsert with a supersedes relationship. dryRun:true previews any delete and writes nothing. Side effects: mutates and saves KB and authored sources; skips entities with dependents; dryRun and plan_returned write nothing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "kb_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | Entity IDs to delete after dependency checks. | |
| dryRun | No | Preview without writing: returns what a commit would delete and write. | |
| relationships | No | Exact relationship triples to retract, including legacy shard records. | |
| workspaceRoot | No | Optional absolute path of the workspace this call is about, such as your git worktree, when it is not the server's. | |
| approvedPlanHash | No | With ids only: the deletionPlan.planHash a prior call returned; applied only while the hash still matches. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| status | Yes | ||
| effects | Yes | ||
| operation | Yes | ||
| diagnostics | Yes | ||
| nextActions | Yes | ||
| kibiProtocol | Yes | ||
| resultVersion | Yes |