Skip to main content
Glama

audit_code_quality

Audit Python files or repositories for code quality, OOP cohesion, nesting depth, anti-patterns, and return-contract consistency, with optional strict mode to treat warnings as failures.

Instructions

Code Craft & OOP Sentry: Audits code quality, OOP cohesion, nesting depth, anti-patterns (silent swallows, mutable defaults, parameter mutations), and contract return consistency.

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": "audit_code_quality"
  }
}

Input Schema

NameRequiredDescriptionDefault
strictNoIf true, flags any warnings as failures (zero-tolerance mode)
target_pathNoPath to Python file or repository directory to audit (default: '.').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses what the audit inspects, which implies a read-only analysis rather than a mutation, but it never states that nothing is modified, whether findings are returned as a report, or how strict mode changes outcomes. Some value beyond the name, but key behavioral traits remain unstated.

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 dense sentence that front-loads the scope and every clause is informative. The only waste is the leading branding label 'Code Craft & OOP Sentry:', which adds no operational meaning for an agent choosing or invoking the tool.

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 tool is simple, and the description covers what is inspected well. However, with no output schema it should say what the audit returns (findings list, pass/fail, severity) and that it targets Python files, which only appears in the schema rather than the description.

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% and both parameters (strict, target_path) are documented in the schema with defaults, so the description adds nothing that the schema does not already carry. Baseline 3 applies when the schema does the work; the description's anti-pattern list could have connected to strict mode but does not.

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 (Audits) and resource (code quality) and enumerates the concrete dimensions checked: OOP cohesion, nesting depth, anti-patterns such as silent swallows, mutable defaults, parameter mutations, and contract return consistency. That is far more specific than a generic lint tool. It stops short of 5 because it never distinguishes itself from siblings like check_code_health or audit_git_changes, so an agent cannot tell from this text which quality tool to pick.

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?

There is no when-to-use or when-not-to-use guidance and no mention of the closely related siblings (audit_git_changes for diffs, check_code_health for overall health). The enumerated check categories hint at scope, but the agent must infer from the name alone when this tool is the right choice versus another audit tool.

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