Skip to main content
Glama
neogeweb3

io.github.neogeweb3/code-health-suite

by neogeweb3

find_clones

Detect duplicated code blocks in a Python project, identifying exact, renamed, and near-miss clones. Returns clone pairs with similarity scores and cluster analysis to help refactor and maintain code quality.

Instructions

Detect code clones (duplicated code blocks) in a Python project. Finds Type-1 (exact), Type-2 (renamed), and Type-3 (near-miss) clones. Returns clone pairs with similarity scores and cluster analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesDirectory path to scan for clones.
min_linesNoMinimum function length to consider (default: 5).
thresholdNoSimilarity threshold 0.0-1.0 (default: 0.8).
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses what the tool does and returns, but does not mention side effects (likely read-only), performance implications, or limitations beyond Python scope. It adds useful detail about clone types but lacks deeper behavioral context like recursion behavior or potential resource usage.

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?

The description is two sentences, front-loaded with the core purpose, and each sentence adds distinct information without repetition. It is efficiently written with no fluff.

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 the tool's complexity and absence of an output schema, the description adequately conveys what the tool does, what it detects, and what it returns. It mentions cluster analysis and similarity scores, giving a reasonable picture. It lacks details on expected runtime or limitations on large projects, but these are not critical for basic selection.

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 coverage is 100%, with each parameter described. The description does not add additional meaning to path, min_lines, or threshold beyond the schema, so it provides minimum baseline value. It does not clarify edge cases like how threshold interacts with type-3 clones.

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 detects code clones in Python projects, specifies clone types (Type-1/2/3), and mentions output (clone pairs with similarity scores and cluster analysis). It is distinct from sibling tools like find_dead_code or analyze_complexity, which target different code issues.

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 (detects duplicate code blocks) and implies when to use it (when code duplication is a concern), but it does not explicitly exclude alternatives or mention when not to use it. The scope is clear enough for an agent to choose it over unrelated analysis tools.

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/neogeweb3/code-health-suite'

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