Skip to main content

๐Ÿ” Analysis Tools Reference

Complete reference for MCP ADR Analysis Server analysis and discovery tools.


๐Ÿ“‹ Quick Referenceโ€‹

ToolPurposeKey ParametersOutput
analyze_project_ecosystemComprehensive project analysisprojectPath, enhancedModeTechnology stack, patterns, recommendations
analyze_environmentEnvironment and deployment analysisincludeSecurityAnalysisEnvironment config, deployment readiness
analyze_content_securitySecurity content scanningcontent, enhancedModeSecurity issues, masking recommendations
review_existing_adrsADR compliance and gap analysisadrDirectory, includeTreeSitterCompliance scores, missing decisions

๐Ÿ—๏ธ analyze_project_ecosystemโ€‹

Purpose: Comprehensive analysis of project technology stack, architecture patterns, and development practices.

Parametersโ€‹

interface AnalyzeProjectEcosystemParams {
projectPath: string; // Required: Absolute path to project
analysisType?: 'quick' | 'standard' | 'comprehensive';
enhancedMode?: boolean; // Enable AI-powered analysis
knowledgeEnhancement?: boolean; // Use knowledge generation framework
recursiveDepth?: 'shallow' | 'medium' | 'comprehensive';
includeEnvironment?: boolean; // Analyze deployment environment
securityFocused?: boolean; // Focus on security analysis
includeTreeSitter?: boolean; // Enable AST analysis
}

Usage Examplesโ€‹

Basic Project Analysisโ€‹

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": "/path/to/project",
"analysisType": "standard"
}
}

Comprehensive Security-Focused Analysisโ€‹

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": "/path/to/project",
"analysisType": "comprehensive",
"enhancedMode": true,
"securityFocused": true,
"includeEnvironment": true,
"includeTreeSitter": true
}
}

Quick Technology Stack Discoveryโ€‹

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": "/path/to/project",
"analysisType": "quick",
"recursiveDepth": "shallow"
}
}

Response Formatโ€‹

interface ProjectEcosystemAnalysis {
projectInfo: {
name: string;
type: string;
primaryLanguage: string;
framework: string;
};
technologyStack: {
languages: string[];
frameworks: string[];
databases: string[];
tools: string[];
dependencies: Record<string, string>;
};
architecturalPatterns: {
patterns: string[];
confidence: number;
evidence: string[];
};
securityAnalysis?: {
issues: SecurityIssue[];
riskLevel: 'low' | 'medium' | 'high';
recommendations: string[];
};
recommendations: {
adrSuggestions: string[];
improvements: string[];
bestPractices: string[];
};
confidence: number;
}

Common Use Casesโ€‹

  1. New Project Onboarding: Understand unfamiliar codebase quickly
  2. Architecture Review: Assess current architectural decisions
  3. Technology Migration: Analyze current stack before migration
  4. Security Audit: Identify security patterns and issues
  5. Documentation Generation: Create architectural documentation

๐ŸŒ analyze_environmentโ€‹

Purpose: Analyze deployment environment, infrastructure configuration, and operational readiness.

Parametersโ€‹

interface AnalyzeEnvironmentParams {
includeSecurityAnalysis?: boolean; // Include security configuration analysis
checkContainerization?: boolean; // Analyze Docker/container setup
validateDeploymentSecurity?: boolean; // Validate deployment security
includeOptimizations?: boolean; // Suggest performance optimizations
environmentType?: 'development' | 'staging' | 'production';
}

Usage Examplesโ€‹

Basic Environment Analysisโ€‹

{
"tool": "analyze_environment",
"parameters": {
"includeSecurityAnalysis": true
}
}

Container Security Analysisโ€‹

{
"tool": "analyze_environment",
"parameters": {
"checkContainerization": true,
"validateDeploymentSecurity": true,
"environmentType": "production"
}
}

Performance Optimization Analysisโ€‹

{
"tool": "analyze_environment",
"parameters": {
"includeOptimizations": true,
"includeSecurityAnalysis": true
}
}

Response Formatโ€‹

