Skip to main content
Glama

analyze_design_patterns

Focused analysis of Gang of Four (GoF) design patterns in code. Detects Singleton, Factory, Observer, Strategy, and other classic patterns with confidence levels and implementation details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe source code to analyze
filenameYesThe filename (used to detect language)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description must convey behavioral safety. It mentions output details (confidence levels) but does not explicitly state that the tool is read-only or that it does not execute the submitted code. This leaves behavioral ambiguity for a tool that accepts source code.

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 with no redundancy. The first sentence states scope, the second adds specific pattern names and output characteristics.

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

Completeness3/5

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

The description covers the core behavior and mentions output characteristics, but lacks details on supported languages, limitations, or error handling. Given the absence of an output schema, more behavioral detail would improve completeness, but for a simple analysis tool it is minimally adequate.

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%, with descriptions for both code and filename. The tool description adds no additional parameter-specific semantics, so it does not go beyond the schema, earning the baseline score.

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?

Description clearly states the tool's purpose: analyze code for GoF design patterns. It lists specific patterns (Singleton, Factory, Observer, Strategy) and mentions output with confidence levels, distinguishing it from generic siblings like analyze_code or analyze_patterns.

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

Usage Guidelines3/5

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

The description implies usage for GoF pattern analysis but does not explicitly state when to use it over siblings like analyze_patterns or analyze_code. No exclusion criteria or alternative tool suggestions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources