Skip to main content
Glama

memory_init

Scans a repository to create a categorized project baseline, ingests existing compaction summaries, and installs a memory block in CLAUDE.md to enable memory queries and automatic updates.

Instructions

Create the FIRST STATE for a project and wire Claude Code to use memory.

Call this once at the start of working on a repo (or to refresh — it's idempotent). It:

  1. Scans the repo into a categorized project.* baseline (overview, stack, structure, commands, connections, git, docs).

  2. Folds in current context: ingests any existing compaction summaries for this repo's Claude Code session(s).

  3. Installs a managed memory block in the project CLAUDE.md so the agent knows to query (memory_find) and rely on automatic updates.

root: repo path (defaults to the server's working directory). When running in Docker, mount the repo and pass its in-container path here. install_hooks: also add SessionStart/PostCompact hooks to ~/.claude/settings.json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNo
projectNo
install_hooksNo
install_claude_mdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description fully carries the burden. It discloses that the tool scans the repo, folds in compaction summaries, and installs a managed memory block. It also notes idempotency and the optional installation of hooks, giving a comprehensive view of 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 moderately concise and well-structured with bullet points and parameter explanations. It front-loads the main purpose. Slightly verbose with the bullet lists, but clear and organized.

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?

The tool has 4 parameters, no annotations, but an output schema exists. The description covers the initialization workflow, idempotency, and main side effects. It explains two parameters fully but leaves two undocumented. Overall, it's adequate for an initialization tool but could be more exhaustive.

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. It explains 'root' (repo path, defaults to working directory, Docker hint) and 'install_hooks' (adds hooks to settings.json). However, 'project' and 'install_claude_md' are not described, leaving gaps.

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 creates the first state for a project and wires Claude Code to use memory. It specifies the verb 'Create' and the resource 'FIRST STATE', and distinguishes itself from sibling tools like memory_find or memory_store by focusing on initialization.

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 explicitly says 'Call this once at the start of working on a repo (or to refresh — it's idempotent).' This provides clear context for when to use the tool. However, it does not explicitly mention when not to use it or directly compare with siblings.

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/NguyenSen/cc-mem-mcp'

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