mcp-zen-of-languages

v0.9.1
mcp-zen-of-languages Checked 4 days ago Published 3 months ago

Multi-language architectural and idiomatic code analysis via CLI and MCP server.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

detect_languages Detect languages

Return supported language list for analysis.

ParameterTypeDescription
repo_path *stringWorkspace root passed by the MCP client — reserved for future per-repo config resolution but currently unused.

analyze_zen_violations Analyze zen violations (v2)

Analyze a code snippet against zen rules with stricter request-quality guardrails and richer telemetry metadata.

ParameterTypeDescription
code *stringSource code to analyse.
language *stringProgramming language identifier.
allow_temporary_runnersbooleanAllow temporary runners. Default to False.
enable_external_toolsbooleanEnable external tools. Default to False.
perspectivestringRequested analysis perspective. Default to ``PerspectiveMode.ALL``.
project_asProjection-family target when ``perspective`` is ``projection``.
severity_thresholdSeverity threshold. Default to None.

generate_prompts Generate remediation prompts (v2)

Generate remediation prompts with MCP-first guidance metadata and v2 versioned prompt semantics.

ParameterTypeDescription
code *stringSource code to analyse.
language *stringProgramming language identifier.
allow_temporary_runnersbooleanAllow temporary runners. Default to False.
enable_external_toolsbooleanEnable external tools. Default to False.
perspectivestringRequested analysis perspective. Default to ``PerspectiveMode.ALL``.
project_asProjection-family target when ``perspective`` is ``projection``.

analyze_repository Analyze repository

Analyze a repository path and return per-file analysis results.

ParameterTypeDescription
repo_path *stringAbsolute path to the repository root. The MCP client typically resolves this from the active workspace.
allow_temporary_runnersbooleanPermit temporary-runner fallback strategies for external tools. Default to False.
enable_external_toolsbooleanOpt-in execution of allow-listed external tools while analyzing files. Default to False.
languagesRestrict analysis to specific language identifiers. Defaults to ``["python"]`` internally.
max_filesintegerPer-language cap on the number of files to analyse, protecting against excessive runtime on monorepos. Default to 100.

analyze_batch Analyze repository (batch / LLM-safe)

Analyse a repository path and return token-budgeted, paginated violations designed for LLM context windows. Highest-severity violations appear first. Pass the returned cursor to resume from the next page.

ParameterTypeDescription
language *stringLanguage identifier to restrict analysis (e.g. ``"python"``).
path *stringAbsolute or relative path to the repository root.
allow_temporary_runnersbooleanPermit temporary-runner strategies. Default to False.
cursorOpaque continuation token from a previous call. Omit or pass ``None`` to start from the first page. Default to None.
enable_external_toolsbooleanOpt-in execution of external linters. Default to False.
max_filesintegerCap on the number of files to analyse. Default to 100.
max_tokensintegerApproximate token budget for the ``violations`` payload. Violations are added until the budget would be exceeded; the envelope overhead is excluded from this count. Default to 8000.

analyze_batch_summary Analyze repository — batch summary

Return a compact project health score and top-5 hotspot files from a repository scan. Always fits within a single LLM context window. Use this before analyze_batch to decide whether full pagination is needed.

ParameterTypeDescription
language *stringLanguage identifier to restrict analysis (e.g. ``"python"``).
path *stringAbsolute or relative path to the repository root.
allow_temporary_runnersbooleanPermit temporary-runner strategies. Default to False.
enable_external_toolsbooleanOpt-in execution of external linters. Default to False.
max_filesintegerCap on the number of files to analyse. Default to 100.

analyze_batch_auto Analyze repository (auto-routing)

Smart entry point for LLM agents: automatically decides between returning all violations at once (small repos) or paginating (large repos). Pass the returned cursor back to continue pagination if has_more is true. Prefer this over manually choosing between analyze_repository and analyze_batch.

