Skip to main content
Glama

pattern_search

Search historical execution patterns using BM25 retrieval to find relevant success or failure patterns from past tasks. Use this before complex tasks to benefit from past experience.

Instructions

Search historical execution patterns similar to a task description.

Uses BM25 retrieval to find relevant success/failure patterns recorded by agents in previous tasks. Use this before starting a complex task to benefit from past experience.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesTask description or keywords to match against
top_kNoMaximum number of patterns to return (default 3, max 20)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the retrieval method (BM25) and that it finds success/failure patterns, but does not mention limitations, rate limits, or data scope. Adequate but not exhaustive.

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: two sentences that cover purpose, method, and usage guidance. No unnecessary words, front-loaded with the main action.

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?

The tool has an output schema, so return values don't need explanation. It has only 2 parameters and no nested objects. The description adequately covers when to use and how it works (BM25). Minor gaps: no mention of data source or scope, but overall complete.

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%, and the description adds slight context (e.g., 'Task description or keywords' for query, default and max for top_k). However, this largely mirrors the schema. Baseline 3 is appropriate as the description adds minimal extra meaning.

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 searches historical execution patterns similar to a task description, using BM25 retrieval. It specifies the resource ('historical execution patterns') and the action ('search'), distinguishing it from other search tools like unified_search or ecosystem_search.

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 advises using this tool 'before starting a complex task to benefit from past experience,' providing clear context. It does not explicitly mention when not to use or alternatives, but the guidance is specific and helpful.

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/CronusL-1141/AI-company'

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