Skip to main content
Glama

suffix_tree

Construct a suffix tree from input text to count distinct substrings and identify the longest repeated substring for string analysis.

Instructions

Build a suffix tree (Ukkonen's algorithm) and compute distinct substrings and longest repeated substring.

Input Schema

NameRequiredDescriptionDefault
textYesInput text (max 10,000 chars)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden, but this is a pure read-only computation with limited behavioral surface. It usefully discloses the specific algorithm (Ukkonen's) and the derived outputs, yet says nothing about complexity, limit handling, or the shape of the result set beyond naming two metrics.

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?

A single well-formed sentence that front-loads the action and the algorithm, then names the outputs. No filler or redundancy.

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?

With no output schema and no annotations, the description is the only source of return-value information, and it names the two computed results but not their format (e.g., counts vs. actual substring lists). Adequate for a simple single-parameter tool, but not fully self-contained.

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?

Only one parameter exists and schema coverage is 100%, with the schema itself stating 'Input text (max 10,000 chars)'. The description adds no syntax, encoding, or format detail beyond the schema, which is the expected baseline when the schema does the work.

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 names a specific algorithm and resource ('Build a suffix tree (Ukkonen's algorithm)') and states the two derived results ('distinct substrings and longest repeated substring'), so the agent knows exactly what it produces. It does not, however, distinguish itself from nearby siblings such as suffix_array_build, suffix_automaton, or eertree, which also operate on suffix structures.

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 guidance on when to choose this tool over the many other string-structure siblings (suffix_array_build, suffix_automaton, kmp_automaton, trie_ops). The agent must infer applicability from the outputs alone, and no exclusions or prerequisites are stated.

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