kb_get_custom
Retrieve custom knowledge by category from persistent personal and organizational storage, enabling AI agents to access structured data for instant context across sessions.
Instructions
Get custom knowledge by category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Category to retrieve (optional, returns all if not specified) |
Implementation Reference
- src/index.ts:736-747 (handler)The handler case for 'kb_get_custom' tool execution. Extracts optional category from arguments, calls KnowledgeManager.getCustom(), and returns the custom knowledge as JSON-formatted text content.case 'kb_get_custom': { const category = (args as any).category; const custom = km.getCustom(category); return { content: [ { type: 'text', text: JSON.stringify(custom, null, 2) } ] }; }
- src/index.ts:239-251 (schema)Tool schema definition and registration in the tools array used for ListToolsRequestSchema. Defines input schema with optional 'category' string parameter.{ name: 'kb_get_custom', description: 'Get custom knowledge by category', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'Category to retrieve (optional, returns all if not specified)' } } } },
- src/KnowledgeManager.ts:348-353 (helper)Core helper method 'getCustom' in KnowledgeManager class that filters the kb.custom array by category if provided, otherwise returns all custom knowledge entries.getCustom(category?: string): CustomKnowledge[] { if (category) { return this.kb.custom.filter(k => k.category === category); } return [...this.kb.custom]; }