ParameterTypeDescription
language *stringLanguage identifier to restrict analysis (e.g. ``"python"``).
path *stringAbsolute or relative path to the repository root.
allow_temporary_runnersbooleanPermit temporary-runner strategies. Default to False.
cursorOpaque continuation token from a previous call. Omit or pass ``None`` to start from the first page. Default to None.
enable_external_toolsbooleanOpt-in execution of external linters. Default to False.
max_filesintegerCap on the number of files to analyse. Default to 100.
max_tokensintegerApproximate token budget for the ``violations`` payload. When all violations fit, they are returned in full; otherwise the first page is returned. Default to 8000.

generate_agent_tasks Generate agent tasks

Convert zen violations into structured agent task lists for automated remediation.

ParameterTypeDescription
repo_path *stringAbsolute path to the repository to scan. All eligible source files are discovered recursively.
allow_temporary_runnersbooleanPermit temporary-runner fallback strategies for external tools. Default to False.
enable_external_toolsbooleanOpt-in execution of allow-listed external tools while gathering repository analysis. Default to False.
languagesRestrict scanning to these languages. Omit to analyse only Python files by default. Default to None.
min_severityintegerSeverity floor (1-10 scale). Violations below this threshold are excluded from the task list. Default to 5.

check_architectural_patterns Check architectural patterns

Return detected architectural patterns for a code snippet.

ParameterTypeDescription
code *stringSource fragment to inspect for structural patterns.
language *stringLanguage identifier guiding which pattern recognisers to apply (e.g. ``"python"``, ``"go"``).

generate_report Generate report

Generate a markdown/json report with gap analysis and prompts.

ParameterTypeDescription
target_path *stringPath to a single file or a directory. When a directory is given, all eligible files inside are analysed.
include_analysisbooleanInclude the violation-analysis body showing per-rule findings. Default to True.
include_gapsbooleanInclude quality-gap and coverage-gap summaries highlighting areas that need attention. Default to True.
include_promptsbooleanAppend remediation prompt sections derived from ``build_prompt_bundle``. Default to False.
languageExplicit language override. When omitted, the language is inferred from file extensions. Default to None.
perspectivestringRequested report perspective. Default to ``PerspectiveMode.ALL``.
project_asProjection-family target when ``perspective`` is ``projection``.

export_rule_detector_mapping Export rule detector mapping

Generate rule-detector mapping JSON from the live registry.

ParameterTypeDescription
languagesRestrict the export to these language identifiers. When omitted, mappings for every registered language are returned. Default to None.

get_config Get current configuration

Return the current server configuration including any runtime overrides.

set_config_override Set configuration override

Override configuration values for a specific language at runtime. Overrides persist for the session.

ParameterTypeDescription
language *stringLanguage whose thresholds should be adjusted (e.g. ``"python"``).
max_class_lengthOverride the maximum lines permitted in a single class definition. Default to None.
max_cyclomatic_complexityOverride the per-function cyclomatic-complexity ceiling. Default to None.
max_function_lengthOverride the maximum lines Default to None. permitted in a single function body.
max_line_lengthOverride the maximum character width for a single source line. Default to None.
max_nesting_depthOverride the maximum allowed nesting depth for control-flow blocks. Default to None.
severity_thresholdOverride the minimum severity at which violations are surfaced in results. Default to None.

clear_config_overrides Clear configuration overrides

Clear all runtime configuration overrides, reverting to zen-config.yaml defaults.

onboard_project Onboard a new project

Get interactive onboarding guidance for setting up zen analysis on a project. Returns recommended configuration based on project characteristics.

ParameterTypeDescription
project_path *stringAbsolute path to the project root, used to derive the project name and populate example commands.
primary_languagestringLanguage used for example snippets and default pipeline selection (e.g. ``"python"``). Default to "python".
strictnessstringPreset name controlling all numeric thresholds (``"relaxed"``, ``"moderate"``, or ``"strict"``). Default to "moderate".
team_sizestringDescriptive team-size hint (``"small"``, ``"medium"``, ``"large"``), reserved for future adaptive threshold scaling. Default to "small".

get_supported_languages Get supported languages

Return list of all languages with zen rules and their detector coverage.