Skip to main content
Glama
xultrax-web

agent-memory-mcp

by xultrax-web

save_rule

Save or update a rule to constrain agent behavior, using severity levels (hard=must obey, soft=prefer to obey) to enforce compliance.

Instructions

Save (or update) a rule memory · the 'memory as constraint' wedge. Rules constrain agent behavior, not just store facts. Severity 'hard' = must obey; 'soft' = prefer to obey. Rules auto-project out to AGENTS.md (read by Claude Code, Codex CLI, Cursor, Aider, Devin, Copilot, Gemini CLI, Windsurf, and Amazon Q natively) when AGENT_MEMORY_AUTO_EMIT_DIR is set, or via the emit_companions tool on demand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesShort kebab-case slug, 1-80 chars (e.g. 'no-emojis-ever', 'tests-before-commit')
scopeNoWhere this rule applies. Examples: ['global'], ['project:prefixcheck'], ['tool:git'].
contentYesMarkdown body. Lead with the rule itself, then **Why:** and **How to apply:** lines.
matchesNoRegex patterns that deterministically signal a violation. Used by Tier-1 check_action on every client.
severityNohard = must obey (rule violations are blocked when enforced); soft = prefer to obey (warned but allowed). Defaults to soft.
enforce_onNoAction categories this rule constrains. Examples: 'file_writes', 'commits', 'pushes', 'chat_responses'.
descriptionYesOne-line summary of what the rule constrains
applies_whenNoNatural-language conditions for when the rule triggers. Used by Sampling-enriched check_action on supporting clients.
last_verifiedNoISO date (YYYY-MM-DD) of last verification. Defaults to today.
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses severity levels and auto-projection behavior, but lacks details on authorization, rate limits, idempotency, or side effects of updating existing rules.

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?

Four concise sentences, front-loaded with the core action. Each sentence earns its place: purpose, distinction, severity, projection. No fluff or redundancy.

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?

Covers the core purpose and key behaviors, but lacks information about return values (no output schema) and does not explain all parameters' use in depth. It is adequate but leaves gaps for an AI agent to infer.

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 coverage is 100%, but description adds value by explaining severity meaning and projection behavior, offering context beyond enum descriptions. It reinforces the purpose of each 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?

The description clearly states 'Save (or update) a rule memory' with specific verb and resource. It distinguishes rules from factual memories ('constrain agent behavior, not just store facts'), and mentions unique auto-projection behavior, setting it apart from siblings like save_memory.

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?

The description implicitly contrasts with factual memories ('not just store facts'), guiding when to use this tool. However, it does not explicitly list alternatives or state when not to use it, though the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xultrax-web/agent-memory-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server