forget_memories
Delete memory entries matching filters. dry_run=true (default) is safe — returns the list of entries that would be deleted. Pinned entries are never forgotten. At least one filter required. Owner only — registered handle + secret required.
This record as markdown: /tools/com-wingmanprotocol-agent-gateway/forget-memories.md
What forget_memories does on Gateway
AI agents call forget_memories to permanently remove resources in Gateway, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | |
secret | string | — | |
dry_run | boolean | — | if true, return candidates without deleting |
namespace | string | — | restrict to one namespace |
older_than_days | integer | — | delete entries last updated > N days ago |
not_read_in_days | integer | — | delete entries not read in N days |
Parameters from the server's own tool schema.
Why forget_memories is rated Critical
This tool permanently deletes memory entries, which cannot be undone. While dry_run=true provides a safeguard to preview deletions, the actual operation (dry_run=false or default behavior) irreversibly removes data. The ownership requirement and authentication (registered handle + secret) mitigate risk somewhat, but misuse by an authenticated agent could still cause unrecoverable data loss.
From the tool's definition Tool name is 'forget_memories' and description explicitly states 'Delete memory entries matching filters.' The destructive nature is confirmed by the phrase 'returns the list of entries that would be deleted' and the note that 'Pinned entries are never…
Risk signalsHandles credentials or secrets (secret)
Attacks that exploit this kind of access
The rule that runs forget_memories safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Gateway, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For forget_memories, this is the rule to start with:
forget_memories is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Gateway, apply this rule, and every forget_memories call is checked against it from then on.
Questions about forget_memories
Delete memory entries matching filters. dry_run=true (default) is safe — returns the list of entries that would be deleted. Pinned entries are never forgotten. At least one filter required. Owner only — registered handle + secret required. It is categorised as a Destructive tool in the Gateway MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
forget_memories accepts 6 parameters: handle, secret, dry_run, namespace, older_than_days, not_read_in_days. Required: handle. The full parameter table on this page comes from the server's own tool schema.
Register the Gateway MCP server in PolicyLayer and add a rule for forget_memories: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Gateway. Nothing to install.
forget_memories is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the forget_memories rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for forget_memories. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
forget_memories is provided by the Gateway MCP server (https://wingmanprotocol.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Gateway, and thousands of servers like it.
Across the catalogue