Skip to main content
Glama
xultrax-web

agent-memory-mcp

by xultrax-web

emit_companions

Regenerate companion rule files for AI agents from rule memories. Writes to AGENTS.md, CLAUDE.md, Cursor rules, or Gemini instructions, with optional target filtering.

Instructions

Regenerate companion rule files from the current rule memories. Writes one or more of: AGENTS.md (universal cross-tool standard, Linux Foundation), CLAUDE.md (Claude Code's 5-level hierarchy), .cursor/rules/*.mdc (Cursor's MDC format · hard rules get alwaysApply:true, soft rules become description-driven), .gemini/instructions.md (Gemini CLI). Default writes ALL four targets. Use targets to filter. Output dir resolves from out_dir, then AGENT_MEMORY_COMPANION_DIR env, then process.cwd().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
out_dirNoOptional output directory. Defaults to AGENT_MEMORY_COMPANION_DIR env, then process.cwd().
targetsNoWhich companion files to emit. Omit (or pass empty) to emit all four. Examples: ['agents'] for AGENTS.md only, ['claude','cursor'] for Claude Code + Cursor.
Behavior4/5

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

No annotations provided, so the description fully describes the write operation and output file formats. However, it does not explicitly state that files will be overwritten or mention error conditions, though 'regenerate' implies replacement. Slight gap in specifying side effects.

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?

The description is efficient, using three sentences to convey purpose, target files, and parameter usage. The list in the second sentence is informative but slightly lengthy; still no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description covers input parameters and behavior sufficiently. It lacks explicit mention of return values (e.g., success message or list of written files), but the operation is simple enough that this is a minor gap.

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%, so baseline is 3. The description adds value by explaining directory resolution order and default behavior for the `targets` parameter, including examples. This goes beyond the schema's descriptions.

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 the tool's purpose: regenerating companion rule files from current rule memories. It lists each specific file format (AGENTS.md, CLAUDE.md, etc.), making it distinct from sibling tools like save_rule or list_rules.

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

Usage Guidelines5/5

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

Explicitly explains default behavior (writes all four targets) and how to filter using the `targets` parameter. Provides examples of filtering, giving clear guidance on when to use the tool with or without parameters.

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