Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

Code Quality Report

code_quality_report
Read-onlyIdempotent

Analyze a codebase to aggregate language line counts, comment ratio, function lengths, duplicate lines, TODO/FIXME density, and nesting depth into a quality score. Read-only.

Instructions

Aggregate quality metrics: lines of code per language, comment ratio, average and longest function lengths, duplicate-line ratio, TODO/FIXME density and maximum nesting depth, synthesized into a score. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "code_quality_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoDirectory relative to the workspace root (default ".").
maxFilesNoMaximum files to analyze (default 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive, so 'Read-only' in the description is largely redundant. It does add that results are synthesized into a score, but says nothing about cost or runtime when maxFiles is raised to the 20000 cap, what file types are included, or how partial/unsupported files are handled.

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?

A single front-loaded sentence that wastes no words and puts the metric inventory first. The trailing 'Read-only.' fragment duplicates the annotations but is at least brief.

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?

With only two optional parameters and no output schema, the description conveys the metric list reasonably well, but leaves the report structure, score scale/thresholds, and treatment of unparsable or binary files undefined. An agent can call it correctly but cannot anticipate what the returned score means.

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%, with defaults and bounds documented for both 'path' and 'maxFiles', so the schema carries the burden. The description adds no semantics about path scoping (symlinks, ignored directories) or the tradeoff of increasing maxFiles, leaving it at the baseline.

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

Purpose5/5

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

States a specific verb ('aggregate') and a well-defined resource (code quality metrics), then enumerates exactly which metrics are computed (LOC per language, comment ratio, function lengths, duplicate-line ratio, TODO/FIXME density, nesting depth) and notes a synthesized score. An agent can tell precisely what this produces.

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 guidance on when to choose this over alternatives such as architecture_analyze, and no prerequisites or exclusions. Usage is only implied by the metric list; the agent must infer that this is for static source-quality assessment rather than structural or vulnerability analysis.

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

Deploy Server

Other Tools