kb_remove_custom
Delete specific custom knowledge entries from persistent storage by specifying category and key to manage stored information.
Instructions
Remove custom knowledge
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| key | Yes |
Implementation Reference
- src/index.ts:179-190 (registration)Tool registration including name, description, and input schema for kb_remove_custom.{ name: 'kb_remove_custom', description: 'Remove custom knowledge', inputSchema: { type: 'object', properties: { category: { type: 'string' }, key: { type: 'string' } }, required: ['category', 'key'] } },
- src/index.ts:619-632 (handler)MCP tool handler that delegates to KnowledgeManager.removeCustomKnowledge and formats response.case 'kb_remove_custom': { const { category, key } = args as any; const removed = await km.removeCustomKnowledge(category, key); return { content: [ { type: 'text', text: removed ? `✅ Removed custom knowledge: ${category}/${key}` : `❌ Not found: ${category}/${key}` } ] }; }
- src/KnowledgeManager.ts:244-259 (helper)Core implementation in KnowledgeManager that removes the specified custom knowledge entry, logs to history, persists changes, and returns success status.async removeCustomKnowledge(category: string, key: string): Promise<boolean> { const index = this.kb.custom.findIndex(k => k.category === category && k.key === key); if (index >= 0) { const oldValue = this.kb.custom[index].value; this.kb.custom.splice(index, 1); this.addHistory({ action: 'delete', category: `custom:${category}`, field: key, oldValue }); await this.save(); return true; } return false; }