Skip to main content
Glama

brain_record_rule

Enforce a strict constraint that AI agents must always obey, storing each rule with its category, project scope, and severity for automatic surfacing before code generation.

Instructions

Enforce a strict constraint that agents must always obey.

Args: rule: The constraint statement (e.g., 'All code comments and docs must be in English') category: Category like 'language', 'architecture', 'security', 'git', 'style', 'general' project: Project identifier or 'global' severity: 'CRITICAL', 'HIGH', 'MEDIUM', or 'LOW'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleYes
projectNoglobal
categoryNogeneral
severityNoCRITICAL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/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 burden. It implies the rule persists and is obeyed by agents ('must always obey'), but says nothing about storage scope, whether rules are ever deleted or superseded, permission requirements, or what happens if a conflicting rule exists. For a mutation tool with zero annotation coverage this is a significant gap.

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?

A single front-loaded sentence states the tool's effect, followed by a compact Args list. The parameter names repeat the schema keys, but the examples and severity enumeration earn their space, so there is little waste.

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 explained. However, for an unannotated mutation tool the description leaves the agent without the persistence and conflict semantics it would need to call this confidently alongside brain_list_rules and brain_record_experience.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 it largely does: it defines all four parameters, gives a concrete example for 'rule', lists candidate categories, explains that 'project' accepts an identifier or 'global', and enumerates the four valid severity values even though the schema declares no enum. It stops short of explaining default behavior (e.g., what 'global' scope means in practice).

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 description gives a clear verb and resource ('Enforce a strict constraint') that maps to the tool name brain_record_rule, and the Args block confirms the recorded entity is a rule. It does not differentiate from siblings like brain_record_experience or brain_record_golden_pattern, which also record persistent agent knowledge, so an agent must infer the distinction from names alone.

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

Usage Guidelines2/5

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

There is no statement of when to record a rule versus the sibling tools, no preconditions, and no exclusions. The only usage signal is the adjective 'strict', which hints at durable/high-importance content but is not an actionable routing condition.

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