Skip to main content
Glama

check_quality_gates

Read-onlyIdempotent

Run quality gate checks on your project—complexity, coupling, circular imports, and more—to verify code quality standards before committing or creating a PR. Returns pass/fail results for each gate.

Instructions

Run configurable quality gate checks against the project. Returns pass/fail for each gate (complexity, coupling, circular imports, dead exports, tech debt, security, antipatterns, code smells). Designed for CI integration — AI can verify gates pass before committing. Use before PR/commit to ensure quality standards. Read-only. When no gates are defined (no quality_gates in config and no inline config.rules), the result is NO_GATES_CONFIGURED with a _warnings advisory — NOT a misleading PASS. Pass use_default_gates: true to opt in to a conservative built-in ruleset (max_cyclomatic=30 error, max_circular_import_chains=0 error, max_coupling_instability=0.9 warning). Returns JSON: { gates, summary: { result: "PASS"|"FAIL"|"WARNING"|"NO_GATES_CONFIGURED", ... }, _warnings?, _defaults_used? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoScope: "project" (all) or "changed" (git diff). Default: project
sinceYesGit ref for "changed" scope (e.g. "main")
use_default_gatesNoOpt-in to the conservative built-in default ruleset when no `quality_gates` config and no inline `config.rules` are provided. Default false — when false and no gates configured, returns `NO_GATES_CONFIGURED`.
configNoInline config overrides (merged with project config)
Behavior5/5

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

The description adds significant transparency beyond annotations: it details the special 'NO_GATES_CONFIGURED' result, the effect of use_default_gates, and the JSON response structure. Annotations already declare readOnlyHint=true, which is consistent with 'Read-only' in the description.

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 longer but every sentence adds value. It front-loads the main action and provides details on behavior and parameters. Minor redundancy could be trimmed (e.g., repeating 'pass'), but overall efficient.

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

Completeness5/5

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

Given the schema covers all parameters and annotations are present, the description completes the picture with edge-case behaviors, default configs, and expected output format. No output schema exists, but the description compensates with a clear JSON template.

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

Parameters4/5

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

Schema coverage is 100% with clear descriptions. The description adds context about the use_default_gates parameter (opt-in, default false) and explains that config merges with project config. This adds meaning beyond the schema alone.

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?

The description clearly states the tool runs configurable quality gate checks and returns pass/fail results. It specifies the types of checks (complexity, coupling, etc.) and distinguishes itself from sibling tools like check_architecture or detect_antipatterns by being a comprehensive gate runner.

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

Usage Guidelines4/5

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

The description explicitly guides usage: 'Designed for CI integration — AI can verify gates pass before committing. Use before PR/commit.' It also details the behavior when no gates are configured and how to opt-in to defaults. However, it does not explicitly compare to alternative tools or state when not to use it.

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/nikolai-vysotskyi/trace-mcp'

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