kb_update_preferences
Update user preferences for communication style, technical level, and response detail to personalize AI interactions.
Instructions
Update user preferences (communication style, technical level, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| communicationStyle | No | ||
| learningStyle | No | ||
| workingHours | No | ||
| responseDetail | No | ||
| technicalLevel | No | ||
| favoriteTools | No | ||
| interests | No |
Implementation Reference
- src/KnowledgeManager.ts:175-188 (handler)Core handler that updates the preferences section of the knowledge base, logs the change in history, and persists to disk.async updatePreferences(updates: Partial<Preferences>): Promise<void> { Object.entries(updates).forEach(([field, value]) => { const oldValue = (this.kb.preferences as any)[field]; (this.kb.preferences as any)[field] = value; this.addHistory({ action: oldValue === undefined ? 'add' : 'update', category: 'preferences', field, oldValue, newValue: value }); }); await this.save(); }
- src/index.ts:123-134 (schema)JSON schema defining the input parameters for the kb_update_preferences tool.inputSchema: { type: 'object', properties: { communicationStyle: { type: 'string' }, learningStyle: { type: 'string' }, workingHours: { type: 'string' }, responseDetail: { type: 'string', enum: ['concise', 'detailed', 'balanced'] }, technicalLevel: { type: 'string', enum: ['beginner', 'intermediate', 'expert'] }, favoriteTools: { type: 'array', items: { type: 'string' } }, interests: { type: 'array', items: { type: 'string' } } } }
- src/index.ts:120-135 (registration)Tool registration in the tools array used by ListToolsRequestSchema handler.{ name: 'kb_update_preferences', description: 'Update user preferences (communication style, technical level, etc.)', inputSchema: { type: 'object', properties: { communicationStyle: { type: 'string' }, learningStyle: { type: 'string' }, workingHours: { type: 'string' }, responseDetail: { type: 'string', enum: ['concise', 'detailed', 'balanced'] }, technicalLevel: { type: 'string', enum: ['beginner', 'intermediate', 'expert'] }, favoriteTools: { type: 'array', items: { type: 'string' } }, interests: { type: 'array', items: { type: 'string' } } } } },
- src/index.ts:581-591 (handler)MCP CallToolRequestSchema switch case dispatcher that invokes the KnowledgeManager update.case 'kb_update_preferences': { await km.updatePreferences(args as any); return { content: [ { type: 'text', text: '✅ Preferences updated successfully' } ] }; }
- src/types.ts:24-32 (schema)TypeScript interface defining the Preferences structure used by the update method.export interface Preferences { communicationStyle?: string; learningStyle?: string; workingHours?: string; responseDetail?: 'concise' | 'detailed' | 'balanced'; technicalLevel?: 'beginner' | 'intermediate' | 'expert'; favoriteTools?: string[]; interests?: string[]; }