mcp-zen-of-languages
v0.9.1Multi-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.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | Workspace 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.
| Parameter | Type | Description |
|---|---|---|
code * | string | Source code to analyse. |
language * | string | Programming language identifier. |
allow_temporary_runners | boolean | Allow temporary runners. Default to False. |
enable_external_tools | boolean | Enable external tools. Default to False. |
perspective | string | Requested analysis perspective. Default to ``PerspectiveMode.ALL``. |
project_as | Projection-family target when ``perspective`` is ``projection``. | |
severity_threshold | Severity threshold. Default to None. |
generate_prompts Generate remediation prompts (v2)
Generate remediation prompts with MCP-first guidance metadata and v2 versioned prompt semantics.
| Parameter | Type | Description |
|---|---|---|
code * | string | Source code to analyse. |
language * | string | Programming language identifier. |
allow_temporary_runners | boolean | Allow temporary runners. Default to False. |
enable_external_tools | boolean | Enable external tools. Default to False. |
perspective | string | Requested analysis perspective. Default to ``PerspectiveMode.ALL``. |
project_as | Projection-family target when ``perspective`` is ``projection``. |
analyze_repository Analyze repository
Analyze a repository path and return per-file analysis results.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | Absolute path to the repository root. The MCP client typically resolves this from the active workspace. |
allow_temporary_runners | boolean | Permit temporary-runner fallback strategies for external tools. Default to False. |
enable_external_tools | boolean | Opt-in execution of allow-listed external tools while analyzing files. Default to False. |
languages | Restrict analysis to specific language identifiers. Defaults to ``["python"]`` internally. | |
max_files | integer | Per-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.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language identifier to restrict analysis (e.g. ``"python"``). |
path * | string | Absolute or relative path to the repository root. |
allow_temporary_runners | boolean | Permit temporary-runner strategies. Default to False. |
cursor | Opaque continuation token from a previous call. Omit or pass ``None`` to start from the first page. Default to None. | |
enable_external_tools | boolean | Opt-in execution of external linters. Default to False. |
max_files | integer | Cap on the number of files to analyse. Default to 100. |
max_tokens | integer | Approximate 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.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language identifier to restrict analysis (e.g. ``"python"``). |
path * | string | Absolute or relative path to the repository root. |
allow_temporary_runners | boolean | Permit temporary-runner strategies. Default to False. |
enable_external_tools | boolean | Opt-in execution of external linters. Default to False. |
max_files | integer | Cap 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.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language identifier to restrict analysis (e.g. ``"python"``). |
path * | string | Absolute or relative path to the repository root. |
allow_temporary_runners | boolean | Permit temporary-runner strategies. Default to False. |
cursor | Opaque continuation token from a previous call. Omit or pass ``None`` to start from the first page. Default to None. | |
enable_external_tools | boolean | Opt-in execution of external linters. Default to False. |
max_files | integer | Cap on the number of files to analyse. Default to 100. |
max_tokens | integer | Approximate 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.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | Absolute path to the repository to scan. All eligible source files are discovered recursively. |
allow_temporary_runners | boolean | Permit temporary-runner fallback strategies for external tools. Default to False. |
enable_external_tools | boolean | Opt-in execution of allow-listed external tools while gathering repository analysis. Default to False. |
languages | Restrict scanning to these languages. Omit to analyse only Python files by default. Default to None. | |
min_severity | integer | Severity 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.
| Parameter | Type | Description |
|---|---|---|
code * | string | Source fragment to inspect for structural patterns. |
language * | string | Language 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.
| Parameter | Type | Description |
|---|---|---|
target_path * | string | Path to a single file or a directory. When a directory is given, all eligible files inside are analysed. |
include_analysis | boolean | Include the violation-analysis body showing per-rule findings. Default to True. |
include_gaps | boolean | Include quality-gap and coverage-gap summaries highlighting areas that need attention. Default to True. |
include_prompts | boolean | Append remediation prompt sections derived from ``build_prompt_bundle``. Default to False. |
language | Explicit language override. When omitted, the language is inferred from file extensions. Default to None. | |
perspective | string | Requested report perspective. Default to ``PerspectiveMode.ALL``. |
project_as | Projection-family target when ``perspective`` is ``projection``. |
export_rule_detector_mapping Export rule detector mapping
Generate rule-detector mapping JSON from the live registry.
| Parameter | Type | Description |
|---|---|---|
languages | Restrict 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.
| Parameter | Type | Description |
|---|---|---|
language * | string | Language whose thresholds should be adjusted (e.g. ``"python"``). |
max_class_length | Override the maximum lines permitted in a single class definition. Default to None. | |
max_cyclomatic_complexity | Override the per-function cyclomatic-complexity ceiling. Default to None. | |
max_function_length | Override the maximum lines Default to None. permitted in a single function body. | |
max_line_length | Override the maximum character width for a single source line. Default to None. | |
max_nesting_depth | Override the maximum allowed nesting depth for control-flow blocks. Default to None. | |
severity_threshold | Override 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.
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Absolute path to the project root, used to derive the project name and populate example commands. |
primary_language | string | Language used for example snippets and default pipeline selection (e.g. ``"python"``). Default to "python". |
strictness | string | Preset name controlling all numeric thresholds (``"relaxed"``, ``"moderate"``, or ``"strict"``). Default to "moderate". |
team_size | string | Descriptive 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.