Skip to main content
Glama

memory_write

Write persistent key-value memory for AI agents, scoped to the paying wallet. Supports optional TTL for auto-expiration or deletion.

Instructions

[$0.002/call, wallet required] Persistent key-value memory for agents, scoped to the paying wallet. Your x402 payment IS your authentication: the wallet that pays owns the namespace. No signup, no API keys. Body: {"key":"…","value":any JSON,"ttlSeconds":3600?} to write (optional TTL), or {"key":"…","delete":true} to remove. Add "owner":"0x…" to write into another wallet's namespace you've been granted. Values up to 64KB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to write (max 256 chars)
ownerNoOptional 0x namespace to write into (requires a readwrite grant)
valueNoAny JSON value (max 64KB serialized)
deleteNoSet true to delete the key instead
ttlSecondsNoOptional: auto-expire the key after N seconds
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 and discloses cost ($0.002/call), authentication method (x402 payment), TTL expiration, delete functionality, cross-namespace grants, and size limits (64KB). It does not specify the return value on success, but the information is substantial.

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 compact (two sentences) and front-loaded with cost and authentication. Every sentence adds value, and the body format is clearly outlined without unnecessary detail.

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?

Given the absence of an output schema and the presence of sibling tools, the description covers the key aspects: write/delete semantics, TTL, cross-namespace ownership, and limits. It lacks information about the response (e.g., success/failure), but this is a minor gap for a write tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds significant meaning by explaining the body format, showing examples, clarifying the owner parameter requires a grant, and noting that value can be any JSON up to 64KB. This goes well beyond the bare schema description.

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 writes persistent key-value memory scoped to a wallet, which distinguishes it from sibling tools like memory_read and memory_recall. It specifies the resource (memory), action (write/delete), and scope (wallet namespace).

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 explains when to use the tool (write, delete, with TTL) and provides context for cross-namespace writes via the 'owner' parameter. However, it does not explicitly mention when not to use this tool versus siblings like memory_read or memory_remember.

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/MikeyPetrillo/Agent402'

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