Skip to main content
Glama

import_cycles

Read-onlyIdempotent

Detect module import cycles in a Python repository, returning each cycle and its count to help resolve circular dependencies.

Instructions

Module import cycles in the repo. Each cycle is a list of module names starting at its alphabetically smallest member. Returns {count, cycles: [[module, ...]]}.

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world operation, so the safety profile is covered. The description adds genuinely new behavioral context: each cycle is canonically normalized to start at its alphabetically smallest member, which tells the agent results are stable and deduplicated. It does not say whether the whole repo is scanned or whether some index must already exist.

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?

Three short sentences, front-loaded with what is reported, then the canonicalization rule, then the return shape. Nothing is wasted and nothing is buried.

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?

With no output schema, the description carries the burden of describing the return value and does so precisely ({count, cycles: [[module, ...]]}). The only gap is operational context — whether the repo graph must be pre-built or how large results might be.

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

Parameters4/5

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

The tool takes zero parameters, which is the baseline-4 case. The description adds no parameter detail because none is needed, and the schema is fully self-describing.

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 names a specific resource and analysis: module import cycles in the repo. It is unambiguous and clearly distinct from every sibling (dead_code, impact, find_symbol, etc.), though the phrasing is a noun fragment rather than an explicit verb, so the agent infers 'find/detect'.

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 only implied by the subject matter — an agent can guess this is for circular-dependency detection. There is no explicit when-to-use, no when-not, and no pointer to cypher as an alternative for custom graph queries.

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