Skip to main content
Glama
brightlikethelight

NetworkX MCP Server

cycles_detection

Detect cycles in a graph by computing a cycle basis for undirected graphs or performing a DAG check for directed graphs.

Instructions

Detect cycles in a graph (cycle basis for undirected, DAG check for directed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphYes
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavior. It does explain the two distinct modes (cycle basis vs DAG check), which is beyond the name's implication. However, it does not specify the return format (e.g., boolean vs cycle list), input graph string format, or how directedness is determined, leaving important behavioral gaps.

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 a single sentence that front-loads the core purpose ('Detect cycles in a graph') and adds a parenthetical clarification. Every word earns its place with no redundancy.

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

Completeness2/5

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

Given no annotations, no output schema, and a single underdocumented parameter, the description is too sparse. It omits the return type, input graph representation, and any usage caveats, which are essential for an AI agent to invoke this tool correctly and interpret results.

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 schema has one required parameter 'graph' (string) with 0% description coverage, so the description must compensate. It does not explain what string format is expected (e.g., adjacency list, edge list, GraphML), which is critical for correct invocation. This is a significant gap, especially since it is the only parameter.

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 ('Detect cycles') and resource ('graph'), and clarifies behavior for undirected (cycle basis) vs directed (DAG check) graphs. This distinguishes it from sibling tools like topological_sort or graph_statistics, making the purpose unambiguous.

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 indicates the tool's context by explaining that it behaves differently for undirected and directed graphs, which implies when to use it (e.g., for DAG checking on directed graphs). However, it does not explicitly mention alternatives or exclusions, but the behavioral distinction provides enough guidance for a knowledgeable user.

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/brightlikethelight/networkx-mcp-server'

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