Skip to main content
Glama

link_cut_tree

Maintain dynamic forest connectivity by linking or cutting vertices, checking connections, setting values, and computing path sums for 1-indexed graphs.

Instructions

Dynamic forest connectivity with link, cut, connected, and path sum queries using link-cut trees.

Input Schema

NameRequiredDescriptionDefault
operationsYesOperations: link, cut, connected, set_value, path_sum with u, v, value fields
vertex_countYesNumber of vertices (1-indexed)

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, the description carries the full behavioral burden, and it discloses almost nothing: no statement of return format, complexity characteristics, whether query state persists between calls, or error behavior for invalid link/cut operations. It only restates the algorithmic domain.

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 the core domain front-loaded and the operation set appended. Nothing is wasted, though it is slightly terse given the tool's complexity.

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?

For an algorithm tool with no output schema and no annotations, the description should say what a call returns (e.g., aggregate path sums, boolean connectivity results). It defines the operation vocabulary but leaves the response shape to inference, so it is only minimally complete.

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 and the supported operation names with u/v/value fields are already documented in the schema. The description's operation list duplicates what the schema provides rather than adding format or constraint detail, so the baseline of 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?

Names a specific algorithm and its resource ('dynamic forest connectivity') plus the concrete operations it supports (link, cut, connected, path sum). An agent can distinguish it from generic graph tools, though it stops short of explicitly contrasting with close siblings like union_find or heavy_light_decomposition.

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 guidance, no prerequisites, and no named alternative. The description enumerates operations but never says when this tool is the right choice versus union_find or another connectivity/query tool in the sibling list.

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