Skip to main content
Glama

core_memory_replace

Replace the first occurrence of old_text with new_text in the pinned core-memory block to update or compact it.

Instructions

Replace the first occurrence of old_text with new_text in the pinned core-memory block. Returns error: not_found if old_text is absent, or core_memory_full if the result would exceed char_limit. Use this to update or compact the block.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoMemory scope for isolationglobal
namespaceNoNamespace within scope (e.g., project name, team name)
old_textYesSubstring to find (first occurrence) in the core-memory block
new_textYesReplacement text for the first occurrence of old_text
Behavior4/5

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

Annotations only provide openWorldHint=false, so the description carries the burden. It discloses replacing the first occurrence, possible errors (not_found, core_memory_full), and hints at persistence ('pinned core-memory block'). However, it does not specify if the operation is atomic or if any side effects occur beyond the replacement.

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?

Two sentences: first explains the core operation, second adds error information and usage hint. Every word serves a purpose with no fluff. Front-loaded and efficient.

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?

Lacks output details for success (e.g., returns nothing or updated block?). No output schema exists. The description covers errors but leaves the agent guessing about success behavior. Adequate for a replace operation but not fully complete.

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?

Input schema has 100% description coverage, so every parameter's meaning is already documented. The tool description does not add further semantic value beyond what schema provides, meeting the baseline for high coverage.

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?

Description clearly states 'Replace the first occurrence of old_text with new_text in the pinned core-memory block', specifying verb and resource. It also mentions error conditions (not_found, core_memory_full) and a usage hint ('update or compact the block'), which distinguishes it from sibling tools like core_memory_append or core_memory_delete.

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?

The phrase 'Use this to update or compact the block' provides some guidance on when to use, but it does not explicitly contrast with alternatives like core_memory_append or core_memory_get. No when-not-to-use scenarios are mentioned, leaving room for ambiguity in tool selection.

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/YonasValentin/mcp-memory-graph'

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