Skip to content

API Reference

API illustration

Programmatic access to analyzers, detectors, pipeline, and MCP server tools. All API documentation is generated from Google-style docstrings via mkdocstrings.

  • Analyzers


    BaseAnalyzer and language-specific implementations using the Template Method pattern.

    Analyzers

  • Detectors


    163 ViolationDetector implementations across 14 languages — each a Strategy class.

    Detectors

  • Models


    Pydantic models for AnalysisResult, Violation, AnalysisContext, and report contracts.

    Models

  • Pipeline


    DetectionPipeline orchestration, rule projection, and config merging.

    Pipeline

  • Rules


    151 ZenPrinciple models and rule-to-detector mappings across all languages.

    Rules

  • Server Tools


    MCP tool entry points: analyze_zen_violations, generate_report, generate_prompts.

    Server

Quick usage

from mcp_zen_of_languages.analyzers.analyzer_factory import AnalyzerFactory

analyzer = AnalyzerFactory.create("python")
result = analyzer.analyze(code)
for violation in result.violations:
    print(f"{violation.severity}: {violation.message}")
{
  "tool": "analyze_zen_violations",
  "arguments": {
    "language": "python",
    "code": "def foo(): pass"
  }
}

Docstring quality

API pages are sourced from module docstrings and signatures. Keep Args, Returns, See Also, and Examples sections up to date for best output.

See Also

  • User GuideCLI-first workflows and interpretation guidance.
  • Getting Started — Installation and first analysis path.
  • Contributing — Architecture and detector extension workflows.