Skip to main content
Glama

detect_patterns

Identifies recurring shell commands and error patterns across sessions by analyzing runtime hook events, offering frequency counts and automation suggestions.

Instructions

Analyze captured runtime hook events and surface recurring behaviors across sessions. Detects repeated shell commands and recurring error signatures using frequency analysis. Patterns are stored with frequency, last_seen, and suggested_automation fields. Returns an array of pattern objects with type, description, occurrence count, and an actionable automation suggestion. Call after several sessions of work to identify tasks worth automating or formalizing as a hook.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
window_daysNoNumber of past days to analyze. Defaults to 7.
min_occurrencesNoMinimum times a pattern must appear to be reported. Defaults to 3.
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that patterns are stored with frequency, last_seen, and suggested_automation, and returns an array of pattern objects with type, description, occurrence count, and automation suggestion. It does not address side effects or permissions, but the overall behavior is transparent for a read-oriented analysis tool.

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 four sentences, each earning its place: purpose, detection subject, output fields, and usage timing. No redundant information, well-structured, and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 2 parameters with 100% schema coverage and no output schema, the description provides sufficient context: what the tool does, what it returns, and when to use it. It lacks a mention of non-destructiveness or prerequisites, but overall it is complete for the tool's complexity.

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 coverage is 100%, so baseline is 3. The description does not add any extra meaning to the parameters beyond the schema descriptions (window_days defaults to 7, min_occurrences defaults to 3). No additional details about parameter usage or syntax are provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes runtime hook events, detects repeated shell commands and error signatures, and returns pattern objects. It is specific and distinguishes from sibling tools like lesson_save or query_history which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description provides explicit guidance: 'Call after several sessions of work to identify tasks worth automating or formalizing as a hook.' It gives a clear context for use but does not explicitly mention alternatives or when not to use, though the timing is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Fmarzochi/EGC'

If you have feedback or need assistance with the MCP directory API, please join our Discord server