Skip to main content
Glama

search_patterns

Search for reusable design patterns and principles from Claude Code's architecture to adapt for your own AI agent. Filter by pattern type, keywords, or module.

Instructions

Search for reusable design patterns and principles extracted from Claude Code's architecture. Returns 'directly-reusable' patterns that you can adapt for your own Agent implementation. Output is paginated: each section is capped (default 800 chars) and total sections capped (default 12). Use module_id to focus, or get_module(section="principles") for the full text of a specific module.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pattern_typeNoType of patterns to search: 'reusable' = patterns you can copy, 'anti-pattern' = patterns to avoid, 'all' = both.
keywordsNoOptional: filter patterns by keywords (e.g., ['cache', 'retry', 'streaming']).
module_idNoOptional: restrict to a single module (e.g., 'M05'). Useful when you already know the relevant module.
max_per_sectionNoOptional: per-section character cap (default 800). Truncated sections include a hint to fetch full content via get_module.
max_sectionsNoOptional: maximum total number of sections to return (default 12).
Behavior4/5

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

Discloses pagination, character and section caps, and hints to fetch full content via get_module. Since no annotations are present, this adequately informs about expected behavior without missing critical details.

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?

Two sentences, no unnecessary words. First sentence states core function and return type; second explains pagination and module usage. Efficient and well-structured.

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?

Covers key behavioral aspects (pagination, caps, get_module link) given no output schema and 5 parameters. Missing explicit return format or error handling, but overall sufficient for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds value beyond the schema by explaining defaults (800 chars, 12 sections), the purpose of module_id for focusing, and the get_module fallback. Schema coverage is 100%, but description enriches understanding.

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?

Clear verb 'search' and specific resource 'reusable design patterns and principles'. Distinguishes from sibling get_module by explicitly suggesting its use for full content retrieval.

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?

Provides clear context for when to use (searching patterns) and how to focus (module_id). Mentions get_module as alternative for full text, but no explicit 'when not to use' or list of all alternatives.

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/contradictory-body/cc-sensei'

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