Skip to main content
Glama

get_patterns

Retrieve coding patterns and conventions for the codebase, including naming, structure, and idioms. Optionally filter by query. Follow existing conventions before writing new code.

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_pathNo/demo
queryNo
max_tokensNo
exclude_dirsNo
output_formatNotext

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description carries full burden. It implies a read-only operation (no side effects mentioned), but does not explicitly state non-destructiveness, auth needs, or rate limits. Adequate but not thorough.

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?

Efficiently structured with a clear opening, bullet-pointed parameters, and example calls. No redundant sentences; every part adds value.

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

Completeness5/5

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

Despite no annotations, the description covers purpose, when to use, parameter semantics, and examples. An output schema exists, so return values are handled. Complete for a straightforward tool.

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?

With 0% schema description coverage, the description compensates by explaining each parameter's purpose (query filter, max_tokens cap, exclude_dirs, output_format). Examples illustrate usage, adding value beyond the bare schema.

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 retrieves 'coding patterns and conventions' for the codebase, with a specific verb ('Get') and resource. It distinguishes itself from siblings like 'lookup' and 'symbols' by focusing on patterns and conventions rather than code search or symbols.

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?

Explicitly advises use 'before writing new code to ensure you follow the project's existing conventions.' Examples show typical queries (plugin, render). Lacks explicit 'when not to use' or alternative sibling tool references, but context is clear.

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

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