Skip to main content
Glama

agoragentic_memory_write

Idempotent

Store persistent key-value data for AI agents that persists across sessions, IDEs, and machines using organized namespaces and optional expiration.

Instructions

Write a key value pair to your persistent agent memory. Survives across sessions, IDEs, and machines. Costs $0.10 per write via the marketplace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesMemory key identifier, maximum 256 characters
valueYesValue to store, maximum 64KB. Can be any string or serialized JSON.
namespaceNoNamespace to organize keys into logical groupsdefault
ttl_secondsNoAutomatic expiration in seconds. Omit for permanent storage.

Implementation Reference

  • The handler logic for 'agoragentic_memory_write' within the MCP server. It attempts to route through a marketplace 'Vault Memory Slots' capability, with a fallback to a direct API call.
    case "agoragentic_memory_write": {
        if (!API_KEY) {
            return { content: [{ type: "text", text: "Error: API key required." }] };
        }
        // Find the Memory Slots listing and invoke through marketplace
        const searchData = await apiCall("GET", "/api/capabilities?search=Vault+Memory+Slots&limit=1");
        const listings = Array.isArray(searchData) ? searchData : (searchData.capabilities || []);
        const memoryListing = listings.find(l => l.name === 'Vault Memory Slots');
    
        if (memoryListing) {
            const data = await apiCall("POST", `/api/invoke/${memoryListing.id}`, {
                input: {
                    key: args.key,
                    value: args.value,
                    namespace: args.namespace || 'default',
                    ttl_seconds: args.ttl_seconds
                }
            });
            return {
                content: [{
                    type: "text",
                    text: JSON.stringify({
                        status: data.status,
                        output: data.response?.output || data.response,
                        cost: data.cost,
                        balance_after: data.buyer_balance
                    }, null, 2)
                }]
            };
        }
    
        // Fallback: direct API call
        const data = await apiCall("POST", "/api/vault/memory", {
            input: {
                key: args.key,
                value: args.value,
                namespace: args.namespace || 'default',
                ttl_seconds: args.ttl_seconds
            }
        });
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • The tool definition and schema for 'agoragentic_memory_write' in the MCP server's tools list.
    {
        name: "agoragentic_memory_write",
        description: "Write a key value pair to your persistent agent memory. Survives across sessions, IDEs, and machines. Costs $0.10 per write via the marketplace.",
        annotations: { title: "Write Memory", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
        inputSchema: {
            type: "object",
            properties: {
                key: { type: "string", description: "Memory key identifier, maximum 256 characters" },
                value: { type: "string", description: "Value to store, maximum 64KB. Can be any string or serialized JSON." },
                namespace: { type: "string", default: "default", description: "Namespace to organize keys into logical groups" },
                ttl_seconds: { type: "number", description: "Automatic expiration in seconds. Omit for permanent storage." }
            },
            required: ["key", "value"]
        }
    },
Behavior4/5

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

Annotations already cover key behavioral traits (non-readOnly, openWorld, idempotent, non-destructive), but the description adds valuable context beyond this: it specifies that storage survives across sessions/IDEs/machines and mentions the cost ($0.10 per write via marketplace). This provides practical information not captured in annotations.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first defines the action and persistence scope, the second provides critical cost information. There's zero wasted verbiage.

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 tool's moderate complexity (write operation with 4 parameters), rich annotations, and 100% schema coverage, the description is mostly complete. It covers persistence scope and cost, which are crucial for agent decision-making. The main gap is lack of output information (no output schema), but this is partially compensated by the clear purpose statement.

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?

With 100% schema description coverage, the input schema already fully documents all 4 parameters (key, value, namespace, ttl_seconds). The description doesn't add any parameter-specific semantics beyond what's in the schema, so it meets the baseline expectation without extra value.

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 ('Write a key value pair') and resource ('your persistent agent memory'), distinguishing it from sibling tools like 'agoragentic_memory_read' (read vs. write). It explicitly mentions persistence across sessions, IDEs, and machines, which adds important context about the tool's scope.

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 provides clear context for when to use this tool (writing persistent memory) and implicitly contrasts with 'agoragentic_memory_read' for reading. However, it doesn't explicitly state when NOT to use it or mention alternatives like 'agoragentic_secret_store' for sensitive data, leaving some guidance gaps.

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/rhein1/agoragentic'

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