Skip to main content
Glama

Diogenes Context Compression, Code Patching & Deterministic Solver MCP

Tarjan SCC Circular Import Detector & Topological Blast-Radius Solver

audit_module_dependency_cycles
Read-onlyIdempotent

Runs Tarjan's Strongly Connected Components (SCC) algorithm on a module import map to detect circular dependencies, compute parallel topological build waves, and trace downstream change blast radius. Use when auditing multi-file import graphs for circular cycles or determining which downstream files must be re-tested after an edit; for extracting function-level symbols and cyclomatic complexity inside a single source file, use analyze_ast_symbol_graph instead. Read-only call (32 KB, 60 RPM): accepts 'modules_json' (with enum defaults), uses '?demo=true' or L402 (75 sats); HTTP 400 if invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modules_jsonYesJSON string or object mapping each module name to its array of imported module names (e.g. '{"a":["b"],"b":[]}').
analysis_scopeNoGraph analysis output mode; defaults to 'cycles_waves_and_blast_radius' when omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
total_modulesYesTotal number of graph vertices analyzed.
circular_scc_groupsYesStrongly connected component cycles discovered via Tarjan's algorithm.
topological_build_wavesYesDependency-ordered parallel build/test execution waves.
transitive_blast_radiusYesAll upstream callers transitively impacted by the modified modules.
circular_dependencies_detectedYesTrue if one or more circular dependency cycles exist.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile, and the description layers substantial extra context: 32 KB payload ceiling, 60 RPM rate limit, the demo/L402 auth paths (75 sats), and HTTP 400 behavior on invalid input. This is far beyond what the structured annotations disclose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly packed sentences with the purpose, routing, and operational constraints front-loaded. It is dense rather than bloated, though the parenthetical rate/auth/error clauses make the second sentence quite compressed.

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?

An output schema exists so return values need not be described. Combined with stated auth, limits, and error behavior, the description is complete enough for an agent to invoke the tool correctly.

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?

Schema description coverage is 100%, so both parameters (modules_json and the analysis_scope enum) are already fully documented in the schema. The description only alludes to 'enum defaults' without adding format or meaning beyond the schema, so the baseline 3 is 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?

States a specific verb and resource (audit module dependency cycles), names the exact algorithm (Tarjan SCC), and enumerates the three outputs (cycles, topological build waves, blast radius). It also distinguishes itself from the sibling it is not by contrasting scope with analyze_ast_symbol_graph.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit trigger conditions ('auditing multi-file import graphs for circular cycles' or 'determining which downstream files must be re-tested after an edit') and names the alternative tool plus the condition that selects it ('for function-level symbols ... use analyze_ast_symbol_graph instead').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources