Skip to main content
Glama

detect_patterns

Analyze captured hook events to surface recurring shell commands and error signatures, then receive automation suggestions for repeated behaviors.

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.
Behavior2/5

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

No annotations are provided, and the description does not explicitly state whether the tool is read-only or modifies any state. While the focus on 'analyze' suggests non-destructive behavior, it does not confirm side effects like persistence or data retention, leaving the agent uncertain about its impact.

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 extremely concise, consisting of two clear sentences that cover functionality, parameters, output, and usage context. There is no redundancy or extra fluff, making it efficient for agent parsing.

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 lack of an output schema, the description adequately summarizes the return structure (array of pattern objects with specified fields). It also contextualizes the parameters implicitly by stating what they control. This is sufficient for a simple tool, though it could be slightly more detailed about edge cases.

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?

The schema provides complete descriptions for both parameters (window_days and min_occurrences) with defaults, so the baseline is 3. The tool description does not add any extra nuance beyond what is in the schema, so it stays at the baseline.

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's function: analyzing runtime hook events to surface recurring behaviors. It distinguishes itself from sibling tools by focusing on pattern detection and automation suggestions, making its purpose unambiguous.

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?

It provides explicit guidance on when to use the tool ('after several sessions of work'), which helps the agent decide when to invoke it. However, it does not mention when not to use it or alternative tools for single-session analysis, so it loses a point for incomplete context.

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