Skip to main content
Glama

smart_score

Recalculate, sync, diagnose, and optimize project health scores across task completion, deployment readiness, architecture compliance, security posture, and code quality components.

Instructions

Central coordination for project health scoring system - recalculate, sync, diagnose, optimize, and reset scores across all MCP tools

Input Schema

NameRequiredDescriptionDefault
analysisModeNoMethod for weight optimization (for optimize_weights operation)current_state
checkDataFreshnessNoValidate data freshness across tools (for diagnose_scores operation)
componentNoScore component to reset (for reset_scores operation)all
componentsNoScore components to recalculate (for recalculate_scores operation)
customWeightsNoCustom weight overrides (for optimize_weights operation)
forceUpdateNoForce update even if data is fresh
includeHistoryNoInclude score history analysis (for diagnose_scores operation)
intentIdNoIntent ID to get score trends for (for get_intent_scores operation)
operationYesSmart scoring operation to perform
preserveHistoryNoPreserve score history in backup (for reset_scores operation)
previewOnlyNoPreview changes without applying (for optimize_weights operation)
projectPathYesPath to project directory
rebalanceWeightsNoRecalculate optimal scoring weights (for sync_scores operation)
recalculateAfterResetNoImmediately recalculate after reset (for reset_scores operation)
suggestImprovementsNoProvide score improvement suggestions (for diagnose_scores operation)
todoPathNoPath to TODO.md file (for sync_scores operation)TODO.md
triggerToolsNoTools to trigger for fresh data (for sync_scores operation)
updateSourcesNoTrigger source tool updates before recalculating

Input Schema (JSON Schema)

{ "properties": { "analysisMode": { "default": "current_state", "description": "Method for weight optimization (for optimize_weights operation)", "enum": [ "current_state", "historical_data", "project_type" ], "type": "string" }, "checkDataFreshness": { "default": true, "description": "Validate data freshness across tools (for diagnose_scores operation)", "type": "boolean" }, "component": { "default": "all", "description": "Score component to reset (for reset_scores operation)", "enum": [ "task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all" ], "type": "string" }, "components": { "default": [ "all" ], "description": "Score components to recalculate (for recalculate_scores operation)", "items": { "enum": [ "task_completion", "deployment_readiness", "architecture_compliance", "security_posture", "code_quality", "all" ], "type": "string" }, "type": "array" }, "customWeights": { "description": "Custom weight overrides (for optimize_weights operation)", "properties": { "architectureCompliance": { "maximum": 1, "minimum": 0, "type": "number" }, "codeQuality": { "maximum": 1, "minimum": 0, "type": "number" }, "deploymentReadiness": { "maximum": 1, "minimum": 0, "type": "number" }, "securityPosture": { "maximum": 1, "minimum": 0, "type": "number" }, "taskCompletion": { "maximum": 1, "minimum": 0, "type": "number" } }, "type": "object" }, "forceUpdate": { "default": false, "description": "Force update even if data is fresh", "type": "boolean" }, "includeHistory": { "default": true, "description": "Include score history analysis (for diagnose_scores operation)", "type": "boolean" }, "intentId": { "description": "Intent ID to get score trends for (for get_intent_scores operation)", "type": "string" }, "operation": { "description": "Smart scoring operation to perform", "enum": [ "recalculate_scores", "sync_scores", "diagnose_scores", "optimize_weights", "reset_scores", "get_score_trends", "get_intent_scores" ], "type": "string" }, "preserveHistory": { "default": true, "description": "Preserve score history in backup (for reset_scores operation)", "type": "boolean" }, "previewOnly": { "default": false, "description": "Preview changes without applying (for optimize_weights operation)", "type": "boolean" }, "projectPath": { "description": "Path to project directory", "type": "string" }, "rebalanceWeights": { "default": false, "description": "Recalculate optimal scoring weights (for sync_scores operation)", "type": "boolean" }, "recalculateAfterReset": { "default": true, "description": "Immediately recalculate after reset (for reset_scores operation)", "type": "boolean" }, "suggestImprovements": { "default": true, "description": "Provide score improvement suggestions (for diagnose_scores operation)", "type": "boolean" }, "todoPath": { "default": "TODO.md", "description": "Path to TODO.md file (for sync_scores operation)", "type": "string" }, "triggerTools": { "description": "Tools to trigger for fresh data (for sync_scores operation)", "items": { "enum": [ "manage_todo_json", "smart_git_push", "compare_adr_progress", "analyze_content_security", "validate_rules" ], "type": "string" }, "type": "array" }, "updateSources": { "default": true, "description": "Trigger source tool updates before recalculating", "type": "boolean" } }, "required": [ "operation", "projectPath" ], "type": "object" }

