Skip to main content
Glama

graph_condensation

Compute strongly connected components of a directed graph and condense them into a DAG using Kosaraju's algorithm. Use it to simplify cyclic graphs for dependency or reachability analysis.

Instructions

Compute SCC condensation of a directed graph into a DAG using Kosaraju's algorithm.

Input Schema

NameRequiredDescriptionDefault
edgesYesDirected edges as [u, v] pairs (0-indexed)
vertex_countYesNumber of vertices

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

C2.9/5.0
Behavior2/5

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

No annotations, so the description carries the full behavioral burden, and it discloses little beyond the algorithm name. It does not state that the operation is a pure read-only computation, whether output is deterministic/stable-ordered, or how the condensed graph and component mapping are represented. For a computation tool with no output schema, this is a meaningful gap.

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?

A single tight sentence with no filler that leads with the operation and names the algorithm. Efficient, though entirely one clause and slightly abrupt given the absence of any behavioral detail.

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

Completeness3/5

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

Inputs are fully covered by the schema, but with no output schema the description should say what the result looks like (condensed DAG form, SCC membership mapping). The algorithm reference partially compensates by telling the agent what computation to expect.

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% (edges as [u, v] 0-indexed pairs; vertex_count), so the schema already documents both parameters. The description adds no format or constraint detail beyond it, making the baseline 3 appropriate.

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?

Specific verb+resource: 'Compute SCC condensation of a directed graph into a DAG'. The agent can tell this transforms SCCs into a DAG, distinct from the mere SCC-listing siblings. However, it never names or distinguishes itself from close siblings like kosaraju_scc or graph_analyze, so differentiation is left to inference.

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

Usage Guidelines2/5

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

No explicit when-to-use or when-not guidance. A sibling named kosaraju_scc exists and likely returns raw SCCs rather than their condensation, yet the description offers no rule for choosing between them. Usage is only obliquely implied by the phrase 'into a DAG'.

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

Deploy Server

Other Tools