Skip to main content
Glama
memstate-ai

Memstate AI - Agent Memory System

Official

memstate_delete

Soft-delete memories by keypath to remove outdated information while preserving full version history. Use this tool to clean up agent memory subtrees or mark memories as no longer relevant.

Instructions

Soft-delete a memory by keypath. Creates a tombstone version preserving full history. The memory can be un-deleted by setting a new value at the same keypath.

USE THIS WHEN: You need to remove outdated or incorrect memories, clean up a keypath subtree, or mark memories as no longer relevant. NOT FOR: Updating content (use memstate_set or memstate_remember to overwrite with new content instead).

memstate_delete(project_id="myapp", keypath="config.old_setting") memstate_delete(project_id="myapp", keypath="config", recursive=true) → deletes config and all children

History is preserved. Use memstate_history to see the deletion in the version chain. Keypath is auto-prefixed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesRequired. Project containing the memory.
keypathYesRequired. Keypath to delete (auto-prefixed with 'project.{project_id}.').
recursiveNoIf true, delete the entire keypath subtree. Default: false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The memstate MCP server is a proxy that forwards all tool calls, including 'memstate_delete', to a remote MCP server via the 'remote.callTool' method.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      return await remote.callTool({
        name: request.params.name,
        arguments: request.params.arguments,
      });
    });
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: soft-deletion (not permanent), tombstone creation, history preservation, undeletion capability, and auto-prefixing behavior. It also references memstate_history for viewing deletions. The only minor gap is lack of explicit mention about permissions or error conditions.

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?

The description is well-structured with clear sections, uses bold headings for emphasis, includes practical examples, and every sentence adds value. It's appropriately sized for a tool with important behavioral nuances and sibling distinctions.

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

Completeness5/5

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

Given the tool's complexity (soft-deletion with history preservation), the description provides comprehensive context. With no annotations but an output schema present, it covers behavioral aspects thoroughly while appropriately deferring return value details to the output schema. It addresses key sibling relationships and usage scenarios.

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 100%, so the baseline is 3. The description adds some value by providing concrete examples with project_id='myapp' and showing recursive behavior, but doesn't significantly enhance the parameter understanding beyond what the schema already documents clearly.

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 specific action ('soft-delete a memory by keypath') and distinguishes it from siblings by explaining it creates tombstone versions and preserves history. It explicitly contrasts with memstate_set and memstate_remember for updating content.

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?

The description includes explicit 'USE THIS WHEN' and 'NOT FOR' sections that provide clear guidance on when to use this tool versus alternatives. It mentions specific scenarios (removing outdated memories, cleaning up subtrees) and names alternative tools for different use cases.

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/memstate-ai/memstate-mcp'

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