Skip to main content
Glama
@memoryrelay/mcp-server

@memoryrelay/mcp-server

Official
by memoryrelay

pattern_create

Document reusable development patterns and conventions so they can be discovered and adopted across projects, capturing context, rationale, examples, and scope for consistent implementation.

Instructions

Create a reusable development pattern or convention. Use to document patterns like "always use Zod for validation" or "error responses follow RFC 7807" so they can be discovered and adopted across projects.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "title": "<title>",
      "description": "<description>"
    },
    "name": "pattern_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for categorization
scopeNoScope: global (all projects) or project (specific projects). Default: global
titleYesPattern title (e.g., "Zod validation at API boundaries")
categoryNoCategory (e.g., "validation", "error-handling", "auth", "testing")
descriptionYesFull description with context, rationale, and when to apply this pattern
example_codeNoCode snippet demonstrating the pattern
source_projectNoSlug of the project where this pattern was first established

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden and is thin: it discloses the useful downstream trait that created patterns become discoverable and adoptable across projects, but says nothing about duplicate handling, permission requirements, defaults, or what a failed create looks like. The one genuinely behavioral claim it makes is valuable, but most mutation semantics are left unstated.

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 tight sentences: the first names the action and object, the second explains the payoff and illustrates it. Purpose is front-loaded and every clause earns its place; nothing is redundant or padded.

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?

For a seven-parameter creation tool with no annotations and no output schema, the description covers intent but not behavior: it does not say whether the tool returns the new pattern's identifier, how duplicates or near-duplicates are treated, or how example_code and source_project affect adoption. The schema fills in field-level meaning, so the remaining gap is behavioral rather than structural.

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 all seven parameters carry inline documentation, including the scope enum and the description/example_code split, so the description need not restate them. It adds no extra meaning beyond the schema, which is acceptable given the coverage baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Create a reusable development pattern or convention') and grounds it with two concrete examples ("always use Zod for validation", "error responses follow RFC 7807"). The resource is distinct enough from siblings like pattern_adopt, pattern_search, or memory_store that an agent can recognize this as the creation entry point, though no sibling is named explicitly.

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 condition for use — record a convention 'so they can be discovered and adopted across projects' — which tells the agent this feeds the pattern discovery flow rather than a one-off note. It stops short of an explicit boundary, e.g. when to record a pattern here versus storing it via memory_store or when to use pattern_adopt instead.

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