interface EnvironmentAnalysis {
environment: {
type: string;
platform: string;
containerized: boolean;
cloudProvider?: string;
};
configuration: {
environmentVariables: Record<string, string>;
configFiles: string[];
secrets: string[];
};
security: {
issues: SecurityIssue[];
recommendations: string[];
compliance: Record<string, boolean>;
};
performance: {
optimizations: string[];
bottlenecks: string[];
recommendations: string[];
};
deployment: {
readiness: boolean;
blockers: string[];
requirements: string[];
};
}

Common Use Casesโ€‹

  1. Deployment Readiness: Validate environment before deployment
  2. Security Audit: Check environment security configuration
  3. Performance Tuning: Identify optimization opportunities
  4. Compliance Check: Validate against security standards
  5. Infrastructure Review: Assess current infrastructure setup

๐Ÿ”’ analyze_content_securityโ€‹

Purpose: Scan content for security issues, sensitive data, and compliance violations.

Parametersโ€‹

interface AnalyzeContentSecurityParams {
content: string; // Required: Content to analyze
contentType?: 'code' | 'configuration' | 'logs' | 'documentation';
enhancedMode?: boolean; // Enable advanced security analysis
enableTreeSitterAnalysis?: boolean; // Use AST-based analysis
userDefinedPatterns?: string[]; // Custom security patterns
checkFilePatterns?: boolean; // Check for sensitive file patterns
strictValidation?: boolean; // Use strict security validation
}

Usage Examplesโ€‹

Basic Security Scanโ€‹

{
"tool": "analyze_content_security",
"parameters": {
"content": "const apiKey = 'sk-1234567890abcdef';",
"contentType": "code",
"enhancedMode": true
}
}

Advanced Security Analysis with Custom Patternsโ€‹

{
"tool": "analyze_content_security",
"parameters": {
"content": "COMPANY_SECRET=internal-token-12345",
"contentType": "configuration",
"enhancedMode": true,
"enableTreeSitterAnalysis": true,
"userDefinedPatterns": ["COMPANY_[A-Z_]+", "internal-.*-token"],
"strictValidation": true
}
}

File Pattern Security Checkโ€‹

{
"tool": "analyze_content_security",
"parameters": {
"content": "Check if .env files are in git",
"contentType": "configuration",
"checkFilePatterns": true
}
}

Response Formatโ€‹

interface ContentSecurityAnalysis {
securityIssues: SecurityIssue[];
riskLevel: 'low' | 'medium' | 'high' | 'critical';
maskingRecommended: boolean;
patterns: {
detected: string[];
confidence: number;
locations: Array<{
line: number;
column: number;
pattern: string;
}>;
};
recommendations: string[];
compliance: {
gdpr: boolean;
pci: boolean;
hipaa: boolean;
};
}

interface SecurityIssue {
type: string;
severity: 'low' | 'medium' | 'high' | 'critical';
line?: number;
column?: number;
pattern: string;
description: string;
recommendation: string;
}

Common Use Casesโ€‹

  1. Pre-Commit Security: Scan code before committing
  2. Documentation Review: Check docs for sensitive information
  3. Configuration Audit: Validate config files for secrets
  4. Compliance Check: Ensure content meets compliance standards
  5. Incident Response: Analyze potentially compromised content

๐Ÿ“‹ review_existing_adrsโ€‹

Purpose: Analyze existing ADRs for compliance, completeness, and identify missing architectural decisions.

Parametersโ€‹

interface ReviewExistingAdrsParams {
adrDirectory: string; // Required: Path to ADR directory
includeTreeSitter?: boolean; // Enable code analysis
complianceFramework?: 'madr' | 'nygard' | 'custom';
analysisDepth?: 'basic' | 'comprehensive';
projectPath?: string; // Project path for code analysis
generateRecommendations?: boolean; // Generate improvement recommendations
}

Usage Examplesโ€‹

Basic ADR Reviewโ€‹

{
"tool": "review_existing_adrs",
"parameters": {
"adrDirectory": "./adrs"
}
}

Comprehensive ADR Analysis with Code Validationโ€‹

