Skip to main content
Glama
reflex-search

Reflex

Official

find_circular

Detect circular dependencies in static import graphs. Returns cycles sorted by longest first, with pagination support. If index is stale, re-index and retry.

Instructions

Detect circular dependencies (cycles A → B → C → A) in the static import graph. Prefer this over manually grepping for import chains — Reflex does the cycle detection directly. Returns {pagination, results: [{paths: ["a.rs", "b.rs", "a.rs"]}]}, sorted with longest cycles first by default. Default page size 200; if pagination.has_more is true, fetch the next page with offset. Only static imports are considered. On "Index not found" / "stale" error, call index_project, then retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort order: 'asc' (shortest cycles first) or 'desc' (longest cycles first, default)
limitNoMaximum number of cycles per page (default: 200)
offsetNoPagination offset (skip first N cycles). Use with limit for pagination.
Behavior5/5

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

Discloses that only static imports are considered, return format with pagination and sorting, default page size 200, and error recovery actions (call index_project and retry). No annotations exist, so description fully covers behavioral traits.

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?

Every sentence is valuable; front-loaded with purpose, then details on return format, pagination, and error handling. No 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?

For a tool with 3 parameters, no output schema, and no annotations, the description is remarkably complete: purpose, usage, behavior, parameters, error handling, and return structure are all covered.

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?

Adds meaning beyond schema by describing default page size (limit), default sort order (desc), pagination offset usage, and the meaning of sort values (asc/desc). Schema coverage is 100%, but description enriches parameter understanding.

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?

Clearly states it detects circular dependencies in the static import graph, with example cycle and return format, distinguishing it from sibling tools like find_references or get_dependencies.

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?

Explicitly says 'Prefer this over manually grepping' and gives error handling instructions, but does not list alternative tools or when not to use it.

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/reflex-search/reflex'

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