Skip to main content
Glama
Anselmoo

mcp-zen-of-languages

by Anselmoo

Analyze zen violations (v2)

analyze_zen_violations
Read-onlyIdempotent

Detect zen rule violations in code to enforce language-specific best practices and idiomatic patterns.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSource code to analyse.
languageYesProgramming language identifier.
project_asNoProjection-family target when ``perspective`` is ``projection``.
perspectiveNoRequested analysis perspective. Default to ``PerspectiveMode.ALL``.all
severity_thresholdNoSeverity threshold. Default to None.
enable_external_toolsNoEnable external tools. Default to False.
allow_temporary_runnersNoAllow temporary runners. Default to False.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
metricsYesContainer for every numeric measurement extracted from a source file. The analyser's ``compute_metrics`` hook populates this model after parsing is complete. Downstream, the detection pipeline reads these numbers to decide which zen-principle thresholds have been crossed, and the MCP server serialises them back to the client alongside the violation list. Attributes: cyclomatic: Full complexity profile with per-block detail. maintainability_index: Halstead-derived maintainability score (0-100). lines_of_code: Physical line count of the analysed source. Example: >>> m = Metrics( ... cyclomatic=CyclomaticSummary(blocks=[], average=0.0), ... maintainability_index=72.5, ... lines_of_code=340, ... ) >>> m.maintainability_index > 65 True See Also: ``CyclomaticSummary``: Detailed breakdown stored inside ``cyclomatic``. ``AnalysisResult``: Final output that embeds ``Metrics``.
languageYes
violationsYes
overall_scoreYes
rules_summaryNo
dogma_analysisNo
external_analysisNo
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows it's a safe read. The description's phrase 'stricter request-quality guardrails' hints at validation but is ambiguous; 'richer telemetry metadata' relates to output not behavior. It adds no concrete behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the core action. It is not excessively verbose, but the trailing qualifiers 'stricter request-quality guardrails and richer telemetry metadata' are vague and could be considered wasted words, preventing a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The presence of annotations and an output schema reduces the need to explain basic behavior and return format. However, the description lacks any usage guidance, and the vague qualifiers do not clarify when to use this tool or what distinguishes it in practice. It is adequate but has gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are already documented. The description does not add any parameter-level meaning or clarify the 'project_as' field or 'perspective' enum. Baseline 3 is appropriate since the schema carries the full burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action and resource: 'Analyze a code snippet against zen rules.' This distinguishes it from sibling tools like analyze_repository and analyze_batch by focusing on a single snippet. The added qualifiers 'stricter request-quality guardrails and richer telemetry metadata' are vague and not directly about purpose, but they don't obscure it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance is given. It does not mention alternatives like analyze_repository for broader scope, nor does it provide context for choosing this tool over siblings. The usage is only implied by the verb and the resource.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Anselmoo/mcp-zen-of-languages'

If you have feedback or need assistance with the MCP directory API, please join our Discord server