Skip to main content
Glama

detect_patterns

Analyze source code to detect common design patterns like Singleton and Factory across multiple programming languages.

Instructions

Detect design patterns in source code (Singleton, Factory, Observer, Strategy, Decorator, Builder, Adapter, Command, Template Method, Chain of Responsibility). Supports 9 languages: Python, JavaScript, TypeScript, C++, C, C#, Go, Rust, Java, Ruby, PHP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
directoryNo
outputNo
depthNodeep
jsonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries full behavioral disclosure burden. It fails to mention whether the tool is read-only, modifies files, requires specific permissions, or has rate limits. The description only lists detectable patterns and languages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loading the main purpose. However, it lacks structure such as sections for parameters or usage, and the single sentence format omits essential details.

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

Completeness1/5

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

Given 5 parameters with no schema descriptions, no annotations, and an output schema not described, the description is incomplete. It only covers purpose but fails to provide necessary context for input, output, or behavior.

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

Parameters1/5

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

None of the 5 parameters (file, directory, output, depth, json) are explained in the description. With 0% schema description coverage, the agent has no information on what these parameters control or their valid values.

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 detects design patterns in source code, listing 10 specific patterns and 11 supported languages. This provides a specific verb+resource and distinguishes it from sibling tools focused on scraping or configuration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, when not to use it, or prerequisite conditions. The description implies usage for code analysis but offers no explicit 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/yusufkaraaslan/Skill_Seekers'

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