Skip to main content
Glama

Import memories

import_memory

Import memories from a JSON array or a .json file inside data/exports/. Validates type, dedupes against existing memories, and never overwrites active memory blindly. Dry-run by default; pass apply=true to insert.

Instructions

Import memories from a JSON array or a .json file inside data/exports/. Validates type, dedupes against existing memories, and never overwrites active memory blindly. Dry-run by default; pass apply=true to insert.

Input Schema

NameRequiredDescriptionDefault
fileNoPath to a .json export file (must be inside data/exports/)
jsonNoInline JSON: an array of memory objects, or { memories: [...] }
applyNoActually insert memories (default false = dry run, just report)
userIdNoScope imported memories to a user (USER scope); overrides per-item userId
trustedNoTrusted import (default false). Auxiliary data (preferences/lessons/profile) is restored only when true; per-item trusted flags are ignored

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.3.5
    • addedInput schema / properties / file / maxLength
      Added value: +500
    • addedInput schema / properties / json / maxLength
      Added value: +8388608
    • addedInput schema / properties / trusted
      Added value: +{
      +  "description": "Trusted import (default false). Auxiliary data (preferences/lessons/profile) is restored only when true; per-item trusted flags are ignored",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / userId / description
      Previous value: -"Scope imported memories to a user (USER scope)"New value: +"Scope imported memories to a user (USER scope); overrides per-item userId"
  2. First observedv2.2.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses validation, dedupe against existing memories, a non-blind overwrite policy, a safe dry-run default, and the explicit opt-in required to write. It stops short of describing the dry-run report contents, partial-failure/rollback behavior, or permission requirements.

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?

Two compact sentences, front-loaded with the input sources and then the safety/default behavior; nothing is filler. 'Never overwrites active memory blindly' is the one phrase that is a bit fuzzy rather than precise.

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?

For a 5-param, zero-required mutation tool with no annotations and no output schema, the description covers the two things that matter most: safety default and dedupe behavior. It leaves a gap around what the dry-run result reports back and whether file and json are mutually exclusive or combined.

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% and every parameter already has a descriptive string, so the schema does the heavy lifting. The description's 'apply=true' note merely restates the apply parameter, and userId, trusted (and the auxiliary-data restoration rule) are left entirely to the schema.

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?

The description names a specific verb and resource (import memories) plus the two accepted input sources (JSON array or a .json file inside data/exports/), which is concrete enough to act on. It does not distinguish itself from siblings like export_memory, extract_memories, or remember, so the agent gets no routing signal between them.

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?

'Dry-run by default; pass apply=true to insert' is real operational guidance for choosing the safe mode first. However there is no statement of when to prefer this tool over remember/extract_memories, no prerequisites, and no guidance on choosing file vs inline json.

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