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

TableJSON 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

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