Skip to main content
Glama
Open Agent Memory

Open Agent Memory

Add an OAM document Resource

memory_add_document

Retain a text document or HTTPS HTML/PDF/image original as a searchable OAM Resource with replace or append updates, keeping sources as evidence rather than learned facts.

Instructions

Retain a text document or an HTTPS HTML/PDF/image original as a searchable OAM Resource. Resources remain evidence and do not become learned facts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_id": "<document_id>",
      "update_mode": "<update_mode>"
    },
    "name": "memory_add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoHTTPS URL of an HTML, PDF, PNG, or JPEG original.
textNoText document body.
media_typeNoRequired with url; must match the fetched original.
document_idYesStable document identifier within this OAM user.
update_modeYesReplace the document body or append text to an existing text document.
idempotency_keyNoHeader-safe key, 1-200 characters from A-Z, a-z, 0-9, dot, underscore, colon, or hyphen. Reuse it when retrying this exact write; omit to generate a new key.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only but non-destructive, closed-world write, so the description need only add context. It usefully clarifies the evidence-vs-fact semantics and that the Resource is searchable, but is silent on what 'replace' does to the existing body, size limits, or fetch-failure behavior — and the HTTPS retrieval it describes sits uneasily with openWorldHint=false.

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?

Two sentences, zero filler, with the core action and its scope front-loaded before the evidence-vs-fact caveat. Nothing is redundant or buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 params at full schema coverage and no output schema, the description covers the conceptual model but omits the practical edges: which identifier is returned, how append behaves on a non-text document, and any limits on document size or URL fetching. Adequate to start a call, not fully sufficient for tricky inputs.

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?

Schema coverage is 100%, so every parameter including media_type, update_mode, and idempotency_key is already documented in the schema; baseline is 3. The description adds only the mild signal that text and URL are alternative input forms, which the schema already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Retain') and resource ('a text document or an HTTPS HTML/PDF/image original as a searchable OAM Resource'), and the second sentence draws a conceptual line between stored evidence and learned facts, which implicitly separates it from memory_add. It does not name the sibling it is not, so the differentiation is inferential rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Resources remain evidence and do not become learned facts' clause implies when to use it (raw source material rather than extracted knowledge), but there is no explicit when-to-use statement, no mention of the alternative to pick when the agent wants a fact, and no prerequisites such as needing an HTTPS-reachable original.

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