{
"tool": "review_existing_adrs",
"parameters": {
"adrDirectory": "./adrs",
"includeTreeSitter": true,
"complianceFramework": "madr",
"analysisDepth": "comprehensive",
"projectPath": ".",
"generateRecommendations": true
}
}

Quick Compliance Checkโ€‹

{
"tool": "review_existing_adrs",
"parameters": {
"adrDirectory": "./adrs",
"complianceFramework": "nygard",
"analysisDepth": "basic"
}
}

Response Formatโ€‹

interface AdrReviewAnalysis {
summary: {
totalAdrs: number;
complianceScore: number;
completenessScore: number;
qualityScore: number;
};
adrAnalysis: Array<{
file: string;
title: string;
status: string;
compliance: {
score: number;
issues: string[];
recommendations: string[];
};
implementation: {
implemented: boolean;
evidence: string[];
gaps: string[];
};
}>;
gaps: {
missingDecisions: string[];
undocumentedPatterns: string[];
implementationGaps: string[];
};
recommendations: {
newAdrs: string[];
improvements: string[];
processChanges: string[];
};
}

Common Use Casesโ€‹

  1. ADR Audit: Assess quality of existing ADRs
  2. Gap Analysis: Identify missing architectural decisions
  3. Compliance Check: Validate ADRs against standards
  4. Process Improvement: Identify ADR process improvements
  5. Documentation Cleanup: Find outdated or incomplete ADRs

๐Ÿ”ง Advanced Analysis Patternsโ€‹

Chaining Analysis Toolsโ€‹

Progressive Analysis Workflow:

// 1. Start with ecosystem analysis
{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"analysisType": "standard"
}
}

// 2. Deep dive into security if issues found
{
"tool": "analyze_content_security",
"parameters": {
"content": "/* code from ecosystem analysis */",
"enhancedMode": true,
"enableTreeSitterAnalysis": true
}
}

// 3. Review existing ADRs for gaps
{
"tool": "review_existing_adrs",
"parameters": {
"adrDirectory": "./adrs",
"includeTreeSitter": true,
"projectPath": "."
}
}

// 4. Analyze deployment environment
{
"tool": "analyze_environment",
"parameters": {
"includeSecurityAnalysis": true,
"checkContainerization": true
}
}

Performance Optimizationโ€‹

For Large Projects:

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"analysisType": "quick",
"recursiveDepth": "shallow",
"enhancedMode": false
}
}

For Detailed Analysis:

{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"analysisType": "comprehensive",
"enhancedMode": true,
"knowledgeEnhancement": true,
"includeTreeSitter": true
}
}

Error Handlingโ€‹

Common Error Patterns:

  • Path not found: Ensure absolute paths are used
  • Permission denied: Check file/directory permissions
  • Analysis timeout: Reduce scope or use quick analysis
  • Memory issues: Process large projects in chunks

Diagnostic Commands:

// Check environment
{
"tool": "analyze_environment",
"parameters": {
"includeOptimizations": true
}
}

// Validate project structure
{
"tool": "analyze_project_ecosystem",
"parameters": {
"projectPath": ".",
"analysisType": "quick"
}
}

๐Ÿ“Š Analysis Best Practicesโ€‹

1. Start with Quick Analysisโ€‹

  • Use analysisType: "quick" for initial exploration
  • Progressively increase depth based on findings
  • Focus on specific areas of concern

2. Security-First Approachโ€‹

  • Always include security analysis for production systems
  • Use custom patterns for organization-specific secrets
  • Validate security configurations before deployment

3. Iterative Analysisโ€‹

  • Analyze โ†’ Review โ†’ Refine โ†’ Re-analyze
  • Use findings from one tool to inform parameters for others
  • Build comprehensive understanding through multiple passes

4. Context-Aware Analysisโ€‹

  • Provide project context through parameters
  • Use appropriate analysis depth for project size
  • Consider team expertise and project maturity

5. Performance Considerationsโ€‹

  • Monitor analysis time and resource usage
  • Use caching for repeated analyses
  • Optimize parameters for your specific use case


Need help with analysis tools? โ†’ Troubleshooting Guide or File an Issue