Skip to main content
Glama

Select Design Patterns

select_design_patterns

Selects design patterns for a described system, returning per-language implementations, supporting patterns, interactions, test strategy and risks with a traceable reasoning trail.

Instructions

Select the design patterns to apply to a described system, with per-application language bindings and a traceable reasoning trail. Send the components, their responsibilities and the constraints derived from an architecture result. Returns applications (pattern, participants, implementation steps, bound language variant), supporting patterns, interactions, quality attributes, a test strategy and risks. Use this when the caller wants the generated design; when your agent writes the code itself and only needs the decisions, call analyze_design instead — it runs the same ANALYZE phase and skips generation and evaluation.

Input Schema

NameRequiredDescriptionDefault
focusNoOptional free text narrowing the decision or naming a realization, e.g. 'use the coroutine-based acceptor variant'. A verbatim variant_id is bound exactly; readable ids come from the design-patterns://variants resource.
languageNoOptional target language: generic, c, cplusplus, csharp, go, java, javascript, kotlin, python, ruby, rust, scala, swift, typescript. The patterns are returned realized in that language; absent, empty or unrecognized values run in generic (language-neutral) mode.
paradigmNoOptional paradigm narrowing the realization variant: oo, functional, concurrent, data-oriented, declarative, procedural. Unknown values are ignored.
descriptionYesFree-text description of the system to design: component names with their responsibilities, cross-component flows, and the constraints the design must satisfy (40-100000 characters). Architecture-level choices alone are not enough — name the components to implement.
architecture_styleNoOptional architecture style from the architecture server's style enum (e.g. 'event-driven', 'hexagonal', 'microservices'). Unknown values are ignored; a known value takes precedence over any style extracted from the description and adds a soft category prior.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and non-idempotent, and the description adds substantial context beyond them: what the call produces (applications with participants and implementation steps, supporting patterns, quality attributes, test strategy, risks) and its position in the pipeline relative to analyze_design. It does not mention cost, latency, or run-to-run variability of the generated output, which are the remaining behavioral unknowns.

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?

Front-loaded with the action and scope, and the routing sentence is well placed at the end. The mid-sentence enumeration of return contents largely duplicates the output schema, which costs a bit of density.

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?

For a five-parameter generative tool with full schema coverage and an output schema, the description covers purpose, inputs to supply, expected artifacts, and sibling routing. An agent has everything needed to decide to call it and to fill the required description field sensibly.

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 description coverage is 100% and each parameter already documents its own fallbacks (unknown language -> generic, unknown architecture_style ignored). The description adds a little provenance value by saying inputs should be 'derived from an architecture result' and that outputs are bound to the language, but it does not reinterpret any individual parameter beyond the 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?

States a specific verb and resource ('Select the design patterns to apply to a described system') plus the distinctive outputs (per-application language bindings, traceable reasoning trail). It explicitly contrasts itself with the sibling analyze_design, so the agent can route without opening either schema.

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?

Gives a clear use case ('Use this when the caller wants the generated design') and a named alternative with the condition that selects it (agent writes code itself, only needs decisions -> analyze_design). It also implies via 'skips generation and evaluation' that this tool spans the full ANALYZE+generate+evaluate pipeline, though generate_design and evaluate_design are never named directly.

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