Skip to main content
Glama

memory-write

memory.write

Store or update persistent JSON values under a key for your agent, with optional expiry. Authenticate via wallet payment to own the namespace and manage structured state.

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. Exact-key storage for structured state - when you want retrieval by MEANING rather than key, use memory-remember + memory-recall instead. 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
bytesNo
ownerNo
deletedNo
updatedNo
expiresAtNo
persistentNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv2.3.0

TDQS

A4/5.0
Behavior1/5

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

The description discloses cost, wallet-based authentication, namespace ownership, TTL, size limits, and owner grants, which is excellent transparency. However, it directly contradicts the annotation destructiveHint=false by documenting delete:true to remove keys, which is a destructive operation. Per the rubric, contradiction with annotations forces a score of 1.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well front-loaded: cost and authentication first, then purpose, alternatives, and payload shape. It earns most of its length, though it slightly repeats schema facts such as the 64KB value size limit.

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?

For a stateful 5-parameter tool with an output schema, the description covers authentication, namespace ownership, deletion, TTL, size limits, and sibling alternatives. An agent has enough context to invoke it successfully; the only serious fault is the annotation contradiction.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents key, owner, value, delete, and ttlSeconds. The description adds concrete body examples, clarifies write-versus-delete mode, and explains optional TTL and ownership grants, going beyond the schema without needing to compensate for missing parameter docs.

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 states a specific verb and resource: writing persistent key-value memory scoped to a paying wallet. It clearly distinguishes exact-key storage from semantic retrieval via memory-remember and memory-recall, so an agent can identify this as the exact-key write tool.

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?

It explicitly names the alternative memory-remember + memory-recall and the condition for choosing them: retrieval by meaning rather than key. It also explains the authentication prerequisite and the owner-grant model for writing into other namespaces, giving clear context for when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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