config_update_scoring_weights
Adjust scoring weights in the memory-enhanced MCP server to optimize how the system prioritizes and retrieves stored information for LLMs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/ConfigurationTools.js:229-262 (handler)The handler function that executes the tool logic: merges provided weights with current ones, saves via configManager, and returns formatted response.async handleUpdateScoringWeights(args) { try { const currentWeights = this.configManager.getScoringWeights() || { novelty: 0.25, generalizability: 0.25, specificity: 0.2, validation: 0.15, impact: 0.15, }; const newWeights = { ...currentWeights, ...args }; await this.configManager.saveScoringWeights(newWeights); return { content: [ { type: 'text', text: `✅ Scoring weights updated successfully!\n\n**New Weights:**\n- Novelty: ${newWeights.novelty}\n- Generalizability: ${newWeights.generalizability}\n- Specificity: ${newWeights.specificity}\n- Validation: ${newWeights.validation}\n- Impact: ${newWeights.impact}\n\n*Total: ${Object.values(newWeights).reduce((a, b) => a + b, 0).toFixed(3)}*`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error updating scoring weights: ${error.message}`, }, ], isError: true, }; } }
- src/tools/ConfigurationTools.js:79-122 (registration)Registers the tool with the MCP server, including name, description, input schema, and handler function reference.// Register config_update_scoring_weights tool server.registerTool( 'config_update_scoring_weights', 'Update the weights used for quality scoring', { type: 'object', properties: { novelty: { type: 'number', description: 'Weight for novelty dimension (0-1)', minimum: 0, maximum: 1, }, generalizability: { type: 'number', description: 'Weight for generalizability dimension (0-1)', minimum: 0, maximum: 1, }, specificity: { type: 'number', description: 'Weight for specificity dimension (0-1)', minimum: 0, maximum: 1, }, validation: { type: 'number', description: 'Weight for validation dimension (0-1)', minimum: 0, maximum: 1, }, impact: { type: 'number', description: 'Weight for impact dimension (0-1)', minimum: 0, maximum: 1, }, }, additionalProperties: false, }, async (args) => { return await this.handleUpdateScoringWeights(args); } );
- Input schema defining the optional weight parameters for each scoring dimension.{ type: 'object', properties: { novelty: { type: 'number', description: 'Weight for novelty dimension (0-1)', minimum: 0, maximum: 1, }, generalizability: { type: 'number', description: 'Weight for generalizability dimension (0-1)', minimum: 0, maximum: 1, }, specificity: { type: 'number', description: 'Weight for specificity dimension (0-1)', minimum: 0, maximum: 1, }, validation: { type: 'number', description: 'Weight for validation dimension (0-1)', minimum: 0, maximum: 1, }, impact: { type: 'number', description: 'Weight for impact dimension (0-1)', minimum: 0, maximum: 1, }, }, additionalProperties: false, },