Skip to main content
Glama

cos_graph_cycles

Read-onlyIdempotent

Detect circular dependencies in code by finding strongly-connected components. Choose between module imports or function calls to identify design smells or mutual recursion cycles.

Instructions

Detect circular dependencies as strongly-connected components.

Args: scope: "imports" (module-level circular deps, the design smell) or "calls" (function cycles incl. legitimate mutual recursion). top: Max cycles returned (default 20). min_size: Minimum SCC size to report (default 2).

Returns: JSON envelope with cycles (each {size, members}) + total_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
scopeNoimports
min_sizeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already establish the read-only, idempotent safety profile. The description adds valuable behavioral context: the distinction between import cycles as a design smell and call cycles that may be legitimate, plus the exact return envelope structure. No contradiction with annotations.

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 tight and well-structured using Args/Returns sections. Every sentence contributes meaningful information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose, parameter semantics, and return envelope, which is complete for a read-only graph query tool. The output schema exists, so detailed return field descriptions are not required, and none are missing.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining each parameter: scope's two values, top as a cap on returned cycles, and min_size as a filter threshold. This is sufficient for correct parameter selection.

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 and resource: 'Detect circular dependencies as strongly-connected components.' It clearly identifies the tool's function and distinguishes it from sibling graph tools by focusing on cycles/SCC analysis.

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 for the scope parameter (imports vs calls) and explains what each represents, guiding when each mode is appropriate. However, it does not explicitly contrast with sibling graph tools or state when not to use this tool.

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/kouroshez/coding-os'

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