Skip to main content
Glama

save_hipocampo

Guarda un recuerdo en el Hipocampo (memoria_vectorial).

INSERT inmediato y NO bloqueante: el embedding se genera en background
(_finalize_save_bg) junto con dedup semántico, auto-link y auditoría de
contradicciones. Hasta que el embedding se backfillea (~segundos), la
memoria queda en tier WARM (embedding=NULL) y es recuperable por texto.

Si ya existe un recuerdo casi idéntico (trigram), se advierte y se omite
el guardado a menos que force=True. El dedup semántico (>0.9) corre en
background y solo loguea — no bloquea.

Args:
    content: Texto del recuerdo a guardar.
    memory_type: Tipo de memoria. Valores comunes:
                 "event" (evento/experiencia),
                 "decision" (decisión tomada),
                 "profile" (dato personal).
                 Por defecto: "event".
    code: Código o etiqueta corta para agrupar recuerdos (opcional).
          Ej: "documentacion", "bugfix", "feature", "setup".
    categories: Lista de categorías (opcional).
                Ej: ["python", "mcp", "infraestructura"].
    session_id: Opcional. Identificador de sesión para aislar memorias.
    force: Si True, guarda incluso si existe un recuerdo muy similar.
    auto_link: Si True, busca recuerdos semánticamente similares (>0.75)
               y crea enlaces "similar" automáticamente.
    nivel: Nivel de memoria jerárquica:
           "episodica" (default) — detalle completo, comprimible,
           "semantica" — conocimiento consolidado, protegido,
           "automatica" — regla permanente, nunca se comprime.
    critico: Si True, la memoria NUNCA se olvida ni se archiva.
             Protección de por vida independiente del nivel.
    snapshot_for: Si se proporciona un ID de regla inmunológica,
                  después de guardar se crea automáticamente un enlace
                  "part_of" desde este recuerdo hacia esa regla.
                  Esto permite que validate_immune_rule encuentre el
                  snapshot pre-cambio vinculado.
    autor: Procedencia del recuerdo (capa de fuente, 2026-10-17):
           "agente" (default; lo escribiste tú en una sesión),
           "usuario" (dictado o habla directa del usuario),
           "catalogo" (entrada generada al indexar archivos).
           Viaja en metadatos.autor y aparece como línea 🔖 en la
           búsqueda, para distinguir reencontrar de consultar.

Returns:
    Confirmación con el ID asignado.

Input Schema

NameRequiredDescriptionDefault
codeNo
autorNoagente
forceNo
nivelNoepisodica
contentYes
criticoNo
auto_linkNo
categoriesNo
session_idNo
memory_typeNoevent
snapshot_forNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / autor
      Added value: +{
      +  "default": "agente",
      +  "title": "Autor",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / snapshot_for
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Snapshot For"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: non-blocking insert, embedding generated in background via _finalize_save_bg, WARM tier with embedding=NULL until backfill, text-recalled in the interim, trigram warning-and-skip behavior, and semantic dedup (>0.9) that only logs. It also discloses permanence semantics (critico never archived, nivel compression rules) that no annotation could convey.

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?

Long but front-loaded and disciplined: the first lines carry the critical timing/tier behavior, then Args and Returns are clearly partitioned. Every sentence adds operational information, including the non-obvious snapshot_for mechanism, with no filler.

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 an 11-parameter mutation tool with mutation side effects but no annotations, this is complete: it explains what happens on write, timing/visibility of the memory, dedup behavior, protection levels, and side-effect links. An output schema exists, so the terse Returns line is sufficient.

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?

Schema description coverage is 0% across 11 parameters, so the description must compensate and it does — every parameter gets meaning, valid values and defaults (memory_type event/decision/profile, nivel episodica/semantica/automatica, autor agente/usuario/catalogo, snapshot_for's part_of linking to validate_immune_rule). This adds substantial meaning the bare schema cannot.

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?

'Guarda un recuerdo en el Hipocampo (memoria_vectorial)' states a precise verb and resource, and the surrounding detail (tiers, dedup, linking) makes it clearly distinct from siblings like update_hipocampo, delete_hipocampo and link_hipocampo. An agent can identify the tool's role without opening the schema.

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?

Provides rich conditional guidance: when a near-identical memory is skipped unless force=True, when dedup runs in background without blocking, and what auto_link/snapshot_for/nivel accomplish. It never explicitly names an alternative tool for updating an existing memory, so routing versus update_hipocampo is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources