config_update_scoring_weights
Adjust scoring weights in the MCP server to optimize LLM performance by refining decision-making priorities and enhancing memory retention for continuous learning across sessions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/ConfigurationTools.js:229-262 (handler)The handler function that implements the tool logic: retrieves current weights, merges with provided args, saves via configManager, and returns formatted success/error 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, }; } }
- Input schema defining the parameters for updating scoring weights (novelty, generalizability, specificity, validation, impact), each as numbers between 0-1.{ 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, },
- src/tools/ConfigurationTools.js:80-122 (registration)Tool registration call in ConfigurationTools.registerTools method, specifying name, description, input schema, and handler.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); } );