Implementation Reference

  • Registration of 'smart_score' tool in AVAILABLE_TOOLS array used by the tool chain orchestrator
    const AVAILABLE_TOOLS = [ 'analyze_project_ecosystem', 'generate_adrs_from_prd', 'suggest_adrs', 'analyze_content_security', 'generate_rules', 'generate_adr_todo', 'compare_adr_progress', 'manage_todo', 'generate_deployment_guidance', 'smart_score', 'troubleshoot_guided_workflow', 'smart_git_push', 'generate_research_questions', 'validate_rules', 'analyze_code_patterns', 'suggest_improvements', 'generate_test_scenarios', 'create_documentation', 'security_audit', 'performance_analysis', 'dependency_analysis', 'refactoring_suggestions', 'api_documentation', 'deployment_checklist', 'release_notes', ] as const;
  • Capability description for 'smart_score' tool in TOOL_CAPABILITIES mapping
    const TOOL_CAPABILITIES = { analyze_project_ecosystem: 'Analyze technology stack, dependencies, and architectural patterns', generate_adrs_from_prd: 'Convert Product Requirements Documents to Architectural Decision Records', suggest_adrs: 'Auto-suggest ADRs based on code analysis and project patterns', analyze_content_security: 'Detect and mask sensitive information in project content', generate_rules: 'Extract architectural rules and constraints from project analysis', generate_adr_todo: 'Generate TODO.md from ADRs with comprehensive task breakdown', compare_adr_progress: 'Validate TODO vs ADRs vs actual environment state', manage_todo: 'Comprehensive TODO.md lifecycle management and progress tracking', generate_deployment_guidance: 'AI-driven deployment procedures from architectural decisions', smart_score: 'Project health scoring with cross-tool synchronization', troubleshoot_guided_workflow: 'Systematic troubleshooting with ADR/TODO alignment', smart_git_push: 'Intelligent release readiness analysis and git operations', generate_research_questions: 'Generate targeted research questions for project analysis', validate_rules: 'Validate architectural rule compliance across the project', analyze_code_patterns: 'Identify code patterns and architectural consistency', suggest_improvements: 'Provide targeted improvement recommendations', generate_test_scenarios: 'Create comprehensive test scenarios and strategies', create_documentation: 'Generate project documentation from code and ADRs', security_audit: 'Comprehensive security analysis and vulnerability detection', performance_analysis: 'Analyze performance bottlenecks and optimization opportunities', dependency_analysis: 'Analyze project dependencies and potential issues', refactoring_suggestions: 'Suggest code refactoring based on architectural principles', api_documentation: 'Generate API documentation from code analysis', deployment_checklist: 'Create deployment checklists based on ADRs and project state', release_notes: 'Generate release notes from commits, ADRs, and TODO completion', };
  • 'smart_score' suggested for score-related intents in fallback intent analysis
    score: ['smart_score'], troubleshoot: ['troubleshoot_guided_workflow'], security: ['analyze_content_security', 'security_audit'], }; const suggestedTools: string[] = [];
  • 'smart_score' listed in hardcoded tools array for server context generation
    name: 'smart_score', description: 'Score code quality and architecture (0-100) with detailed analysis', }, { name: 'tool_chain_orchestrator', description: 'AI-powered dynamic tool sequencing and workflow coordination', }, { name: 'mcp_planning', description: 'Plan and manage MCP workflows and project phases' }, ];
  • Computes project quality overallScore, potentially used by smart_score tool (no direct reference)
    export async function generateProjectMetricsResource(): Promise<ResourceGenerationResult> { const cacheKey = 'project-metrics'; // Check cache const cached = await resourceCache.get<ResourceGenerationResult>(cacheKey); if (cached) { return cached; } // Gather metrics const [codebase, quality, architecture, dependencies, git] = await Promise.all([ getCodebaseStats(), calculateQualityMetrics(), getArchitectureMetrics(), getDependencyMetrics(), getGitMetrics(), ]); const productivity = calculateProductivityMetrics(git); const projectMetrics: ProjectMetrics = { codebase, quality, architecture, dependencies, git, productivity, }; const result: ResourceGenerationResult = { data: projectMetrics, contentType: 'application/json', lastModified: new Date().toISOString(), cacheKey, ttl: 300, // 5 minutes cache etag: generateETag(projectMetrics), }; // Cache result resourceCache.set(cacheKey, result, result.ttl); return result; }

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/tosin2013/mcp-adr-analysis-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server