Skip to main content
Glama

trie_ops

Build a prefix tree from word lists to run exact-match searches, count words by prefix, and generate autocomplete suggestions.

Instructions

Build a trie (prefix tree) from words and perform search, prefix count, and autocomplete queries.

Input Schema

NameRequiredDescriptionDefault
wordsYesWords to insert into the trie
prefixNoPrefix for autocomplete suggestions
queriesNoWords to search for (exact match and prefix count)

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 are provided, so the description carries the full disclosure burden and falls short. It does not say whether the trie is built fresh per call or persisted, whether the three operations run in one invocation or are selected by which params are supplied, or what the response shape is for a tool with no output schema. Only the surface operations are named.

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 efficient sentence with the resource and its capabilities front-loaded and no wasted words. It is well-sized, though the terseness contributes to the missing behavioral detail rather than being purely a virtue.

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 a 3-param, multi-operation tool with no annotations and no output schema, the description is only adequate. It names the operations but does not explain how params select behavior or what comes back, leaving the agent to infer the contract from the schema alone.

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 the schema already documents words, prefix, and queries, making 3 the baseline. The description adds a little meaning by tying prefix to autocomplete and queries to exact match plus prefix count, but does not clarify how the three params combine or which are optional in which operation.

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?

States a clear verb+resource: build a trie from words, then run search, prefix count, and autocomplete. An agent can tell what it does. However it gives no differentiation from the many sibling string-search tools (aho_corasick_search, kmp_search, suffix_tree), so it stops at a clear-but-undifferentiated 4.

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 when-to-use guidance at all. It never says when a trie is preferable to aho_corasick_search, kmp_search, or the other substring/frequency tools in the sibling list, nor does it state prerequisites or ordering (must queries come after build?). The multi-operation nature makes this omission more costly than for a single-purpose tool.

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