# top_memories

Return the top N highest-priority non-expired keys in a namespace, ordered by priority descending. Useful for loading the most important context when space is limited. Maximum n is 1000.

Agent View of the PolicyLayer registry record for `top_memories`. HTML page: https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/top-memories

## Facts

- Tool: `top_memories`
- Server: AI Cortex Storage (`https://memory.aic0rt3x.dev/mcp`) — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp.md
- Homepage: https://github.com/https://memory.aic0rt3x.dev/mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 2 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `n` | integer | no | Number of keys to return (default 10, max 1000) |
| `namespace` | string | yes | ≤ 255 characters, no '/' |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "top_memories",
    "arguments": {
      "namespace": "<namespace>"
    }
  }
}
```

## Why top_memories is rated Low

This tool queries and retrieves existing memory data from a namespace with no side effects. It is a read-only operation that filters and orders data for display. The capability is limited to 1000 keys maximum, and there is no mechanism to alter state. While the associated server manages sensitive data (memories, API keys, payments), this specific tool only accesses and returns information without modifying it.

From the tool's own definition: "Tool description states 'Return the top N highest-priority non-expired keys' and 'Useful for loading the most important context' — pure data retrieval with no modification, creation, or deletion of memories."

## Use case

AI agents call top_memories to retrieve information from AI Cortex Storage without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches AI Cortex Storage:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "top_memories": {}
  }
}
```

## Other tools on AI Cortex Storage (14)

- `delete_memory` — Destructive — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/delete-memory.md
- `revoke_api_key` — Destructive — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/revoke-api-key.md
- `settle_balance` — Financial — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/settle-balance.md
- `submit_feature_request` — Financial — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/submit-feature-request.md
- `get_account` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/get-account.md
- `get_memory` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/get-memory.md
- `list_api_keys` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/list-api-keys.md
- `list_keys` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/list-keys.md
- `list_namespaces` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/list-namespaces.md
- `list_payments` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/list-payments.md
- `search_by_tag` — Read — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/search-by-tag.md
- `create_api_key` — Write — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/create-api-key.md
- `put_memory` — Write — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/put-memory.md
- `submit_exit_feedback` — Write — https://policylayer.com/tools/dev-aic0rt3x-memory-mcp/submit-exit-feedback.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dev-aic0rt3x-memory-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dev-aic0rt3x-memory-mcp
