Skip to main content
Glama

Check code quality

quality_check
Read-only

Scan a file or directory to report code-quality issues like high complexity, deep nesting, long functions, and duplicate branches. Returns JSON findings with rule IDs, file paths, and line numbers.

Instructions

Report code-quality issues: high complexity, deep nesting, long functions, duplicate branches and similar maintainability findings.

Returns JSON with findings (rule ID, file, line, message) and _run_id. Read-only and local.

Defect and Review records remain complete. Advice is grouped by default; expand_advice=True includes every Advice record. Read _result_uri for the complete saved result without rescanning.

Requires SKYLOS_API_KEY: this tool returns an authentication error unless the MCP server is started with SKYLOS_API_KEY set. Without a key only analyze works (5 calls/day). The local CLI needs no key: skylos verify <file> and skylos agent install-hooks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory or file to scan. A relative path resolves against the MCP server's working directory.
confidenceNoMinimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default.
expand_adviceNoInclude every Advice record instead of rule-group counts; complete results are always available through _result_uri.
exclude_foldersNoFolder names to skip, e.g. ["migrations", "scripts"]. When given, this list replaces the default excludes (node_modules, .venv, build, dist and similar); omit it to keep the defaults.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.49.0
    • addedInput schema / properties / confidence / description
      Added value: +"Minimum confidence (0-100) for dead-code findings. Higher values report fewer, surer candidates; 60 is the CLI default."
    • addedInput schema / properties / exclude_folders / description
      Added value: +"Folder names to skip, e.g. [\"migrations\", \"scripts\"]. When given, this list replaces the default excludes (node_modules, .venv, build, dist and similar); omit it to keep the defaults."
    • addedInput schema / properties / expand_advice
      Added value: +{
      +  "default": false,
      +  "description": "Include every Advice record instead of rule-group counts; complete results are always available through _result_uri.",
      +  "title": "Expand Advice",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / path / description
      Added value: +"Directory or file to scan. A relative path resolves against the MCP server's working directory."
  2. Addedv4.10.0

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, and the description adds substantial context beyond them: the auth requirement and its failure mode, a rate limit ('5 calls/day'), the default advice-grouping behavior, and the _result_uri escape hatch for full results without rescanning.

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 purpose and output shape are front-loaded, and the auth/CLI notes earn their place as call-blocking prerequisites. It is slightly choppy with several short stacked statements, but there is little wasted text.

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

Completeness4/5

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

An output schema exists, so return-value detail is covered, and the description supplies the critical missing pieces an agent needs — auth requirement, rate limit, grouping default, and where to read full results. Only sibling selection guidance is absent.

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 the schema already carries confidence, path, exclude_folders and expand_advice semantics. The description restates expand_advice grouping and hints at the _result_uri path but adds no syntax or meaning the schema lacks, landing at the baseline.

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?

States a specific verb and resource ('Report code-quality issues') and enumerates the finding types it produces (complexity, deep nesting, long functions, duplicate branches, maintainability). This lets an agent distinguish it from security_scan/secrets_scan/architecture_check by scope, though it never explicitly names the sibling it is not.

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

Usage Guidelines3/5

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

Provides real prerequisite context (SKYLOS_API_KEY required, error otherwise; without a key only `analyze` works at 5 calls/day; the local CLI needs no key). However, it never states when to choose quality_check over the sibling analysis tools (architecture_check, health_score, verify_dead_code), so sibling routing is left to inference.

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