Skip to main content
Glama
JrKrishh
by JrKrishh

Find circular dependencies

find_circular_dependencies
Read-only

Detects circular dependencies (import cycles) in a source directory using Tarjan's algorithm, reporting each cycle with severity based on module count.

Instructions

Detects import cycles using Tarjan's algorithm. Returns each cycle with a severity based on how many modules it spans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directoryYesAbsolute or relative path to the source directory to analyse
Behavior4/5

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

Annotations already declare the tool as read-only, so the description does not need to restate that. It adds valuable behavioral context by specifying the algorithm (Tarjan's) and the return behavior (each cycle with severity based on module span), which goes beyond the schema.

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 only two sentences, front-loaded with the main action ('Detects import cycles') and includes essential details without filler. Every clause adds value.

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 has one well-documented parameter, clear return behavior despite no output schema, and read-only annotations. The description is sufficient for an agent to understand what it does and what it returns. Minor caveats about performance or input structure are not critical for this simple 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 covers the single parameter 'directory' with 100% description coverage, so the schema already provides the needed meaning. The description does not add extra parameter semantics beyond what the schema states, making the baseline 3 appropriate.

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 uses a specific verb 'Detects' with a clear resource 'import cycles', and it distinguishes itself from siblings like find_entry_points and most_complex_files by focusing on dependency cycles, not general analysis or complexity.

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 clearly implies when to use this tool (to detect circular imports), but it does not explicitly state alternatives or when not to use it. The context is clear enough for an agent to select it appropriately among sibling 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/JrKrishh/sove-mcp'

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