Skip to main content
Glama

Get Design Pattern

get_design_pattern
Read-onlyIdempotent

Retrieve a complete design pattern record by name or alias, including intent, tradeoffs, participants, and per-language implementations, to guide pattern selection and implementation.

Instructions

Get the full JSON of a single design pattern by its name or a resolved alias (e.g. 'singleton', 'borg'). Returns the complete record: intent, problem, context, benefits, tradeoffs, quality_attributes, participants, use cases, related patterns, principles, pitfalls, sources, and the joined per-language implementations with their variants. Raises ERR_013 when the pattern is unknown.

Input Schema

NameRequiredDescriptionDefault
_ctxNo
nameYesPattern name or alias, e.g. 'singleton', 'borg'

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so safety is covered. The description adds value beyond that by disclosing what the payload contains (per-language implementations joined with variants) and the failure behavior (ERR_013 on unknown pattern), which an agent cannot learn from the annotations or schema.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and lookup key, then the payload contents and error case. The long enumeration of record fields is somewhat list-heavy but each item does tell the agent what is available in the response.

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?

An output schema exists, so the field enumeration is partly redundant, but the error code (ERR_013) and the alias-resolution behavior are things the schema does not convey. For a two-parameter read tool with full annotations, this is essentially complete.

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 50%, with the `name` parameter already documented and exemplified in the schema itself. The description adds only the notion of a 'resolved alias', which is a marginal refinement over the schema's 'Pattern name or alias', and says nothing about the undocumented `_ctx` parameter.

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?

States a specific verb ('Get the full JSON'), a single resource ('a single design pattern'), and the lookup key (name or resolved alias). This clearly separates it from siblings like list_design_patterns and select_design_patterns, which return sets rather than one full record.

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 phrasing 'a single design pattern by its name' implies the precondition that you already know the identifier, but no sibling is named and there is no explicit when-not or 'use X instead' routing. Usage is inferable rather than instructed.

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