Skip to main content
Glama

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
NameRequiredDescriptionDefault
communicationStyleNo
learningStyleNo
workingHoursNo
responseDetailNo
technicalLevelNo
favoriteToolsNo
interestsNo

Implementation Reference

  • 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(); }
  • 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' } } } } },
  • 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' } ] }; }
  • 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[]; }

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