Skip to main content
Glama

kmp_automaton

Builds a KMP DFA transition table from a pattern and alphabet, enabling deterministic streaming pattern matching.

Instructions

Build a full KMP DFA transition table for streaming pattern matching.

Input Schema

NameRequiredDescriptionDefault
patternYesPattern string (max 1000 chars)
alphabetNoAlphabet characters (default a-z)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses that the tool builds a full DFA transition table, which is useful, but it does not describe the output structure, state representation, or any computational constraints beyond the schema's max-length note.

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?

The description is a single, front-loaded sentence with no wasted words. It efficiently communicates the core operation and intended context.

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 two-parameter algorithmic tool with a fully documented schema, the description is minimally adequate. However, because there is no output schema, it would ideally explain the returned transition-table format or state representation, which it does not.

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 both parameters, including the default alphabet. The description adds no additional parameter semantics beyond what is already in the structured schema.

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 (Build) and resource (full KMP DFA transition table), making the operation clear. However, it does not explicitly distinguish this from algorithmic siblings such as kmp_search or aho_corasick_search, so sibling 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 Guidelines3/5

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

The phrase 'for streaming pattern matching' implies a use case, but there is no explicit guidance on when to use this tool versus alternatives like kmp_search or aho_corasick_search. No exclusions or prerequisites are provided.

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