Skip to main content
Glama

find_circular_deps

Detect import cycles between modules to catch circular dependency smells before they spread and complicate refactoring.

Instructions

Detect import cycles between modules. A cycle is almost always a refactoring smell; use this to catch them before they calcify.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo_path": "<repo_path>"
    },
    "name": "find_circular_deps"
  }
}

Input Schema

NameRequiredDescriptionDefault
repo_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/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 discloses the analytical viewpoint (cycles as a refactoring smell) and implies a static, read-only scan, but never states that the operation is non-mutating, whether it walks the entire repository, whether it needs the project to be installed or importable, or how expensive the scan is. A return-value schema exists, which offsets part of the gap.

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?

Two tight sentences with the action front-loaded and the rationale second. There is no filler, no restatement of the name, and nothing an agent must skip over to reach the operative 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?

The tool is simple, with one required parameter and an output schema that documents return values, so the description does not need to explain results. What is missing is the scope and semantics of repo_path and any note on what the scan covers. The explanation of when to reach for the check compensates, but not for how unknowns.

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

Parameters2/5

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

The only parameter, repo_path, has 0% schema description coverage and the description says nothing about it. It does not clarify whether it is a repo root or a subdirectory, an absolute or relative path, or whether cycles are detected only within that subtree. The parameter name is suggestive but the description adds no meaning beyond it.

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?

The description opens with a specific verb and resource: 'Detect import cycles between modules.' That is clearly distinct from the analysis siblings such as find_unused_imports or find_dead_code, and an agent would not confuse it with a query or path tool. It stops short of naming any sibling, but the concept is unambiguous enough that differentiation is essentially inherent.

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?

'Use this to catch them before they calcify' gives a motivational when-to-use: proactively checking a refactoring smell. There are no exclusions, no mention of when a cycle report is not the answer, and no alternatives suggested for related questions such as general complexity or fan-out analysis. Usage is implied rather than specified.

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