Skip to main content
Glama

analyze_code_quality

Evaluate file metrics, comment ratio, complexity, TODO/FIXME markers, and hardcoded secrets to uncover code quality issues.

Instructions

Analyze file metrics (line counts, comment ratio, complexity estimate), TODO/FIXME comments, and potential security smells (hardcoded secrets).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the full burden of behavioral transparency. It does disclose what the tool scans for, including potential security smells, but it does not explicitly state that the operation is read-only, how the complexity estimate is calculated, or whether the path is limited to the current repository.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One clean sentence front-loads the main action and uses parentheticals to scope the analysis. No filler, no repeated schema content, and each phrase contributes useful information.

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?

Given a single required parameter and an existing output schema, the description is nearly sufficient for correct tool invocation. The main gap is broader path-semantics documentation, but this is minor for a one-parameter analysis tool.

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?

The schema only describes a 'path' string with no schema-level description (0% coverage). The description adds that a file's metrics will be analyzed, so path clearly suggests a file target, but it doesn't specify path format, relative-to-root ambiguity, or directory compatibility.

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 names a specific verb ('Analyze') and enumerates concrete analysis targets: line counts, comment ratio, complexity estimate, TODO/FIXME comments, and hardcoded secrets. This makes the tool's purpose clear and distinguishes it from siblings like read_file and search_code.

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?

Usage is implied: call this tool when code-quality metrics or potential issues in a file are needed. However, that description provides no explicit when-to-use/when-not-to-use guidance and does not compare it with sibling tools such as inspect_pr or check_ci_status.

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/Dhananjayrbiraris/github-mcp'

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