Skip to main content
Glama

get_patterns

Retrieve coding patterns and conventions from a codebase to maintain consistency when writing new code. Use optional filters to find specific patterns like naming conventions, structural patterns, or module roles.

Instructions

Get coding patterns and conventions for this codebase.

Returns a catalog of naming conventions, structural patterns, module roles,
and repeated idioms. Use this before writing new code to ensure you follow
the project's existing conventions.

query: optional filter (e.g. "render", "plugin", "test", "handler")
max_tokens: cap output size (default 4000)
exclude_dirs: comma-separated directory prefixes to skip
output_format: "text" (default) or "json"

Examples:
- get_patterns(".")                          → full convention catalog
- get_patterns(".", query="plugin")          → plugin-related patterns
- get_patterns(".", query="render")          → rendering conventions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYes
queryNo
max_tokensNo
exclude_dirsNo
output_formatNotext

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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/Elmoaid/TempoGraph'

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