Skip to main content
Glama

kb_remove_custom

Delete specific custom knowledge entries by category and key from persistent storage to maintain accurate and current information.

Instructions

Remove custom knowledge

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYes
keyYes

Implementation Reference

  • Handler for the kb_remove_custom tool. Extracts category and key from arguments, calls KnowledgeManager.removeCustomKnowledge, and returns a success or failure message.
    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/index.ts:179-190 (registration)
    Tool registration in the tools array, including name, description, and input schema for listing and validation.
    { name: 'kb_remove_custom', description: 'Remove custom knowledge', inputSchema: { type: 'object', properties: { category: { type: 'string' }, key: { type: 'string' } }, required: ['category', 'key'] } },
  • Core helper method in KnowledgeManager that finds and removes the custom knowledge entry by category and key, updates history, persists to file, and returns success boolean.
    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; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlsitechio/mcp-instruct'

If you have feedback or need assistance with the MCP directory API, please join our Discord server