Skip to main content
Glama

heavy_light_decomposition

Decompose a tree into heavy and light paths to enable efficient path queries.

Instructions

Perform heavy-light decomposition of a tree for efficient path queries.

Input Schema

NameRequiredDescriptionDefault
rootNoRoot vertex (default 0)
edgesYesEdges 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?

With no annotations provided, the description carries the full behavioral burden, yet it discloses nothing beyond the basic operation: no indication of what is returned (e.g., chain/head assignments or a queryable structure), whether the tree must be connected/acyclic, or how the result is meant to be consumed. The 'efficient path queries' phrase hints at intent but not behavior.

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 front-loaded sentence with no filler or redundancy. It is tight, though the brevity is partly the source of its informational gaps rather than a deliberate economy.

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?

For a 3-parameter algorithm tool with no annotations and no output schema, the description is too thin. An agent cannot tell what the tool returns or how to use the decomposition, and no constraints (tree validity, indexing) are stated.

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 vertex_count, edges, and root are already documented in the schema (including the root default of 0). The description adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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?

The description states a specific verb ('Perform') and resource ('heavy-light decomposition of a tree') plus the intended outcome ('efficient path queries'). It is more specific than a tautology, but it does not differentiate from closely related tree-algorithm siblings such as centroid_decomposition, euler_tour, or link_cut_tree.

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?

There is no when-to-use or when-not-to-use guidance and no mention of alternatives. Given the many competing tree/graph algorithm tools in the sibling set (lowest_common_ancestor, segment_tree, link_cut_tree, centroid_decomposition), the absence of routing guidance is a real gap.

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