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[];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Update' implies a mutation operation, the description doesn't specify whether this requires authentication, what permissions are needed, whether changes are persistent or reversible, or what happens if only partial parameters are provided. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise - a single sentence that gets straight to the point with no wasted words. It's front-loaded with the core action and provides specific examples. However, it could be slightly more structured by explicitly mentioning it's for user preferences rather than just 'preferences'.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 7 parameters, 0% schema description coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after the update, whether there's confirmation, what format the response takes, or how to handle partial updates. The description should do much more to compensate for the lack of structured documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for 7 parameters, the description provides minimal help. It mentions 'communication style' and 'technical level' which map to two parameters, but doesn't explain the other 5 parameters (learningStyle, workingHours, responseDetail, favoriteTools, interests) or provide context about what values are expected, how arrays should be formatted, or what the enums represent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Update') and resource ('user preferences'), with specific examples of what can be updated ('communication style, technical level, etc.'). It distinguishes from siblings like kb_update_personal or kb_update_professional by focusing specifically on preferences rather than other user data categories.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like kb_update_personal or kb_update_professional. It doesn't mention prerequisites, dependencies, or any context about when this update operation is appropriate versus other preference-related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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