Skip to main content
Glama

brain_record_golden_pattern

Save verified code snippets as reusable golden patterns so AI agents copy proven boilerplate instead of reinventing it.

Instructions

Save a battle-tested code snippet that agents must copy/adopt instead of reinventing boilerplate.

Args: title: Short descriptive title context: Stack/domain keywords (e.g., 'php mysql pdo') code_snippet: The exact verified working code explanation: Explanation of why this pattern is preferred project: Project identifier or 'global'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
contextYes
projectNoglobal
explanationNo
code_snippetYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It says the snippet must be 'exact verified working code' but never states whether re-recording the same title overwrites or duplicates, how patterns are later retrieved, or any permission/scope requirements for a write operation.

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 a single high-signal sentence, followed by a tight Args list with no filler. It is appropriately sized for a five-parameter tool, though the Args glosses are thin relative to the space they occupy.

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?

An output schema exists, so return values need not be described. The remaining gap is behavioral: for a persistence tool with no annotations, the description says nothing about storage scope, overwrite semantics, or how the recorded pattern is subsequently surfaced to agents.

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 0%, so the description must compensate, and the Args block does enumerate all five parameters. However most glosses merely restate the field names ('title: Short descriptive title', 'code_snippet: The exact verified working code'); only the context example ('php mysql pdo') and the 'global' project default add real semantic value.

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?

The first sentence gives a specific verb+resource: saving a 'battle-tested code snippet' as a reusable 'golden pattern'. It implies a distinct artifact type versus siblings like brain_record_experience or brain_record_rule, but never names or contrasts them, so the differentiation is inferential rather than explicit.

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?

"agents must copy/adopt instead of reinventing boilerplate" hints at the trigger condition (you have verified boilerplate worth reusing), but there is no explicit when-to-use/when-not guidance and no routing to brain_record_experience or brain_record_rule for non-code knowledge.

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