Skip to main content
Glama

check_quality_gates

Read-onlyIdempotent

Run configurable quality gate checks on project code to verify complexity, coupling, circular imports, and more before committing. Returns pass/fail per gate for CI integration.

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")
configNoInline config overrides (merged with project config)
output_formatNoOutput format. "json" (default) returns the native gate report; "sarif" emits a SARIF 2.1.0 log (only warning/error gates become results) for code-scanning ingestion.
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`.
Behavior5/5

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

The description explicitly states 'Read-only', which aligns with the annotations (readOnlyHint=true, idempotentHint=true, destructiveHint=false). It goes beyond annotations by clarifying the response behavior when no gates are configured (returns NO_GATES_CONFIGURED, not misleading PASS) and when use_default_gates is set. This prevents misinterpretation and adds valuable behavioral context.

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 well-structured, starting with the primary purpose and followed by usage context, edge cases, and return format. It is informative without being verbose, though it could be slightly tightened (e.g., combining the CI and PR sentences). Overall, every sentence adds value, justifying a score of 4.

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 5 parameters (100% schema coverage), no output schema, and moderate complexity, the description covers all critical aspects: what it does, when to use, edge cases (no gates, default rules), and return structure. It also mentions the JSON response format. This level of detail ensures an agent can correctly invoke and interpret the tool without additional context.

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?

With 100% schema coverage, the baseline is 3. The description adds meaning by explaining the use_default_gates behavior ('Opt-in to the conservative built-in default ruleset...') and the output_format options ('json' vs 'sarif'). It also clarifies the semantics of 'scope' and 'config' indirectly. These additions raise the score above 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?

The description clearly specifies the tool's verb ('Run configurable quality gate checks'), resource ('project'), and outcome ('Returns pass/fail for each gate'). It lists the specific gate types (complexity, coupling, circular imports, etc.), making the purpose unmistakable. While it doesn't explicitly differentiate from sibling tools, the unique scope ('quality gates') and the detailed gate list provide strong distinctiveness.

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 provides clear context for when to use the tool: 'Use before PR/commit to ensure quality standards' and 'Designed for CI integration — AI can verify gates pass before committing.' It also explains the special case when no gates are configured, which helps the agent understand the tool's behavior. However, it does not explicitly state when not to use it or mention alternative tools for similar tasks, slightly limiting guidance.

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