hipocampo
Hipocampo is a dual-memory persistence system for AI agents enabling cross-session learning, user profiling, and intelligent memory management.
Memory Operations
Save technical memories (
save_hipocampo): Persist technical records, decisions, events, or errors with auto-generated embeddings, optional tags, and categories.Save profile data (
profile_hipocampo): Store personal user data such as preferences, biographical info, and lifestyle details.Search memories (
search_hipocampo,quick_hipocampo_search): Perform hybrid semantic + lexical search across both technical and user profile memory stores.
Self-Diagnosis & Auto-Repair
Health check (
hipocampo_health): Verify the status of PostgreSQL, NVIDIA API, disk space, required tables, and extensions.Auto-repair (
hipocampo_auto_repair): Automatically fix detected issues such as restarting PostgreSQL, creating missing tables, or configuring API keys.
Performance Optimization
View stats (
hipocampo_stats): Analyze query latency, search methods used, average scores, and receive optimization recommendations.Auto-tune (
hipocampo_tune): Automatically adjust BIRE/SSC thresholds and hybrid weights based on accumulated performance metrics.
Memory Maintenance
Deduplication (
hipocampo_dedup): Detect and optionally merge duplicate memories using exact and semantic (cosine similarity) matching.Checkpointing (
hipocampo_checkpoint): Compress old memories using logarithmic checkpointing, with a dry-run option before committing.Full maintenance cycle (
hipocampo_maintenance): Run a complete pipeline — health check → auto-repair → deduplication → checkpointing → auto-tuning — in a single call.
Leverages Hugging Face's Inference API to generate embeddings for semantic search, enabling vector-based memory retrieval without local model hosting.
Utilizes NVIDIA's embedding API (nvidia/nv-embedqa-e5-v5) to create high-dimensional vector embeddings for accurate semantic search across memories.
Employs PostgreSQL 17 with pgvector and pg_trgm extensions as the primary database, providing hybrid vector and trigram search for memory storage and retrieval.
title: Hipocampo MCP emoji: 🧠 colorFrom: blue colorTo: purple sdk: docker pinned: false

⚠️ Transport Note: SSE transport is deprecated since MCP spec 2025-03-26. Hipocampo now uses Streamable HTTP (single endpoint
/mcp) as the recommended remote transport. SSE (/sse) remains available for backward compatibility but will be removed in a future release.
Related MCP server: knowledge-rag
🌐 MCP Server — Live on Hugging Face
Hipocampo runs as a free MCP server on Hugging Face Spaces. Connect from any MCP client:
URL: https://alexbell1-hipocampo-mcp.hf.space/mcp🧪 Interactive Playground: Try saving and searching memories from your browser at https://alexbell1-hipocampo-mcp.hf.space/ — no registration or MCP client needed.
⚠️ Important: The Hugging Face free tier is ephemeral — data is lost on restart/deploy. This instance is intended for testing only. For persistent storage, run Hipocampo locally (see Quick Start) or connect an external database (Neon, Supabase, etc.).
{
"mcpServers": {
"hipocampo": {
"url": "https://alexbell1-hipocampo-mcp.hf.space/mcp",
"type": "streamable-http"
}
}
}Embedding model: sentence-transformers/all-MiniLM-L6-v2 (384 dims) via Hugging Face Inference API (free, no credit card required).
⚡ Instalación Zero-Touch — Auto-Installer v6.0
Una sola línea. La terminal hace todo: PostgreSQL + pgvector, embeddings, base de datos, venv, clientes MCP, servicio systemd con timer de mantenimiento automático.
🪟 ¿Usas Windows?
install.shes un script de Linux/macOS. En Windows necesitas WSL2 (Windows Subsystem for Linux):wsl --installAbre la terminal de WSL (Ubuntu), actualiza los paquetes y vuelve a ejecutar el instalador:
sudo apt update && sudo apt install -y python3-venv python3-pip build-essential curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bash⚠️ En Windows puro (CMD/PowerShell) el instalador NO funciona. Sin WSL2 verás errores como
Package 'python3-venv' has no installation candidateoapt: command not found.
🚀 Instalar en 10 segundos
curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bashMáquinas sin interacción (VPS, contenedores):
curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bash -s -- --unattended🔄 Las 8 fases automáticas
Fase | Qué instala | 🕐 |
① | Diagnóstico: OS, gestor de paquetes, RAM, disco | ~2s |
② | PostgreSQL 17 + pgvector (apt · dnf · pacman · brew) | ~15s |
③ | Base de datos + esquema: 10 tablas, HNSW + GIN, ownership | ~3s |
④ | Embeddings: Ollama local ( | ~60s |
⑤ | Python | ~10s |
⑥ | Clientes MCP: OpenCode · Claude · Gemini/Antigravity · Cursor · VS Code · Windsurf | ~2s |
⑦ | Servicio | ~1s |
⑧ | Autodiagnóstico: health · save · search · cleanup | ~3s |
🛡️ Características del instalador
✅ Idempotente | Vuelve a ejecutarlo sin miedo — repara ownership, actualiza repo y configs |
✅ 6 clientes MCP | OpenCode, Claude, Gemini/Antigravity, Cursor, VS Code, Windsurf |
✅ Mantenimiento automático | Timer semanal (domingo 03:00) con |
✅ Sin root | Todo en |
✅ Opciones |
|
✅ Desinstalación limpia |
|
✅ Compilación desde fuente | Fallback si el paquete pgvector no está en el repositorio |
Hipocampo is an advanced dual-memory persistence architecture designed for autonomous AI agents. By maintaining both technical knowledge and user profiling data across sessions, Hipocampo provides a reliable, stateful context that enables agents to learn, adapt, and scale efficiently.
Built on top of PostgreSQL 17 with pgvector, it features BIRE v3.7 — a hybrid retrieval engine combining semantic embeddings (1024d), lexical expansion, and GIN trigram search with dynamic score fusion. Also includes Sparse Selective Caching (SSC) as an experimental pipeline.
💡 Why Prompt Compression?
Hipocampo already reduces context through SSC (selective retrieval). But even the top-5 most relevant memories can consume 500-2000+ tokens when concatenated — a significant portion of any LLM's context window.
Hybrid compression adds a second reduction layer:
Extractive phase: Removes redundant sentences (filtering by keyword relevance to your query). Reduces generic text by 30-50% instantly, with no API calls.
LLM phase: Summarizes technical/code content using the configured embedding endpoint (Ollama local or NVIDIA NIM). Preserves all code, variable names, and syntax while dropping explanatory verbosity.
Combined: 20-50% token reduction with near-zero quality loss. A 1500-token memory block becomes 750-1200 tokens — that's real savings on every LLM call.
Real impact: If you call compress_hipocampo before every search_hipocampo → LLM round-trip, you save 200-800 tokens per interaction. At scale (hundreds of queries), this translates to meaningful cost reduction and faster responses.
🚀 Key Features
Dual-Memory Architecture: Distinct storage layers for technical records (
memoria_vectorial) and user profile data (memory_items), each utilizing 1024-dimensional embeddings.BIRE v3.7 (default): Hybrid search engine combining local embeddings (1024d, Ollama
qwen3-embedding:0.6bby default), query expansion, GIN trigram, and composite scoring — used by all MCP tools.SSC (experimental): Alternative four-phase progressive pipeline: Tag Router → pgvector Top-K → GIN Trigram → ILIKE Fallback.
Logarithmic Checkpointing: Intelligently compresses historical memories based on time decay, shrinking 24-hour granular details into unified 90-day checkpoints.
Automated Tagging Engine: A robust, Regex-based rule engine that autonomously categorizes and tags records upon persistence.
Cross-System Vector Search: Unified semantic search across over 1,100 records for deep cross-referencing.
Hybrid Prompt Compression (v4.0): Two-phase compression pipeline — extractive (sentence-level) for generic text and LLM summarization (via configured embedding endpoint) for technical/code content. Reduces prompt tokens by 20-50% while preserving critical information. Available as
compress_hipocampoMCP tool.Memory Graph (v4.0): Directed graph of semantic relationships between memories. Link related records, navigate with BFS tree, find shortest paths. Available as
link_hipocampo,graph_hipocampo,path_hipocampoMCP tools.Memory Hierarchy with Trigger-Based Prevention (v4.1): 🧠🧠 Three-level memory (episodic → semantic → automatic) inspired by human mnemonic consolidation. NEW: Tag memories with contextual triggers (
trigger:php,trigger:chartjs,trigger:tomcat) — when the agent starts working in that context, it searches for matchingautomaticarules and reactivates past errors before making the same mistake. This mirrors the biological hippocampus: a partial cue (project + language) triggers full memory retrieval of the error and its solution. Automatic rules are permanent — never compressed, never deleted.set_nivel_hipocampo(id, nivel)+consolidate_hipocampotools included.Code Immune System — Regression Protection (v4.2): 🛡️ Prevents agents from breaking code that was working. 3-step cycle: (1) Snapshot functional state before editing, (2) Verify after editing, (3) If something broke → create a permanent
automaticarule capturing the exact cause, symptom, and fix. Uses immune economy: pre-change snapshots are cheapepisodica(auto-compressed if no damage), post-break rules are permanentautomatica. Pre-loaded with fragile file catalog — header.php, conexion.php, utils.php, auth.php, etc. Agents searchtrigger:regression trigger:<file>before every edit to learn what other agents broke before.Code RAG (v4.0): Index project source code (PHP, JS, TS, Python, SQL) as semantic embeddings. Search with
search_code(query, language)— returns real code snippets with file paths and line numbers, not just summaries.Exponential Time Decay (v4.0):
final_score = relevance × exp(-λ × days)with λ=0.05 configurable and 20% floor. Recent knowledge naturally outranks old memories.MMR Diversity Anti-Cluster (v4.3): Maximum Marginal Relevance post-fusion re-ranking prevents dense embedding clusters from monopolizing search results. Iteratively selects results that balance relevance with diversity:
diversity_lambda × relevance - (1-diversity_lambda) × max_similarity_to_selected. Configurable inhipocampo_hybrid_config.json.Active Forgetting with Archive Tiers (v5.0):
decay_hipocamponow archives oldepisodicamemories tomemoria_historica(cold storage) when they exceed age thresholds. Protected levels:automatica,semantica,critico— never archived. Newcriticoparameter onsave_hipocampofor mission-critical memories.restaurar_historica(id)restores cold memories back to active tier.Memory Fatigue Boost (v5.0): New
memory_accesstable tracks per-record access frequency. BIRE search applies a fatigue boost:boost = min(15, 5·log1p(accesses_7d))·e^(-age_hours/168). Frequently accessed memories naturally rank higher — mimicking how the human brain strengthens neural pathways through repeated recall.Memory Budget & Tiering (v5.0):
hipocampo_budget(dry_run)manages three storage tiers — HOT (embedding present, full semantic search), WARM (embedding=NULL, text-only search), COLD (memoria_historicaarchive). Hot tier cap: 5000 records. When the cap is exceeded, oldest episodica memories are automatically demoted to WARM.restaurar_historica(id)restores any cold memory back to active.Contradiction Detection (v5.0):
save_hipocamporuns_detectar_contradicciones()using negation-probe embeddings to detect factual contradictions with existing memories. When detected: logs a warning and creates acontradictslink — never blocks the save.contradicciones_hipocampo(id)performs on-demand contradiction audits across the memory graph.File Watcher with Systemd (v5.0):
hipocampo_watch.pywatches configured directories for file changes and auto-reindexes modified files viaindex_project. Managed byhipocampo-watch.timer(10-minute interval). MCP tools:list_watch_dirs,add_watch_dir(path, patterns),remove_watch_dir(path),reindex_now(path?).Link Weight Decay (v4.3): Exponential weight decay on memory graph links (half-life 90 days). Links that aren't traversed lose strength over time; links <0.01 are pruned.
graph_hipocampo()andpath_hipocampo()auto-reinforce traversed links. Newdecay_hipocampo(dry_run)tool for graph maintenance. Columns:last_accessed,reinforced_at.Preservación de Conocimiento Latente (v4.3): 🧠 4 capas automáticas protegen el conocimiento del oficio: categorización
trade_knowledge(nunca se decae), clasificación automática de reusabilidad (high→promoción a semántica), perfiles de decaimiento por dominio (infra 180d, proyecto 90d, temporal 14d), y recordatorio trimestral conreview_trade_knowledge(). 266 memorias clasificadas en migración automática.Session Memory & Auto-Summarization: Session-isolated save/search. After 20+ saves, Hipocampo auto-generates a consolidated session summary in the background.
Proactive Context Preloading:
preload_context(project_path)extracts meaningful keywords from the project path, searches relevant memories, and returns a compressed summary — ideal for session start.Context Budget Awareness:
compress_hipocampoauto-estimates token budget and adjusts k dynamically.budget_ratioparameter gives fine-grained control over output size.Auto-Linking:
save_hipocampo(..., auto_link=True)auto-discovers semantically similar memories (>0.75 cosine) and createssimilaredges in the memory graph.HNSW Auto-Recovery:
hipocampo_health()checks the HNSW index on startup and auto-creates it if missing — no more manualCREATE INDEXcommands.Model Context Protocol (MCP): Native integration via a FastMCP server with 39 tools, exposing seamless read/write capabilities to modern MCP clients (e.g., Claude Desktop, OpenCode).
⚡ Why PostgreSQL + pgvector (Not SQLite)?
You might wonder why Hipocampo uses PostgreSQL 17 with pgvector instead of a lighter stack like SQLite. The answer: hybrid search requires more than vector similarity alone.
Hipocampo's retrieval pipeline combines pgvector (HNSW) for semantic search, pg_trgm (GIN) for lexical expansion, and ILIKE for fallback — fused into a single weighted score. SQLite extensions like sqlite-vec offer vector search, but lack:
GIN trigram indexes for fuzzy/partial matching
Full-text + vector hybrid fusion in a single query
Production-grade HNSW indexing with concurrent writes
pg_trgm-based query expansion when embeddings alone are insufficient
With ~1,100+ records across two memory tables and growing, Hipocampo needs a database that scales without sacrificing retrieval quality. PostgreSQL + pgvector isn't "heavy" for the sake of it — it's the minimum viable stack to deliver the hybrid accuracy that BIRE and SSC require.
🎯 Use Cases
Error → Learn → Never Repeat (AI Agent Learning Loop)
Hipocampo enables AI agents to learn from mistakes across sessions using a simple cycle:
┌─ 1. SEARCH ─────────────────────────────┐
│ Before executing a command, the agent │
│ searches Hipocampo for similar errors: │
│ search_hipocampo("error <context>") │
└───────────────────┬──────────────────────┘
│
┌─ 2. EXECUTE ──────▼──────────────────────┐
│ If match found → apply known solution │
│ If not → attempt new approach │
└───────────────────┬──────────────────────┘
│
┌─ 3. EVALUATE ─────▼──────────────────────┐
│ Did it fail? Capture: │
│ - error context & exit code │
│ - what was attempted │
│ - what happened │
└───────────────────┬──────────────────────┘
│
┌─ 4. PERSIST ──────▼──────────────────────┐
│ save_hipocampo( │
│ content="Error X: tried Y, result Z", │
│ memory_type="decision", │
│ code="error_<hash>", │
│ categories=["bugfix", "<tool>"] │
│ ) │
└──────────────────────────────────────────┘Real example: An agent tries flatpak install npm and fails. It saves the error to Hipocampo: "npm is a Node.js package manager, not a Flatpak package. Use npm directly." Next time the same command is attempted, the agent finds this record and knows the solution immediately — without repeating the mistake.
Over time, the agent's error knowledge base grows organically. Each failure makes future sessions smarter. This turns Hipocampo from a simple archive into a continuous learning system for AI agents.
🧠 Context-Aware Error Prevention (NEW v4.1) — Proactive, not Reactive
Going beyond reactive learning, Hipocampo v4.1 introduces trigger-based automatic rules that fire before the agent writes a single line of code:
┌─ 1. DETECT CONTEXT ───────────────────────────────┐
│ Agent is about to edit a PHP file in SGV.pro: │
│ File: analisis_visual.php │
│ Library: Chart.js │
│ Language: PHP │
└────────────────────┬───────────────────────────────┘
│
┌─ 2. SEARCH TRIGGERS ───▼───────────────────────────┐
│ search_hipocampo("trigger:sgv trigger:chartjs │
│ trigger:php trigger:json_encode")│
└────────────────────┬───────────────────────────────┘
│
┌─ 3. REACTIVATE RULES ─▼────────────────────────────┐
│ REGLA AUTOMÁTICA FOUND (score 31.0): │
│ "NUNCA usar variables JS (C.red, C.primary) │
│ dentro de <?= json_encode() ?> en PHP. │
│ PHP las evalúa como constantes → Fatal Error." │
│ Solución: usar literales #ef4444 / #408AEC │
└────────────────────┬───────────────────────────────┘
│
┌─ 4. ACT WITH CONSTRAINT ─▼─────────────────────────┐
│ Agent generates code using color literals instead │
│ of JS variables. Error avoided BEFORE it happens. │
└────────────────────────────────────────────────────┘How to implement:
# 1. When saving an error, tag it with contextual triggers and elevate to automatica
save_hipocampo(
content="NUNCA usar variables JS en json_encode() PHP. Usar literales de color.",
memory_type="decision",
categories=["trigger:sgv", "trigger:chartjs", "trigger:php", "trigger:json_encode"],
nivel="automatica"
)
# 2. Before editing code in any project, search matching triggers
search_hipocampo("trigger:<project> trigger:<language> trigger:<tech>")
# 3. Automatic rules surface → agent applies them preventivelyThis mirrors the biological hippocampus: a partial cue triggers full memory retrieval — the brain doesn't wait for the error to happen before remembering it hurts.
🛡️ Regression Protection — Code Immune System (NEW v4.2)
Sometimes the agent breaks code that was working fine — not repeating an old error, but creating a new one. Hipocampo v4.2 implements a 3-step immune cycle that mirrors how the body generates antibodies:
┌─ 1. SNAPSHOT ──────────────────────────────────┐
│ Before editing header.php, save what works: │
│ "header.php depends on session_start(). │
│ Verify: open dashboard.php, must load OK." │
│ Cost: episodica (cheap, auto-compressed) │
└───────────────────┬─────────────────────────────┘
│
┌─ 2. VERIFY ───────▼─────────────────────────────┐
│ After editing, run the snapshot verification: │
│ - Dashboard loads OK → no cost, snapshot fades │
│ - HTTP 500 on all pages → immune response! │
└───────────────────┬─────────────────────────────┘
│
┌─ 3. IMMUNIZE ─────▼─────────────────────────────┐
│ Save permanent automatica rule: │
│ "Editing header.php: removed session_start(), │
│ broke 40+ pages. Fix: restore session_start() │
│ at top of file. NEVER touch this line." │
│ Cost: automatica (permanent, never compressed) │
└─────────────────────────────────────────────────┘Fragile file catalog (pre-loaded): header.php, conexion.php, utils.php, auth.php, db_connection.php — these files have cascading dependencies. One wrong edit breaks dozens of pages. Hipocampo ships with fragile file rules so agents know what to handle with care.
Before every edit: search_hipocampo("trigger:regression trigger:<file> trigger:<project>") — learn what other agents broke on this file before you touch it.
⚙️ How to configure your agent
To enable this behavior, you need to instruct your agent to use the cycle above. This is done by adding instructions to the agent's configuration file, depending on the client:
Agent | Configuration file | Example |
OpenCode |
| |
Claude Code |
| Similar approach |
Cursor |
| Add instructions in plain text |
Windsurf |
| Same structure |
Cline |
| Same structure |
Minimal example for AGENTS.md / CLAUDE.md:
## Error Learning Cycle
1. Before running any command, search: `search_hipocampo("error <command> <context>")`
2. If a similar error is found, apply the documented solution and skip the failing attempt
3. If the command fails (exit code != 0, timeout, "error"/"failed" in output):
- Save to Hipocampo: `save_hipocampo(content="Error: {stderr[:500]}. Attempt: {what was tried}. Result: {what happened}.", memory_type="decision", code="error_<hash>", categories=["bugfix", "<language/tool>"])`💡 Tip: For MCP-native agents (OpenCode, Claude Code), Hipocampo tools are available directly. For others, use the HTTP endpoint or CLI scripts.
🖥️ Display Truncation — OpenCode & Large Results
BIRE search results can be large (especially after increasing the per-result display limit to 8000 characters). OpenCode clients truncate tool output by default at 2000 lines / 51 KB. You'll see ...N bytes truncated... at the bottom when this happens. The full output is saved to a file for later reading, but to avoid truncation entirely, add to your opencode.json or ~/.config/opencode/opencode.jsonc:
{
"tool_output": {
"max_lines": 5000,
"max_bytes": 256000
}
}Restart OpenCode for the change to take effect.
📄 Want your agent to use ALL of Hipocampo? Append AGENTS_TEMPLATE.md sections into your AGENTS.md / CLAUDE.md / .cursorrules — safe to share, no credentials.
Other use cases
Persistent user profile: Remember preferences, configs, and personal data across sessions
Project state tracking: Keep context on ongoing projects, decisions made, and pending tasks
Cross-session knowledge: Build on previous work without repeating context
🛠️ Quick Start
💡 ¡Recomendado! En vez de seguir los pasos manuales, ejecuta el instalador automático:
curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bashEl instalador configura PostgreSQL + pgvector, embeddings, base de datos, venv, clientes MCP y el timer de mantenimiento. Ver Auto-Installer v6.0 para más detalles.
Prerequisites
SO: Ubuntu 22.04+, Debian 12+, Fedora 39+, Arch Linux, macOS (Homebrew) o Windows vía WSL2
PostgreSQL 17+ (with
pgvectorandpg_trgmextensions enabled)Python 3.13+
Ollama (default, local) — or NVIDIA API Key (for NVIDIA NIM cloud embeddings)
Installation
# 1. Clone the repository
git clone https://github.com/carrasquelalex1/hipocampo.git
cd hipocampo
# 2. Setup the PostgreSQL Database
createdb hipocampo_db
psql -d hipocampo_db -c "CREATE EXTENSION vector; CREATE EXTENSION pg_trgm;"
psql -d hipocampo_db -f esquema.sql
# 3. Initialize Python Environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# 4. Environment Configuration
cp .env.example .env
# Edit .env with your DB_HOST, DB_USER, and EMBED_BASE_URL/EMBED_MODEL (defaults to Ollama local)Basic Usage
Hipocampo provides specialized scripts to interact with the core engine:
# Perform a search using BIRE v3.7 (modern, recommended)
python3 scripts/hipocampo_search.py "query term"
# Perform a search using SSC v1.0 (experimental, legacy)
python3 scripts/hipocampo_ssc_search.py "query term"
# Compress older memories using Logarithmic Checkpointing
python3 scripts/hipocampo_checkpoint.py --dry-run
python3 scripts/hipocampo_checkpoint.py --force
# Hybrid prompt compression (extractive + LLM)
python3 scripts/hipocampo_compress.py "your query" --k 5 --method hybrid
python3 scripts/hipocampo_compress.py "your query" --method extractive # fastest, no API cost🧠 System Architecture
The core of Hipocampo is backed by a relational and vector hybrid design:
hipocampo_db (PostgreSQL 17 + pgvector + pg_trgm)
├── memoria_vectorial (Technical Knowledge)
│ ├── Columns: contenido (text), metadatos (jsonb), embedding (vector 1024d)
│ └── Indexes: HNSW (cosine similarity, 1024d), GIN (trigram)
├── memory_items (User Profile & Events)
│ ├── Columns: memory_type (profile|event|decision), summary, embedding, extra
│ └── Indexes: HNSW (cosine similarity, 1024d), GIN (trigram)
├── memory_categories (Classification Taxonomy)
├── category_items (M:N Mapping)
└── resources (Referenced Assets & URLs)BIRE v3.7 — Hybrid Search Engine
BIRE (Búsqueda Integrada por Relevancia Expansiva) is the default search engine used by all MCP tools. It combines vector and lexical search with dynamic score fusion:
Query Expansion — Expands terms using synonyms and stemming before search.
Vector Search — Embeddings (1024d) cosine similarity across both tables (Ollama local by default).
GIN Trigram — Lexical expansion when vector confidence is low.
Composite Scoring — Weighted fusion of vector + lexical scores with adaptive cutoff.
An SSC (Sparse Selective Caching) pipeline is also available as an experimental alternative:
Phase 1: Tag Router – Classifies the query intent (profile vs. technical) and dynamically assigns weights.
Phase 2: PGVector Top-K – Semantic search across both tables. Execution halts here if confidence ≥ 70%.
Phase 3: GIN Trigram – Lexical expansion via Trigram indexing if semantic confidence is < 70%.
Phase 4: ILIKE Scan – Final fallback full-table scan triggered only if confidence falls < 40%.
🔌 MCP Server Integration
Hipocampo includes a fully functional FastMCP server, allowing LLM agents to autonomously read and write memories.
Available MCP Tools (39 tools)
Memory Operations:
search_hipocampo(query, session_id?): Unified semantic and lexical search (auto-records metrics). Optionally filter by session.quick_hipocampo_search(query): Shorthand alias for rapid queries.preload_context(project_path, k=8): Extract keywords from project path, search relevant memories, return compressed summary. Ideal for session initialization.compress_hipocampo(query, k=5, method="hybrid", budget_ratio=1.0, include_metadata=False): Search + hybrid compression with context budget awareness. Auto-estimates tokens and adjusts k dynamically. Three methods:"hybrid"(recommended),"extractive"(fastest, no API cost),"llm"(highest quality).save_hipocampo(content, memory_type, code, categories, session_id?, force?, auto_link=False, nivel="episodica"): Persist data intomemoria_vectorial. Supports session isolation, auto-dedup, auto-linking, and hierarchical memory levels.profile_hipocampo(summary, extra, categories): Store personal or event-driven user data (memory_items).save_hipocamponow supportscritico=Trueparameter to protect mission-critical memories from decay and archiving.
Memory Graph (v4.0):
link_hipocampo(source_id, target_id, relation_type, weight): Create a directed edge between two memories. Relation types:related,follow_up,part_of,references,similar,chain.unlink_hipocampo(id / source+target+type): Remove edge(s) from the memory graph.graph_hipocampo(node_id, depth=2): BFS tree traversal from a root node. Usenode_id=0for an overview of all connected nodes and edge counts.path_hipocampo(from_id, to_id, max_depth=5): Find the shortest BFS path between two memories.
Code RAG (v4.0):
index_project(project_path, force=False): Scan and index source code files as semantic embeddings. Incremental — only re-indexes changed files (by mtime). Supports PHP, JS, TS, Python, SQL, HTML, CSS, JSON, YAML.search_code(query, k=5, language=""): Vector search specifically in indexed code snippets. Returns real code with file paths, language, and line numbers.
CRUD Operations:
update_hipocampo(id, content?, memory_type?, code?, categories?): Update an existing memory. Regenerates embedding if content changes.delete_hipocampo(id): Permanently delete a memory by ID.set_nivel_hipocampo(id, nivel): Promote/demote a memory between hierarchical levels (episodica,semantica,automatica).consolidate_hipocampo(min_age_days=7, dry_run=True): Migrate old episodic memories to semantic level with optional content compression.
Self-Diagnosis & Auto-Repair:
hipocampo_health(): Full system health check (PostgreSQL, embedding API, disk, extensions, HNSW index).hipocampo_auto_repair(): Automatically repairs detected issues (restart PostgreSQL, create missing tables, create HNSW index).
Performance Optimization (Fase 2):
hipocampo_stats(): Query performance metrics, latency analysis, and optimization recommendations.hipocampo_tune(): Auto-adjusts BIRE/SSC thresholds and hybrid weights based on real usage data.
Memory Maintenance (Fase 3):
hipocampo_dedup(merge): Detects and merges duplicate memories (exact + semantic via cosine similarity).hipocampo_checkpoint(dry_run): Logarithmic checkpointing to compress old memories.hipocampo_maintenance(): Full maintenance cycle (repair → dedup → checkpoint → tune).
Time Decay:
Scores of memories >7 days old automatically decay ~5% per week (floor at 30%), keeping recent knowledge at the top.
Active Forgetting & Tiering (v5.0):
decay_hipocampo(dry_run=True): Extended to archive oldepisodicamemories tomemoria_historica(cold storage). Protected:automatica,semantica,critico. Dry run shows what would be archived.hipocampo_budget(dry_run=True): Shows memory distribution across HOT/WARM/COLD tiers. Hot cap: 5000. When exceeded, oldest episodica are auto-demoted.restaurar_historica(id): Restore a cold memory frommemoria_historicaback to activememoria_vectorial.contradicciones_hipocampo(id=None): On-demand contradiction audit. With ID: checks one memory. Without: scans all memories for contradictions.
Trade Knowledge Preservation (v4.3):
review_trade_knowledge(dry_run=True): Listsinfrastructurememories approaching their decay limit (>150 days). Use to manually reinforce trade knowledge before it auto-decays.list_trade_knowledge(): Lists all memories tagged astrade_knowledge=truewith their reusability and domain profile.
File Watcher (v5.0):
list_watch_dirs(): List all directories being watched for auto-reindexing.add_watch_dir(path, patterns=["*.php","*.py","*.js"]): Add a directory to the watch list.remove_watch_dir(path): Remove a directory from the watch list.reindex_now(path=None): Trigger immediate reindex of watched files (or all if no path given).
Webhook Watches:
watch_hipocampo(pattern, webhook_url): Register a webhook that fires on save/update/delete events matching a text pattern.unwatch_hipocampo(id): Remove a registered webhook.list_watches(): List all registered webhooks and their targets.
Starting the Server
# Standard I/O mode (default for local desktop clients)
python3 scripts/hipocampo_mcp_server.py
# Streamable HTTP mode (recommended for remote clients)
python3 scripts/hipocampo_mcp_server.py --http 8001
# Legacy SSE mode (deprecated, only for backward compatibility)
python3 scripts/hipocampo_mcp_server.py --sse 8001For advanced configuration, please refer to the MCP Server Guide.
Modular Architecture
DB connection, config loading, and embedding generation are centralized in the hipocampo package:
hipocampo/
├── __init__.py # Package init (version 6.0.0)
└── db.py # get_conn(), get_embedding(), load_config()All scripts in scripts/ import from hipocampo.db instead of duplicating the boilerplate. The MCP server also imports search/health/stats/dedup/checkpoint functions directly — no subprocess calls.
Before: Each MCP search spawned subprocess.run() → fork Python interpreter → re-import everything → connect DB → generate embedding → run query → parse stdout. That's ~200–500ms of process + serialization overhead alone.
After: Direct function call within the same process. The DB connection pool, OpenAI client, and modules are already cached. Overhead drops to microseconds.
For individual searches the difference is marginal (~200ms), but for hipocampo_maintenance() it previously ran 4 serial subprocess forks — now it's one direct call per phase, saving ~1–2 seconds.
Async & Connection Pool (v3.8)
The MCP server now runs all 16 tools as async Python coroutines in HTTP mode, and uses a PostgreSQL connection pool instead of creating a new connection per call:
Before:
Each MCP tool opened a new TCP + SSL connection to PostgreSQL →
connect()latency on every callSync tools blocked uvicorn's event loop → one slow
searchfroze the server for all concurrent clientsIn HTTP mode with concurrent requests: risk of
too many connectionson the database
After:
init_pool(minconn=1, maxconn=10)creates aThreadedConnectionPoolat server startup — connections are reused across calls, handshake happens onceAll 16 tools are
async def— blocking I/O (DB queries, embedding API) runs inasyncio.to_thread(), freeing the event loop for other requestsA thin
_PooledConnectionproxy transparently returns connections to the pool when.close()is called — zero caller-side changes
Impact: Concurrent requests no longer block each other; PostgreSQL connection overhead drops from ~10–50ms per call to near zero.
Integration Tests:
6 schema tests verify tool registration, annotations, parameters, and async signature — no database required, run in CI
3 live integration tests (marked
@pytest.mark.integration) start the server in stdio mode and verify tools/list, resources/list, and a real search call102 total tests, all passing
Config Validation, Rate Limiting & Granular Errors (v3.8)
Before:
Missing
DB_HOSTor embedding config → server started without errors, failed with crypticfe_sendauth/401on the first queryAny client could hammer the embedding API and the free-tier PostgreSQL — no limits at all
Every error caught with
except Exception: logger.error("msg: %s", e)— no traceback, impossible to tell if it was a DB, network, or validation failure
After:
validate_config()runs at startup and logs clear warnings for each missing variable.init_pool()andget_conn()reject early with messages like "PostgreSQL connection incomplete: DB_HOST, DB_USER not configured in .env"Three sliding-window rate limiters protect the system:
embedding_limiter(30/min — shields embedding API cost),tool_limiter(60/min — shields PostgreSQL),watch_limiter(20/min). Clients get "⏳ Too many requests. Limit: 30 per 60s. Wait 12s."_tool_err()helper differentiates by exception type:psycopg2.Error→logger.exception()with full traceback,ValueError/TypeError→logger.warning()(client error), others →logger.exception()._fire_webhookscatchesurllib.error.URLErrorseparately
Impact: Failures are caught before they reach the database, costs are capped, and logs are actionable — you know instantly if it's a misconfiguration, a network blip, or a code bug.
Retry with Backoff, Consistent CLI & Pre-commit Hooks (v3.8)
Before:
get_embedding()failed on the first embedding API timeout or rate limit — no retry at allAll 12 scripts used manual
sys.argvparsing — no--help, no type validation, inconsistent interfacesNo pre-commit hooks — easy to push code with lint errors or broken tests
After:
get_embedding()usestenacitywithwait_exponential(mult=1, min=1, max=30), 5 attempts, retrying only onRateLimitError/APITimeoutError/APIConnectionError/InternalServerError. No retry onAuthenticationErrororBadRequestError. Each retry is logged atwarninglevelAll 12 scripts have
argparsewith--help, typed arguments, and consistent names:hipocampo_mcp_server.py --http 8001.pre-commit-config.yamlwith ruff lint+format (pre-commit) and pytest (pre-push).pyproject.tomlconfigures ruff with line-length 120
Impact: The server tolerates transient API failures without the client seeing errors. CLI is self-documenting. Every commit is verified before reaching GitHub — no more broken tests on main.
Local Fixes, compress_hipocampo Tool, and symlink-based Structure (v3.9)
Before:
Scripts in
scripts/were independent copies of the repo — eachgit pullrequired manual sync, and new files likehipocampo_compress.pywere missingLocal scripts (user-owned) lived in the same
scripts/directory — no separation from repo filesThe
hipocampo/Python package was also a copy:load_config()looked for.envinproject_root/.envinstead of~/.hipocampo/.env, loading incorrect credentials (alex/hipocampo123)If the embedding API returned transient HTTP errors (403, 429, timeout),
compressoperations failed with a generic exceptionThe
query_statstable existed inesquema.sqlbut was never auto-created —hipocampo_healthreportedDEGRADED4 scripts called
register_vector(conn)on the_PooledConnectionfromget_conn()— psycopg2 rejected it withTypeError, breaking all vector operationsIntegration tests sent raw JSON-RPC to FastMCP v1.27+ — missing the
initializehandshake, failing withInvalid request parameters
Now:
~/.hipocampo/is the canonical home:repo/(git clone),~/.hipocampo/scripts/→repo/scripts/(symlink),~/.hipocampo/hipocampo/→repo/hipocampo/(symlink). Local user scripts moved to~/.hipocampo/local_scripts/.git pullonrepo/auto-updates everything_find_env()indb.pyloads.envin deterministic order:ENV_PATHenv var →~/.hipocampo/.env(explicit user config) →project_root/.env(Docker/Fly). No more wrong credentialsensure_stats_table()runs at module import time in the MCP server —query_statstable auto-created on starthipocampo_compress.pywith explicit exception handling:RateLimitError,APITimeoutError,APIConnectionError,APIStatusError→ immediate fallback to extractive compression. All other errors → fallback with distinct warning levelregister_vector(conn)removed fromhipocampo_search.py,hipocampo_checkpoint.py,hipocampo_calibrate.py,mm_brain_tool.py—get_conn()already registers the vector adapter on the real connectionIntegration tests rewritten with
mcp[client]SDK (stdio_client+ClientSession+initialize()) — proper MCP 2025-03-26 handshake105 tests total, all passing
Impact: Zero-touch maintenance after git pull. Transient embedding API errors degrade gracefully. Config loading is deterministic and secure. Vector operations work reliably. Tests follow the official MCP protocol.
🧹 Automatic Maintenance (v5.1)
Unattended consolidation, decay, and pruning — the memory system now cleans itself. Three complementary mechanisms:
1. Async Background Scheduler (server-side)
The MCP server can run a maintenance loop every 24h (configurable). Off by default — activate with an environment variable:
HIPOCAMPO_AUTO_MAINTENANCE=true # activates the scheduler on next restartEnv var | Default | Purpose |
|
| Enables the scheduler in the HTTP lifespan |
|
| Seconds between maintenance cycles |
|
| Min age to consolidate episódica → semántica |
|
| Min age to archive unaccessed episódica (active forgetting) |
Each cycle runs: consolidation (episodic → semantic promotion), decay (link weight half-life 90d + active forgetting of unaccessed episodic memories), dedup merge, and access-log purge (>30d). All protections intact: automatica, semantica, critico, and linked memories are never archived.
2. Save-Triggered Micro-Maintenance
Every 50 saves (configurable via HIPOCAMPO_SAVE_TRIGGER_EVERY, 0 disables), a background thread runs a lighter cycle: consolidation + decay + purge — no dedup merge (irreversible). The system cleans itself in proportion to how much it's used, no external services required.
3. CLI + systemd Timer with Persistent=true (recommended for desktops)
For machines that power off at night, cron loses scheduled runs. A user-level systemd timer with Persistent=true catches up on the missed run as soon as the PC boots:
# Dry-run first (read-only simulation — always do this)
python3 scripts/run_maintenance.py
# Apply real changes
python3 scripts/run_maintenance.py --apply --min-age 7 --decay-min-age 60Install the weekly timer (Sunday 03:00, catch-up on boot):
mkdir -p ~/.config/systemd/user
cp scripts/hipocampo-maintenance.service scripts/hipocampo-maintenance.timer ~/.config/systemd/user/
# Edit the .service file: set the correct python path and repo path
systemctl --user daemon-reload
systemctl --user enable --now hipocampo-maintenance.timer
systemctl --user list-timers hipocampo-maintenance.timer # verify next runThe CLI reuses _run_maintenance_cycle() from the MCP server — the exact same code path as the internal scheduler, zero logic duplication.
Bug fixes in this release
decay_hipocamponever ran: the memory-level query mixedtimestamptzandtextin aCOALESCE(COALESCE(max(accessed_at), metadatos->>'date')) → PostgreSQL errortypes timestamp with time zone and text cannot be matched. Fixed by casting(NULLIF(metadatos->>'date',''))::timestamptz. Same bug fixed inhipocampo_budget.min_age_dayswas ignored:decay_hipocampo(dry_run=False, min_age_days=30)accepted the parameter but Part 2 (active forgetting) had no age filter in SQL — it would archive episodic memories of any age. Now the age threshold is parameterized in the query.
☕ Support / Donaciones
If this project helps you, consider supporting its development:
PayPal: paypal.me/carrasquealex
USDT (TRC-20): (próximamente)
Cada grano de arena ayuda a mantener el proyecto vivo 🧠✨
⚡ Performance Optimizations (v3.9)
Optimizations applied in July 2026 to address latency and threshold drift:
Embedding Cache
get_embedding() now uses an LRU cache (128 entries) — repeated queries for identical text skip the embedding API call entirely, saving ~450ms each. The OpenAI client is also reused across calls instead of being recreated.
SSC Search Acceleration
SSC_TOP_Kreduced from 20 → 15: fewer vector results per table means faster vector searchhnsw.ef_search = 20: lower HNSW breadth-of-search for approximate (faster) nearest neighbors (default was 40)CONFIANZA_ALTAlowered from 70 → 60: early exit from the SSC pipeline sooner when vector results are already goodEarly exit: if ≥3 results already exceed the minimum threshold, trigram and ILIKE phases are skipped entirely
register_vectorcached per connection to avoid redundant SQL introspection
Threshold Reset & Sane Auto-Tune
alphareset from 0.6 → 0.5 (balanced 50% vector + 50% lexical),vectorial_confidence_minfrom 0.75 → 0.70Auto-tune (
hipocampo_tune()) now capped: alpha stays within 0.4–0.6, confidence within 0.5–0.75Auto-tune can now decrease alpha too (if scores are high enough, reduces vector bias)
Health Check Improvements
Reports PostgreSQL version and pgvector version for compatibility diagnostics
Verifies
register_vector()and detects the pgvector/PG17indamincompatibility with a clear upgrade message
🧪 Testing
Hipocampo includes 103 unit tests covering all core logic and MCP integration:
Test file | What it covers |
| Query expansion (stem map + synonyms), score fusion with dynamic alpha, temporal decay (5%/week), result formatting |
| All 17 tag rules, 16 category rules, memory_type auto-detection |
| Cosine similarity (including 1024-dim vectors), exact and semantic duplicate detection logic |
| Age scale classification, project grouping, summary generation |
| 6 schema tests (tool registration, annotations, params, async signature) + 3 live integration tests (stdio server, mcp[client] SDK) |
| Sliding-window rate limiter: acquire/release, prune, stats, default limiters |
| Config validation: missing DB_HOST, embedding API config, comprehensive coverage |
# Run all tests
python3 -m pytest tests/ -v
# Run with coverage
python3 -m pytest tests/ --cov=scripts --cov-report=term-missingTests run automatically on every push via GitHub Actions on Python 3.11–3.13.
📄 License
This project is licensed under the MIT License.
🇪🇸 Versión en Español

⚠️ Nota de Transporte: SSE está deprecado desde spec MCP 2025-03-26. Hipocampo ahora usa Streamable HTTP (endpoint único
/mcp) como transporte remoto recomendado.
🌐 Servidor MCP — Live en Hugging Face
Hipocampo corre como servidor MCP gratuito en Hugging Face Spaces. Conéctate desde cualquier cliente MCP:
{
"mcpServers": {
"hipocampo": {
"url": "https://alexbell1-hipocampo-mcp.hf.space/mcp",
"type": "streamable-http"
}
}
}🧪 Playground interactivo: Prueba guardar y buscar recuerdos desde el navegador en https://alexbell1-hipocampo-mcp.hf.space/ — sin registro ni cliente MCP.
⚠️ Importante: El tier gratuito de Hugging Face es efímero — los datos se pierden al reiniciar/desplegar. Esta instancia es solo para pruebas. Para persistencia real, ejecuta Hipocampo localmente o conecta una base externa.
⚡ Instalación Zero-Touch — Auto-Installer v6.0
Una sola línea. La terminal hace todo: PostgreSQL + pgvector, embeddings, base de datos, venv, clientes MCP, servicio systemd con timer de mantenimiento automático.
🪟 ¿Usas Windows?
install.shes un script de Linux/macOS. En Windows necesitas WSL2 (Windows Subsystem for Linux):wsl --installAbre la terminal de WSL (Ubuntu), actualiza los paquetes y vuelve a ejecutar el instalador:
sudo apt update && sudo apt install -y python3-venv python3-pip build-essential curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bash⚠️ En Windows puro (CMD/PowerShell) el instalador NO funciona. Sin WSL2 verás errores como
Package 'python3-venv' has no installation candidateoapt: command not found.
🚀 Instalar en 10 segundos
curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bashMáquinas sin interacción (VPS, contenedores):
curl -fsSL https://raw.githubusercontent.com/carrasquelalex1/hipocampo/main/install.sh | bash -s -- --unattended🔄 Las 8 fases automáticas
Fase | Qué instala | 🕐 |
① | Diagnóstico: OS, gestor de paquetes, RAM, disco | ~2s |
② | PostgreSQL 17 + pgvector (apt · dnf · pacman · brew) | ~15s |
③ | Base de datos + esquema: 10 tablas, HNSW + GIN, ownership | ~3s |
④ | Embeddings: Ollama local ( | ~60s |
⑤ | Python | ~10s |
⑥ | Clientes MCP: OpenCode · Claude · Gemini/Antigravity · Cursor · VS Code · Windsurf | ~2s |
⑦ | Servicio | ~1s |
⑧ | Autodiagnóstico: health · save · search · cleanup | ~3s |
🛡️ Características del instalador
✅ Idempotente | Vuelve a ejecutarlo sin miedo — repara ownership, actualiza repo y configs |
✅ 6 clientes MCP | OpenCode, Claude, Gemini/Antigravity, Cursor, VS Code, Windsurf |
✅ Mantenimiento automático | Timer semanal (domingo 03:00) con |
✅ Sin root | Todo en |
✅ Opciones |
|
✅ Desinstalación limpia |
|
✅ Compilación desde fuente | Fallback si el paquete pgvector no está en el repositorio |
Hipocampo es una arquitectura avanzada de persistencia de memoria dual diseñada para agentes de Inteligencia Artificial. Al mantener tanto el conocimiento técnico como los datos del perfil del usuario entre sesiones, Hipocampo proporciona un contexto con estado confiable que permite a los agentes aprender, adaptarse y escalar eficientemente.
Construido sobre PostgreSQL 17 y pgvector, utiliza BIRE v3.7 — un motor híbrido que combina embeddings semánticos (1024d), expansión léxica y búsqueda GIN trigram con fusión dinámica de puntuación. Incluye también Caché Selectivo (CS/SSC) como pipeline experimental.
💡 ¿Por qué Compresión de Prompts?
Hipocampo ya reduce el contexto mediante SSC (búsqueda selectiva). Pero incluso las 5 memorias más relevantes pueden consumir 500-2000+ tokens al concatenarse — una porción significativa de la ventana de contexto del LLM.
La compresión híbrida añade una segunda capa de reducción:
Fase extractiva: Elimina oraciones redundantes (filtrando por relevancia de keywords a la consulta). Reduce texto genérico entre 30-50% al instante, sin llamadas API.
Fase LLM: Resume contenido técnico/código usando el endpoint de embeddings configurado (Ollama local o NVIDIA NIM). Preserva todo el código, nombres de variables y sintaxis, eliminando verbosidad explicativa.
Combinado: 20-50% de reducción de tokens con pérdida de calidad casi nula. Un bloque de memoria de 1500 tokens se convierte en 750-1200 tokens — ahorro real en cada llamada al LLM.
Impacto real: Si usas compress_hipocampo antes de cada search_hipocampo → LLM, ahorras 200-800 tokens por interacción. A escala (cientos de consultas), esto se traduce en reducción significativa de costos y respuestas más rápidas.
🚀 Características Principales
Arquitectura de Memoria Dual: Capas de almacenamiento separadas para registros técnicos (
memoria_vectorial) y datos de perfil (memory_items), ambas utilizando embeddings de 1024 dimensiones.BIRE v3.7 (por defecto): Búsqueda híbrida con embeddings locales (1024d, Ollama
qwen3-embedding:0.6bpor defecto), expansión de consulta, GIN trigram y puntuación compuesta — usado por todas las tools MCP.Caché Selectivo (CS/SSC, experimental): Pipeline alternativo de 4 fases: Tag Router → pgvector Top-K → GIN Trigram → ILIKE Fallback.
Checkpointing Logarítmico: Compresión inteligente basada en el decaimiento del tiempo, consolidando detalles granulares en un solo registro tras 90 días.
Auto-MeJORA MCP: Autodiagnóstico (health check + auto-repair), optimización dinámica (stats + tune), y mantenimiento de memoria (dedup + checkpoint) — todo desde herramientas MCP.
Compresión Híbrida de Prompts (v4.0): Pipeline de dos fases — compresión extractiva (nivel de oraciones) para texto genérico y resumen LLM (vía endpoint de embeddings configurado) para contenido técnico/código. Reduce tokens del prompt entre 20-50% preservando información crítica. Disponible como herramienta MCP
compress_hipocampo.Grafo de Memoria (v4.0): Grafo dirigido de relaciones semánticas entre recuerdos. Enlaza registros relacionados, navega con árbol BFS, encuentra caminos más cortos. Tools:
link_hipocampo,graph_hipocampo,path_hipocampo.Jerarquía de Memoria con Prevención por Disparadores (v4.1): 🧠🧠 Tres niveles (episódica → semántica → automática) inspirado en consolidación mnémica humana. NOVEDAD: Etiqueta recuerdos con disparadores contextuales (
trigger:php,trigger:chartjs,trigger:tomcat) — cuando el agente comienza a trabajar en ese contexto, busca reglasautomaticacoincidentes y reactiva errores pasados antes de cometer el mismo error. Esto replica el hipocampo biológico: una pista parcial (proyecto + lenguaje) dispara la recuperación completa del error y su solución. Las reglas automáticas son permanentes — nunca se comprimen, nunca se eliminan. Tools:set_nivel_hipocampo(id, nivel)+consolidate_hipocampo.Sistema Inmunológico de Código — Protección contra Regresiones (v4.2): 🛡️ Evita que los agentes rompan código que funcionaba. Ciclo de 3 pasos: (1) Snapshot del estado funcional antes de editar, (2) Verificar después de editar, (3) Si algo se rompió → crear regla
automaticapermanente que capture la causa exacta, el síntoma y la solución. Usa economía inmune: los snapshots pre-cambio sonepisodicabaratos (se autocomprimen si no hubo daño), las reglas post-rotura sonautomaticapermanentes. Precargado con catálogo de archivos frágiles — header.php, conexion.php, utils.php, auth.php, etc. El agente buscatrigger:regresion trigger:<archivo>antes de cada edición para aprender lo que otros agentes rompieron antes.RAG de Código (v4.0): Indexa código fuente de proyectos (PHP, JS, TS, Python, SQL) como embeddings semánticos. Busca con
search_code(consulta, lenguaje)— devuelve código real con ruta de archivo y números de línea.Decaimiento Temporal Exponencial (v4.0):
score_final = relevancia × exp(-λ × días)con λ=0.05 configurable y piso 20%. El conocimiento reciente pesa naturalmente más.Diversidad MMR Anti-Cluster (v4.3): Reordenamiento post-fusión con Maximum Marginal Relevance para evitar que clusters densos monopolden los resultados. Selecciona iterativamente resultados balanceando relevancia con diversidad:
diversity_lambda × relevancia - (1-diversity_lambda) × max_similitud_a_seleccionados. Configurable enhipocampo_hybrid_config.json.Olvido Activo con Tiers de Archivo (v5.0):
decay_hipocampoahora archiva memoriasepisodicaantiguas enmemoria_historica(almacenamiento frío) al superar umbrales de edad. Niveles protegidos:automatica,semantica,critico— nunca se archivan. Nuevo parámetrocriticoensave_hipocampopara memorias críticas.restaurar_historica(id)restaura memorias frías al tier activo.Boost de Fatiga de Memoria (v5.0): Nueva tabla
memory_accessrastrea frecuencia de acceso por registro. BIRE aplica un boost de fatiga:boost = min(15, 5·log1p(accesos_7d))·e^(-edad_horas/168). Las memorias accedidas con frecuencia en una ventana de 7 días suben naturalmente en el ranking — imitando cómo el cerebro fortalece vías neuronales mediante la recuperación repetida.Presupuesto de Memoria y Tiering (v5.0):
hipocampo_budget(dry_run)gestiona tres tiers — HOT (embedding presente, búsqueda semántica completa), WARM (embedding=NULL, búsqueda solo por texto), COLD (memoria_historicaarchivo). Cap del tier hot: 5000 registros.restaurar_historica(id)restaura memorias frías al tier activo.Detección de Contradicciones (v5.0):
save_hipocampoejecuta_detectar_contradicciones()usando embeddings de sonda de negación para detectar contradicciones factuales. Cuando detecta: registra warning y crea enlacecontradicts— nunca bloquea el guardado.contradicciones_hipocampo(id)realiza auditorías de contradicción bajo demanda.Watcher de Archivos con Systemd (v5.0):
hipocampo_watch.pymonitorea directorios configurados y auto-reindexa archivos modificados viaindex_project. Gestionado porhipocampo-watch.timer(intervalo 10 minutos). Tools MCP:list_watch_dirs,add_watch_dir(path, patterns),remove_watch_dir(path),reindex_now(path?).Decaimiento de Pesos en Enlaces (v4.3): Decaimiento exponencial en enlaces del grafo con half-life de 90 días. Los enlaces no recorridos pierden fuerza; enlaces <0.01 se podan.
graph_hipocampo()ypath_hipocampo()refuerzan automáticamente los enlaces atravesados. Nueva tooldecay_hipocampo(dry_run)para mantenimiento del grafo. Columnas:last_accessed,reinforced_at.Memoria por Sesión y Auto-resumen: Búsqueda/guardado aislado por sesión. Cada 20 guardados, Hipocampo genera un resumen consolidado de fondo.
Precarga Proactiva de Contexto:
preload_context(ruta_proyecto)extrae keywords del proyecto, busca memorias relevantes y devuelve resumen comprimido. Ideal al inicio de sesión.Presupuesto de Contexto Inteligente:
compress_hipocampoauto-estima tokens y ajusta k dinámicamente.budget_ratioda control fino sobre el tamaño de salida.Auto-Enlace:
save_hipocampo(..., auto_link=True)descubre recuerdos semánticamente similares (>0.75 cosine) y crea aristassimilaren el grafo.Recuperación Automática de HNSW:
hipocampo_health()verifica el índice HNSW al arrancar y lo crea si falta — sin comandosCREATE INDEXmanuales.Protocolo MCP (Model Context Protocol): Integración nativa mediante servidor FastMCP con 37 herramientas, otorgando capacidades directas de lectura/escritura y mantenimiento a clientes MCP como Claude Desktop y OpenCode.
⚡ ¿Por qué PostgreSQL + pgvector (y no SQLite)?
Quizás te preguntes por qué Hipocampo usa PostgreSQL 17 con pgvector en lugar de algo más ligero como SQLite. La respuesta: la búsqueda híbrida necesita más que solo similitud vectorial.
El pipeline de recuperación combina pgvector (HNSW) para búsqueda semántica, pg_trgm (GIN) para expansión léxica e ILIKE como fallback — todo fusionado en un solo score ponderado. Extensiones de SQLite como sqlite-vec ofrecen búsqueda vectorial, pero carecen de:
Índices GIN trigram para coincidencias difusas/parciales
Fusión híbrida texto + vector en una sola consulta
Indexación HNSW de nivel productivo con escrituras concurrentes
Expansión por pg_trgm cuando los embeddings no bastan
Con más de 1,100 registros en dos tablas de memoria y creciendo, Hipocampo necesita una base de datos que escale sin sacrificar calidad de recuperación. PostgreSQL + pgvector no es "pesado" por capricho — es el stack mínimo viable para la precisión híbrida que BIRE y SSC exigen.
🎯 Casos de Uso
Error → Aprender → No Repetir (Ciclo de Aprendizaje para Agentes IA)
Hipocampo permite que agentes de IA aprendan de sus errores entre sesiones con un ciclo simple:
┌─ 1. BUSCAR ─────────────────────────────┐
│ Antes de ejecutar, el agente busca │
│ errores similares en Hipocampo: │
│ search_hipocampo("error <contexto>") │
└───────────────────┬──────────────────────┘
│
┌─ 2. EJECUTAR ─────▼──────────────────────┐
│ Si hay match → aplicar solución conocida│
│ Si no → intentar nuevo enfoque │
└───────────────────┬──────────────────────┘
│
┌─ 3. EVALUAR ──────▼──────────────────────┐
│ ¿Falló? Capturar: │
│ - contexto del error y exit code │
│ - qué se intentó │
│ - qué pasó │
└───────────────────┬──────────────────────┘
│
┌─ 4. PERSISTIR ────▼──────────────────────┐
│ save_hipocampo( │
│ content="Error X: intenté Y, pasó Z",│
│ memory_type="decision", │
│ code="error_<hash>", │
│ categories=["bugfix", "<herramienta>"]│
│ ) │
└──────────────────────────────────────────┘Ejemplo real: Un agente intenta flatpak install npm y falla. Guarda el error en Hipocampo: "npm es un gestor de paquetes de Node.js, no un paquete Flatpak. Usar npm directamente." La próxima vez que se intente el mismo comando, el agente encuentra este registro y aplica la solución de inmediato.
Con el tiempo, la base de conocimiento de errores crece orgánicamente. Cada fallo hace más inteligentes las sesiones futuras. Esto convierte a Hipocampo de un simple archivo en un sistema de aprendizaje continuo para agentes de IA.
🧠 Prevención de Errores por Disparadores Contextuales (NUEVO v4.1) — Proactivo, no Reactivo
Más allá del aprendizaje reactivo, Hipocampo v4.1 introduce reglas automáticas con disparadores que se activan antes de que el agente escriba una sola línea de código:
┌─ 1. DETECTAR CONTEXTO ───────────────────────────┐
│ El agente va a editar un archivo PHP en SGV.pro: │
│ Archivo: analisis_visual.php │
│ Librería: Chart.js │
│ Lenguaje: PHP │
└───────────────────┬───────────────────────────────┘
│
┌─ 2. BUSCAR DISPARADORES ──▼───────────────────────┐
│ search_hipocampo("trigger:sgv trigger:chartjs │
│ trigger:php trigger:json_encode")│
└───────────────────┬───────────────────────────────┘
│
┌─ 3. REACTIVAR REGLAS ─▼───────────────────────────┐
│ REGLA AUTOMÁTICA ENCONTRADA (score 31.0): │
│ "NUNCA usar variables JS (C.red, C.primary) │
│ dentro de <?= json_encode() ?> en PHP. │
│ PHP las evalúa como constantes → Fatal Error." │
│ Solución: usar literales #ef4444 / #408AEC │
└───────────────────┬───────────────────────────────┘
│
┌─ 4. ACTUAR CON RESTRICCIÓN ─▼─────────────────────┐
│ El agente genera código usando literales de │
│ color. Error EVITADO antes de que ocurra. │
└───────────────────────────────────────────────────┘Cómo implementarlo:
# 1. Al guardar un error, etiquetarlo con triggers contextuales y elevar a automatica
save_hipocampo(
content="NUNCA usar variables JS en json_encode() PHP. Usar literales de color.",
memory_type="decision",
categories=["trigger:sgv", "trigger:chartjs", "trigger:php", "trigger:json_encode"],
nivel="automatica"
)
# 2. Antes de editar código en cualquier proyecto, buscar disparadores coincidentes
search_hipocampo("trigger:<proyecto> trigger:<lenguaje> trigger:<tecnologia>")
# 3. Las reglas automáticas aparecen → el agente las aplica preventivamenteEsto replica el hipocampo biológico: una pista parcial dispara la recuperación completa de la memoria — el cerebro no espera a que ocurra el error para recordar que duele.
🛡️ Protección contra Regresiones — Sistema Inmunológico (NUEVO v4.2)
A veces el agente rompe código que funcionaba bien — no repite un error viejo, crea uno nuevo. Hipocampo v4.2 implementa un ciclo inmune de 3 pasos que replica cómo el cuerpo genera anticuerpos:
┌─ 1. SNAPSHOT ──────────────────────────────────┐
│ Antes de editar header.php, guardar qué sirve: │
│ "header.php depende de session_start(). │
│ Verificar: abrir dashboard.php, debe cargar." │
│ Costo: episodica (barato, se autocomprime) │
└───────────────────┬─────────────────────────────┘
│
┌─ 2. VERIFICAR ────▼─────────────────────────────┐
│ Después de editar, verificar el snapshot: │
│ - Dashboard carga OK → sin costo, se desvanece │
│ - HTTP 500 en todas las páginas → ¡respuesta! │
└───────────────────┬─────────────────────────────┘
│
┌─ 3. INMUNIZAR ────▼─────────────────────────────┐
│ Guardar regla automatica permanente: │
│ "Editar header.php: quité session_start(), │
│ rompió 40+ páginas. Solución: restaurar │
│ session_start() al inicio. NUNCA tocar esto." │
│ Costo: automatica (permanente, inmutable) │
└─────────────────────────────────────────────────┘Catálogo de archivos frágiles (precargado): header.php, conexion.php, utils.php, auth.php, db_connection.php — estos archivos tienen dependencias en cascada. Una sola edición incorrecta rompe decenas de páginas. Hipocampo incluye reglas de fragilidad para que los agentes sepan qué manejar con cuidado.
Antes de cada edición: search_hipocampo("trigger:regresion trigger:<archivo> trigger:<proyecto>") — aprende lo que otros agentes rompieron en este archivo antes de tocarlo.
⚙️ Cómo configurar tu agente
Para activar este comportamiento, hay que instruir al agente. Se hace agregando reglas en su archivo de configuración:
Agente | Archivo de configuración |
OpenCode |
|
Claude Code |
|
Cursor |
|
Windsurf |
|
Cline |
|
Ejemplo mínimo para AGENTS.md / CLAUDE.md:
## Ciclo de Aprendizaje de Errores
1. Antes de ejecutar un comando, busca: `search_hipocampo("error <comando> <contexto>")`
2. Si hay error similar, aplica la solución documentada y omite el intento fallido
3. Si el comando falla (exit code != 0, timeout, "error"/"failed" en output):
- Guarda en Hipocampo: `save_hipocampo(content="Error: {stderr[:500]}. Intento: {qué se probó}. Resultado: {qué pasó}.", memory_type="decision", code="error_<hash>", categories=["bugfix", "<lenguaje/herramienta>"])`💡 Tip: Para agentes nativos MCP (OpenCode, Claude Code), las tools de Hipocampo están disponibles directamente. Para otros, usa el endpoint HTTP o los scripts CLI.
📄 ¿Quieres que tu agente use TODO Hipocampo? Agrega las secciones de AGENTS_TEMPLATE.md a tu AGENTS.md / CLAUDE.md / .cursorrules — seguro de compartir, sin credenciales.
🖥️ Truncamiento de Display — OpenCode y Resultados Grandes
Los resultados de búsqueda BIRE pueden ser extensos (especialmente con el límite aumentado a 8000 caracteres). OpenCode trunca la salida de herramientas por defecto a 2000 líneas / 51 KB. Verás ...N bytes truncados... al final cuando ocurra. La salida completa se guarda en un archivo para lectura posterior, pero para evitar el truncamiento, agrega a tu opencode.json o ~/.config/opencode/opencode.jsonc:
{
"tool_output": {
"max_lines": 5000,
"max_bytes": 256000
}
}Reinicia OpenCode para que el cambio surta efecto.
Otros casos de uso
Perfil de usuario persistente: Recordar preferencias, configuraciones y datos personales entre sesiones
Seguimiento de proyectos: Mantener contexto de proyectos activos, decisiones tomadas y tareas pendientes
Conocimiento entre sesiones: Continuar trabajos previos sin repetir contexto
🛠️ Instalación Rápida
Soporte de SO: Ubuntu 22.04+, Debian 12+, Fedora 39+, Arch Linux, macOS (Homebrew) o Windows vía WSL2.
# 1. Clonar y configurar BD
git clone https://github.com/carrasquelalex1/hipocampo.git
cd hipocampo
createdb hipocampo_db
psql -d hipocampo_db -c "CREATE EXTENSION vector; CREATE EXTENSION pg_trgm;"
psql -d hipocampo_db -f esquema.sql
# 2. Entorno Python y dependencias
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
# 3. Configurar variables de entorno
cp .env.example .env
# Editar .env con DB_HOST, DB_USER, y EMBED_BASE_URL/EMBED_MODEL (por defecto Ollama local)Para usar la búsqueda directamente desde la terminal:
python3 scripts/hipocampo_search.py "término de búsqueda" # BIRE v3.7 (recomendado)
python3 scripts/hipocampo_ssc_search.py "término de búsqueda" # SSC v1.0 (experimental)
python3 scripts/hipocampo_compress.py "término" --k 5 # Búsqueda + compresión híbridaPara inicializar el servidor MCP:
python3 scripts/hipocampo_mcp_server.py
python3 scripts/hipocampo_mcp_server.py --http 8001 # Streamable HTTP (recomendado)
python3 scripts/hipocampo_mcp_server.py --sse 8001 # legacy (deprecado)Herramientas MCP Disponibles (37 herramientas)
Operaciones de Memoria:
search_hipocampo(consulta, session_id?): Búsqueda semántica + léxica híbrida (auto-registra métricas). Filtro opcional por sesión.quick_hipocampo_search(consulta): Alias rápido para búsquedas.preload_context(ruta_proyecto, k=8): Extrae keywords del proyecto, busca memorias relevantes y devuelve resumen comprimido. Ideal para inicio de sesión.compress_hipocampo(consulta, k=5, method="hybrid", budget_ratio=1.0, include_metadata=False): Búsqueda + compresión híbrida con presupuesto de contexto. Auto-estima tokens y ajusta k dinámicamente. Tres métodos:"hybrid"(recomendado),"extractive"(más rápido, sin costo API),"llm"(máxima calidad).save_hipocampo(contenido, tipo, codigo, categorias, session_id?, force?, auto_link=False, nivel="episodica"): Guarda datos técnicos enmemoria_vectorial. Soporta auto-dedup, auto-enlace y niveles jerárquicos.profile_hipocampo(resumen, extra, categorias): Guarda datos de perfil enmemory_items.
Grafo de Memoria (v4.0):
link_hipocampo(origen, destino, tipo_relacion, peso): Crea enlace dirigido entre recuerdos. Tipos:related,follow_up,part_of,references,similar,chain.unlink_hipocampo(id / origen+destino+tipo): Elimina enlaces del grafo.graph_hipocampo(nodo_id, profundidad=2): Árbol BFS desde un nodo raíz.nodo_id=0muestra vista general.path_hipocampo(origen, destino, max_depth=5): Camino más corto BFS entre dos recuerdos.
RAG de Código (v4.0):
index_project(ruta_proyecto, force=False): Indexa archivos de código como embeddings semánticos. Incremental — solo re-indexa archivos modificados. Soporta PHP, JS, TS, Python, SQL, HTML, CSS, JSON, YAML.search_code(consulta, k=5, lenguaje=""): Búsqueda vectorial en código indexado. Devuelve código real con ruta, lenguaje y líneas.
Operaciones CRUD:
update_hipocampo(id, contenido?, tipo?, codigo?, categorias?): Actualiza un recuerdo existente. Regenera embedding si cambia el contenido.delete_hipocampo(id): Elimina un recuerdo permanentemente por ID.set_nivel_hipocampo(id, nivel): Promueve/degrada un recuerdo entre niveles jerárquicos (episodica,semantica,automatica).consolidate_hipocampo(dias_min=7, seco=True): Migra recuerdos episódicos antiguos a nivel semántico con compresión opcional.
Autodiagnóstico y Reparación:
hipocampo_health(): Health check completo (PostgreSQL, API de embeddings, disco, extensiones, índice HNSW).hipocampo_auto_repair(): Repara problemas automáticamente (crea tablas, índice HNSW, reinicia PostgreSQL).
Optimización de Rendimiento (Fase 2):
hipocampo_stats(): Métricas de rendimiento, latencia, y recomendaciones de optimización.hipocampo_tune(): Ajusta thresholds BIRE/SSC y pesos híbridos según uso real.
Mantenimiento de Memoria (Fase 3):
hipocampo_dedup(fusionar): Detecta y fusiona memorias duplicadas (exactas + semánticas).hipocampo_checkpoint(seco): Checkpointing logarítmico para comprimir memorias antiguas.hipocampo_maintenance(): Ciclo completo de mantenimiento (reparar → dedup → checkpoint → tune).
Decaimiento Temporal:
Scores de memorias >7 días decaen ~5% por semana (piso 30%), priorizando conocimiento reciente.
Olvido Activo y Tiering (v5.0):
decay_hipocampo(seco=True): Archiva memoriasepisodicaantiguas amemoria_historica(almacenamiento frío). Protegidos:automatica,semantica,critico. Modo seco muestra qué se archivaría.hipocampo_budget(seco=True): Muestra distribución de memorias en tiers HOT/WARM/COLD. Cap del tier hot: 5000.restaurar_historica(id): Restaura una memoria fría del archivo al tier activo.contradicciones_hipocampo(id=None): Auditoría de contradicciones bajo demanda. Con ID: verifica una memoria. Sin ID: escanea todas.
Watcher de Archivos (v5.0):
list_watch_dirs(): Lista los directorios monitoreados para auto-reindexación.add_watch_dir(path, patterns=["*.php","*.py","*.js"]): Agrega un directorio al watch list.remove_watch_dir(path): Elimina un directorio del watch list.reindex_now(path=None): Dispara reindexación inmediata de archivos modificados (o todos si no se da path).
Webhooks (Watch):
watch_hipocampo(patron, webhook_url): Registra un webhook que se dispara en eventos save/update/delete cuando el contenido coincide con un patrón.unwatch_hipocampo(id): Elimina un webhook registrado.list_watches(): Lista todos los webhooks activos.
Arquitectura Modular
La conexión a BD, configuración y generación de embeddings están centralizadas en el paquete hipocampo:
hipocampo/
├── __init__.py # Inicialización del paquete (v6.0.0)
└── db.py # get_conn(), get_embedding(), load_config()Todos los scripts en scripts/ importan de hipocampo.db en lugar de duplicar el boilerplate. El servidor MCP importa las funciones de búsqueda/salud/estadísticas/dedup/checkpoint directamente — sin llamadas subprocess.
Antes: Cada búsqueda MCP ejecutaba subprocess.run() → fork del intérprete Python → re-importar todo → conectar DB → generar embedding → ejecutar query → parsear stdout. ~200–500ms solo de overhead de proceso y serialización.
Ahora: Llamada directa a función en el mismo proceso. La DB connection pool, OpenAI client y módulos ya están cacheados. El overhead se reduce a microsegundos.
Para búsquedas individuales la diferencia es marginal (~200ms), pero para hipocampo_maintenance() antes ejecutaba 4 forks subprocess en serie — ahora es una llamada directa por fase, ahorrando ~1–2 segundos.
Async & Connection Pool (v3.8)
El servidor MCP ahora ejecuta las 16 herramientas como corutinas async en modo HTTP, y usa un pool de conexiones PostgreSQL en lugar de crear una conexión nueva por cada llamada:
Antes:
Cada herramienta abría una conexión TCP + SSL nueva a PostgreSQL → latencia de
connect()en cada llamadaTools sincrónicas bloqueaban el event loop de uvicorn → una
searchlenta congelaba el servidor para todos los clientes concurrentesEn modo HTTP con requests concurrentes: riesgo de
too many connectionsen la BD
Ahora:
init_pool(minconn=1, maxconn=10)crea unThreadedConnectionPoolal arrancar — las conexiones se reúsan, el handshake ocurre una sola vezLas 16 herramientas son
async def— I/O bloqueante (queries BD, API de embeddings) corre enasyncio.to_thread(), liberando el event loop para otras requestsUn proxy
_PooledConnectiondevuelve las conexiones al pool automáticamente al llamar.close()— sin cambios en el caller
Impacto: Requests concurrentes ya no se bloquean entre sí; el overhead de conexión PostgreSQL baja de ~10–50ms por llamada a casi cero.
Tests de Integración:
6 tests de schema verifican registro de herramientas, anotaciones, parámetros y firma async — sin BD, corren en CI
3 tests de integración en vivo (marcados
@pytest.mark.integration) arrancan el servidor en modo stdio y verifican tools/list, resources/list y una búsqueda real105 tests totales, todos pasando
Validación de Config, Rate Limiting y Errores Granulares (v3.8)
Antes:
NVIDIA_API_KEYoDB_HOSTfaltantes → el server arrancaba sin errores y fallaba con un crípticofe_sendauth/401recién en el primer queryCualquier cliente podía saturar la API de embeddings y el PostgreSQL gratuito — sin ningún límite
Todos los errores se capturaban con
except Exception: logger.error("msg: %s", e)— sin traceback, imposible saber si era error de BD, red o validación
Ahora:
validate_config()se ejecuta al arranque y logea warnings claros para cada variable faltante.init_pool()yget_conn()rechazan temprano con mensajes como "PostgreSQL connection incomplete: DB_HOST, DB_USER no configurados en .env"Tres rate limiters sliding-window protegen el sistema:
embedding_limiter(30/min — protege el costo de la API de embeddings),tool_limiter(60/min — protege PostgreSQL),watch_limiter(20/min). Los clientes reciben "⏳ Demasiadas solicitudes. Límite: 30 por 60s. Espera 12s."_tool_err()diferencia por tipo de excepción:psycopg2.Error→logger.exception()con traceback completo,ValueError/TypeError→logger.warning()(error del cliente), otros →logger.exception()._fire_webhookscapturaurllib.error.URLErrorpor separado
Impacto: Los errores se detectan antes de llegar a la BD, los costos están limitados, y los logs son accionables — sabés al instante si es una mala configuración, un problema de red o un bug de código.
Consulte los manuales en la carpeta docs/ para información arquitectónica y configuraciones avanzadas.
Retry con Backoff, CLI Consistente y Pre-commit Hooks (v3.8)
Antes:
get_embedding()fallaba al primer timeout o rate limit de la API de embeddings — sin reintentosLos 12 scripts usaban
sys.argvmanual — sin--help, sin validación de tipos, interfaces inconsistentesNo había hooks de pre-commit — fácil pushear código con lint sucio o tests rotos
Ahora:
get_embedding()usatenacityconwait_exponential(mult=1, min=1, max=30), 5 intentos, reintenta solo enRateLimitError/APITimeoutError/APIConnectionError/InternalServerError. No reintenta enAuthenticationErroroBadRequestError. Cada reintento se loguea en nivelwarningLos 12 scripts tienen
argparsecon--help, argumentos tipados y nombres consistentes:hipocampo_mcp_server.py --http 8001.pre-commit-config.yamlcon ruff lint+format (pre-commit) y pytest (pre-push).pyproject.tomlconfigura ruff con line-length 120
Impacto: El server tolera fallos transitorios de la API sin que el cliente vea errores. El CLI es autodocumentado. Cada commit se verifica antes de llegar a GitHub — no más tests rotos en main.
Correcciones Locales, Tool compress_hipocampo y Estructura basada en Symlinks (v3.9)
Antes:
Los scripts en
scripts/eran copias independientes del repo — cadagit pullrequería sincronización manual, y archivos nuevos comohipocampo_compress.pyno se propagabanScripts locales (del usuario) convivían en el mismo
scripts/— sin separación de archivos del repoEl paquete
hipocampo/era también copia:load_config()buscaba.envenproject_root/.enven vez de~/.hipocampo/.env, cargando credenciales incorrectas (alex/hipocampo123)Si la API de embeddings devolvía errores HTTP transitorios (403, 429, timeout), las operaciones de compresión fallaban con excepción genérica
La tabla
query_statsexistía enesquema.sqlpero nunca se creaba automáticamente —hipocampo_healthreportabaDEGRADED4 scripts llamaban
register_vector(conn)sobre el_PooledConnectiondevuelto porget_conn()— psycopg2 lo rechazaba conTypeError, rompiendo todas las operaciones vectorialesLos tests de integración enviaban JSON-RPC raw a FastMCP v1.27+ — sin el handshake
initialize, fallaban conInvalid request parameters
Ahora:
~/.hipocampo/es el directorio canónico:repo/(clon git),~/.hipocampo/scripts/→repo/scripts/(symlink),~/.hipocampo/hipocampo/→repo/hipocampo/(symlink). Scripts locales del usuario movidos a~/.hipocampo/local_scripts/.git pullenrepo/actualiza todo automáticamente_find_env()endb.pycarga.enven orden determinista:ENV_PATH→~/.hipocampo/.env(config explícita del usuario) →project_root/.env(Docker/Fly). Sin más credenciales incorrectasensure_stats_table()se ejecuta al importar el módulo del MCP server — la tablaquery_statsse crea automáticamente al iniciarhipocampo_compress.pycon manejo explícito de excepciones:RateLimitError,APITimeoutError,APIConnectionError,APIStatusError→ fallback inmediato a compresión extractiva. Otros errores → fallback con log de advertencia diferenciadoregister_vector(conn)eliminado dehipocampo_search.py,hipocampo_checkpoint.py,hipocampo_calibrate.py,mm_brain_tool.py—get_conn()ya registra el adaptador vectorial sobre la conexión realTests de integración reescritos con el SDK
mcp[client](stdio_client+ClientSession+initialize()) — handshake MCP 2025-03-26 correcto105 tests totales, todos pasando
Impacto: Mantenimiento cero tras git pull. Errores transitorios de la API de embeddings degradan gracefulmente. Carga de configuración determinista y segura. Operaciones vectoriales confiables. Tests siguen el protocolo MCP oficial.
🧹 Mantenimiento Automático (v5.1)
Consolidación, decaimiento y poda desatendidos — el sistema de memoria ahora se limpia solo. Tres mecanismos complementarios:
1. Scheduler en Segundo Plano (server)
El servidor MCP puede ejecutar un ciclo de mantenimiento cada 24h (configurable). Desactivado por defecto — se activa con una variable de entorno:
HIPOCAMPO_AUTO_MAINTENANCE=true # activa el scheduler al reiniciarVariable | Default | Función |
|
| Activa el scheduler en el lifespan HTTP |
|
| Segundos entre ciclos de mantenimiento |
|
| Edad mínima para consolidar episódica → semántica |
|
| Edad mínima para archivar episódicas sin acceso (olvido activo) |
Cada ciclo ejecuta: consolidación (episódica → semántica), decay (half-life 90d en enlaces + olvido activo de episódicas sin acceso), dedup merge y purga de access logs (>30d). Todas las protecciones intactas: automatica, semantica, critico y memorias enlazadas nunca se archivan.
2. Micro-Mantenimiento por Conteo de Saves
Cada 50 saves (configurable con HIPOCAMPO_SAVE_TRIGGER_EVERY, 0 desactiva), un hilo en background ejecuta un ciclo liviano: consolidación + decay + purga — sin dedup merge (irreversible). El sistema se limpia solo en proporción a cuánto se usa, sin servicios externos.
3. CLI + Timer de Systemd con Persistent=true (recomendado para PCs de escritorio)
Para máquinas que se apagan de noche, cron pierde las ejecuciones programadas. Un timer systemd de usuario con Persistent=true recupera la tarea perdida apenas enciende la PC:
# Primero dry-run (simulación de solo lectura — hacer siempre)
python3 scripts/run_maintenance.py
# Aplicar cambios reales
python3 scripts/run_maintenance.py --apply --min-age 7 --decay-min-age 60Instalar el timer semanal (domingo 03:00, catch-up al encender):
mkdir -p ~/.config/systemd/user
cp scripts/hipocampo-maintenance.service scripts/hipocampo-maintenance.timer ~/.config/systemd/user/
# Editar el .service: setear la ruta de python y del repo correctas
systemctl --user daemon-reload
systemctl --user enable --now hipocampo-maintenance.timer
systemctl --user list-timers hipocampo-maintenance.timer # verificar próxima ejecuciónEl CLI reutiliza _run_maintenance_cycle() del servidor MCP — exactamente el mismo código que el scheduler interno, cero duplicación de lógica.
Bugs corregidos en esta versión
decay_hipocamponunca había corrido: la query de nivel memoria mezclabatimestamptzytexten unCOALESCE(COALESCE(max(accessed_at), metadatos->>'date')) → error de PostgreSQLtypes timestamp with time zone and text cannot be matched. Corregido casteando(NULLIF(metadatos->>'date',''))::timestamptz. Mismo bug corregido enhipocampo_budget.min_age_daysera ignorado:decay_hipocampo(dry_run=False, min_age_days=30)aceptaba el parámetro pero la Parte 2 (olvido activo) no tenía filtro de edad en el SQL — habría archivado episódicas de cualquier edad. Ahora el umbral de edad está parametrizado en la query.
⚡ Optimizaciones de Rendimiento (v3.9)
Optimizaciones aplicadas en Julio 2026 para reducir latencia y estabilizar thresholds:
Caché de Embeddings
get_embedding() ahora usa un caché LRU (128 entradas) — consultas repetidas con el mismo texto saltan la llamada a la API de embeddings, ahorrando ~450ms cada una. El cliente de OpenAI también se reutiliza entre llamadas.
Aceleración de Búsqueda SSC
SSC_TOP_Kreducido de 20 → 15: menos resultados vectoriales por tabla = búsqueda más rápidahnsw.ef_search = 20: menor amplitud de búsqueda HNSW para vecinos aproximados más rápidos (default era 40)CONFIANZA_ALTAbajada de 70 → 60: salida temprana del pipeline SSC cuando los resultados vectoriales ya son buenosEarly exit: si ya hay ≥3 resultados sobre el umbral mínimo, se saltan las fases trigram e ILIKE
register_vectorcacheado por conexión para evitar introspección SQL redundante
Reset de Thresholds y Auto-Tune Controlado
alphareseteado de 0.6 → 0.5 (balanceado 50% vectorial + 50% léxico),vectorial_confidence_minde 0.75 → 0.70Auto-tune (
hipocampo_tune()) ahora limitado: alpha se mantiene entre 0.4–0.6, confidence entre 0.5–0.75Auto-tune ahora también puede disminuir alpha (si los scores son altos, reduce el sesgo vectorial)
Mejoras en Health Check
Reporta versión de PostgreSQL y versión de pgvector para diagnóstico de compatibilidad
Verifica
register_vector()y detecta la incompatibilidad pgvector/PG17 (indam) con un mensaje claro de actualización
🧪 Tests
Hipocampo incluye 103 tests unitarios cubriendo toda la lógica central e integración MCP:
Archivo | Qué cubre |
| Expansión de consulta (stem map + sinónimos), fusión de scores con alpha dinámico, decaimiento temporal (5%/semana), formateo de resultados |
| Las 17 reglas de tags, 16 reglas de categoría, detección automática de memory_type |
| Similitud coseno (vectores de 1024 dim), lógica de detección de duplicados exactos y semánticos |
| Clasificación por escalas de edad, agrupación por proyecto, generación de resúmenes |
| 6 tests de schema (registro de tools, anotaciones, parámetros, firma async) + 3 tests de integración en vivo (servidor stdio, mcp[client] SDK) |
| Rate limiter sliding-window: acquire/release, prune, stats, limiters por defecto |
| Validación de config: DB_HOST faltante, config de API de embeddings, cobertura completa |
# Ejecutar todos los tests
python3 -m pytest tests/ -v
# Con cobertura
python3 -m pytest tests/ --cov=scripts --cov-report=term-missingLos tests se ejecutan automáticamente en cada push vía GitHub Actions en Python 3.11–3.13.
☕ Donaciones
Si este proyecto te es útil, considera apoyarlo:
PayPal: paypal.me/carrasquealex
USDT (TRC-20): (próximamente)
Cada aporte ayuda a mantener vivo el proyecto 🧠✨
Available Tools
37 toolsadd_watch_dirA
Agrega un directorio al watch list para auto-reindexación.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries full responsibility for behavioral disclosure. It only states that a directory is added to the watch list but does not mention side effects, idempotency, duplicate handling, permission requirements, or whether reindexing starts immediately.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence with no filler. The core action and purpose are front-loaded and every word contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a simple one-parameter tool with an output schema, the description is adequate for basic invocation. However, with no annotations, it lacks details about behavioral side effects and edge cases such as duplicate directories or invalid paths.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It clarifies that 'path' refers to a directory, which adds meaning beyond the raw schema, but it does not specify path format, existence requirements, or whether relative/absolute paths are accepted.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Agrega') and resource ('directorio al watch list') and explains the purpose ('para auto-reindexación'). It clearly differentiates this from siblings like remove_watch_dir and list_watch_dirs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for adding directories to be watched for auto-reindexing, but it does not explicitly state when to prefer it over similar siblings or mention any exclusions. The use case is inferable but not explicitly guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compress_hipocampoA
Compress retrieved memories using a hybrid approach (extractive + LLM).
First searches Hipocampo (SSC v1.0), then compresses the top-k results:
method="extractive": sentence-level keyword relevance (fast, no API cost)
method="llm": summarization via NVIDIA NIM (highest quality, API cost)
method="hybrid" (default): uses LLM for technical/code content, extractive for generic text
Use this tool BEFORE sending context to another LLM to reduce prompt size while preserving critical information.
Args: query: Natural language search query. k: Number of memories to retrieve (default 5, max 20). method: Compression method: "hybrid" (default), "extractive", or "llm". target_token: Target token count (-1 = auto, based on content). include_metadata: Include per-memory details in output. budget_ratio: Scale factor for auto-estimated tokens (default 1.0).
Returns: Compressed context as plain text with compression statistics. Includes: compressed text, original/compressed char counts, ratio, latency.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| method | No | hybrid | |
| budget_ratio | No | ||
| target_token | No | ||
| include_metadata | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral disclosure. It thoroughly explains that the tool first searches Hipocampo, then compresses top-k results, describes method-specific behavior (e.g., API costs, quality differences, hybrid's content-based routing), and lists return values including compression statistics. This exceeds typical transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear intro, method bullets, a usage case, Args, and Returns sections. Every sentence adds value, and the format is easy to scan. It is not overly verbose despite covering complex behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for an agent to select and invoke the tool: it explains the search+compress flow, method choices, parameter effects, and return format. It even includes output details despite the presence of an output schema, making standalone comprehension straightforward.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates with an 'Args' section explaining each parameter's meaning and defaults (e.g., 'k: Number of memories to retrieve (default 5, max 20)', 'target_token: Target token count (-1 = auto...)'). Parameter semantics are significantly enriched beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Compress retrieved memories using a hybrid approach (extractive + LLM)' and explicitly connects it to the workflow ('Use this tool BEFORE sending context to another LLM'). It distinguishes itself from sibling search tools by focusing on compression with retrieval, making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit guidance on when to use the tool ('Use this tool BEFORE sending context to another LLM to reduce prompt size') and details method selection (extractive, llm, hybrid) with tradeoffs. It lacks explicit 'when not to use' or alternative tool references, but the provided context is sufficient for most decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
consolidate_hipocampoA
Consolidación jerárquica: migra memorias episódicas antiguas a semánticas.
Busca recuerdos con nivel 'episodica' más antiguos que min_age_days y los promueve a 'semantica', opcionalmente comprimiendo su contenido.
Args: min_age_days: Edad mínima en días para consolidar (default 7). dry_run: Si True, solo muestra qué se consolidaría.
Returns: Reporte de la consolidación.
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| min_age_days | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses the core behavior (searching, promoting, optional compression) and dry_run functionality, which is valuable given no annotations exist. However, it does not clarify whether the original episodic memories are deleted or preserved, nor the details of compression. This leaves uncertainty about side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is succinct and well-structured with a title, behavior explanation, and Args/Returns sections. Every sentence adds value, and there is no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the main function and parameters, and the presence of an output schema mitigates the need for detailed return info. However, it omits side effects (e.g., whether original memories are removed) and prerequisites, leaving gaps for an agent considering this mutation tool. Given its moderate complexity, it is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds clear semantics for both parameters: min_age_days is 'la edad mínima en días para consolidar' with default 7, and dry_run is explained as showing only what would be consolidated. This directly supplements the schema, which has no property descriptions, making the tool usable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'migra memorias episódicas antiguas a semánticas' (migrates old episodic memories to semantic). This specific verb+resource structure distinguishes it from siblings like compress_hipocampo or set_nivel_hipocampo, which perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives like compress_hipocampo or set_nivel_hipocampo. It describes the process but lacks exclusions or preferred contexts. This leaves the agent to infer usage from the described behavior.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
contradicciones_hipocampoA
Detecta contradicciones semánticas de una memoria existente.
Usa negation-probe embedding: embedea "AFIRMACIÓN: {contenido} — ¿Esto es FALSO según: ..." y compara con el embedding original. Si la distancia de la sonda de negación es MENOR que la del contenido original → señal de contradicción.
Args: memory_id: ID numérico de la memoria en memoria_vectorial.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden, and it explains the negation-probe embedding method, the comparison, and the distance-based contradiction signal. The algorithm strongly implies a read-only detection operation, though side effects are not explicitly addressed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: purpose, method, decision criterion, then arguments. Every sentence contributes useful information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple one-parameter interface, the existence of an output schema, and no annotations, the description covers the tool's purpose, invocation parameter, and behavioral mechanism. Nothing is missing for an agent to select and call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description compensates by documenting memory_id as the numeric ID of the memory in memoria_vectorial. This adds real meaning beyond the integer type in the schema and is sufficient for the single required parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Detecta contradicciones semánticas de una memoria existente.' This clearly identifies a unique detection task separate from the sibling search, update, and maintenance tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context is clear: use this tool when you have a memory_id and need to check an existing memory for semantic contradictions. It does not explicitly name when-not-to-use alternatives, but the unique purpose and required memory_id make the intended usage evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
decay_hipocampoA
Aplica decaimiento temporal a enlaces del grafo Y memorias antiguas.
ENLACES: peso exponencial, half-life 90 días. Elimina enlaces < 0.01. MEMORIAS: archiva episodica sin acceso ni protección a memoria_historica.
Protecciones (nunca se archivan):
nivel = automatica o semantica
metadatos.critico = true
con enlaces entrantes en memory_links
Args: dry_run: True (default) = solo lectura. False = ejecuta cambios. min_age_days: Edad mínima en días para considerar memoria candidata.
Returns: Reporte del decaimiento aplicado.
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| min_age_days | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and largely succeeds: it discloses destructive effects (eliminating links < 0.01, archiving memories), a safety default (dry_run true means read-only), and explicit protected categories. It slightly underplays permanence/reversibility implications and does not explain what 'archives' means operationally, so it is not a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well organized into a one-line summary followed by compact sections for links, memories, protections, args, and returns. Front-loaded with purpose and zero filler, every sentence carries operational information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter, no-annotation tool with an output schema, the description is complete: it covers target scope, thresholds, exclusions/protections, dry-run safety, and return value at a high level. The output schema removes the need to detail the report shape.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the two parameters. It does: dry_run is explained as read-only vs. executing changes, and min_age_days is defined as the minimum age in days for a memory candidate. Minor gaps remain (whether min_age_days applies to links as well, inclusivity of the boundary), so not a 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Aplica decaimiento temporal') on a concrete resource set (graph links and old memories), and details exact behavior for each (exponential weight decay, half-life, eliminating links < 0.01, archiving episodic memories). This is clearly differentiated from sibling operations like delete_hipocampo, consolidate_hipocampo, or hipocampo_maintenance.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended context is implied: use decay_hipocampo to age out old graph links and archive eligible memories. However, it does not explicitly state when to prefer it over sibling tools such as hipocampo_maintenance, consolidate_hipocampo, compress_hipocampo, or delete_hipocampo, nor does it give any when-not-to-use conditions beyond the listed protections.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_hipocampoA
Elimina un recuerdo del Hipocampo (memoria_vectorial) por su ID.
Esta operación es irreversible. Una vez eliminado, el recuerdo no podrá recuperarse ni aparecerá en búsquedas futuras.
Args: id: ID numérico del recuerdo a eliminar.
Returns: Confirmación de eliminación.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of disclosure. It explicitly states the irreversible nature and consequences of deletion ('Esta operación es irreversible. Una vez eliminado, el recuerdo no podrá recuperarse ni aparecerá en búsquedas futuras.'). However, it does not disclose what happens if the ID does not exist or any required permissions, leaving some behavioral aspects implicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, starting with a clear main statement, followed by an important caution, and then organized Args and Returns sections. Every sentence contributes essential details without unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter delete operation, the description covers purpose, irreversibility, parameter semantics, and return type. Since an output schema is present, detailed return structure is not required. A minor gap is the lack of behavior for a non-existent ID, but overall the tool is adequately described.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, but the description compensates fully by explaining the 'id' parameter as 'ID numérico del recuerdo a eliminar.' This adds meaning beyond the schema's simple integer type, clearly identifying what the ID represents and how it is used.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Elimina un recuerdo del Hipocampo (memoria_vectorial) por su ID.' This specifies the verb, resource, and method of operation, and it naturally distinguishes itself from sibling tools like search_hipocampo, update_hipocampo, and decay_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool by emphasizing that the operation is irreversible and the memory cannot be recovered or appear in future searches. This provides clear context for permanent deletion, but it does not explicitly mention alternatives or when not to use it compared to siblings, such as decay_hipocampo for non-destructive adjustments.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
graph_hipocampoB
Explora el grafo de memoria desde un nodo raíz.
Args: node_id: ID del recuerdo raíz. Si es 0, lista todos los nodos con enlaces (vista general). depth: Profundidad de exploración (default 2, max 5). max_nodes: Máximo de nodos a mostrar (default 50).
Returns: Árbol ASCII del grafo de memoria.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| node_id | No | ||
| max_nodes | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the return format (ASCII tree), parameter limits (depth max 5, max_nodes default 50), and node_id=0 behavior. However, it does not explicitly state that the operation is read-only or describe potential side effects or errors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with a clear initial sentence, structured args section, and returns section. Every line earns its place with no redundancy or unnecessary text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a graph exploration tool, the description adequately covers parameters and return format. It lacks usage alternatives and does not explicitly state read-only behavior, but given the output schema and 0% schema coverage, it is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All three parameters are fully explained beyond the schema, including defaults, max constraints, and special behavior for node_id=0. This fully compensates for the 0% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool explores the memory graph from a root node and returns an ASCII tree. It is specific and distinguishable from siblings like search_hipocampo, though it doesn't explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives like search_hipocampo or path_hipocampo. It mentions the special case of node_id=0 for overview but doesn't provide context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_auto_repairA
Intenta reparar automáticamente problemas detectados en el sistema.
Reparaciones posibles:
Reiniciar PostgreSQL si está caído
Crear tablas faltantes desde esquema.sql
Verificar/configurar NVIDIA_API_KEY
Returns: Reporte de reparaciones ejecutadas.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description outlines the tool's actions (restarting PostgreSQL, creating tables, verifying a key) and states it returns a report. Since no annotations are provided, the description carries the full burden. It is adequate but could be improved by indicating that operations like restarting PostgreSQL may cause temporary unavailability or that the tool attempts repairs but does not guarantee success.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It starts with a one-sentence purpose, then uses a bullet list for repair actions, and ends with the return type. Every part is informative without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there are no parameters and an output schema exists, the description covers the essential aspects: what repairs are attempted and what is returned. However, it could be more complete by explaining how the tool detects issues (e.g., from 'hipocampo_health'?) or when an agent should invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the schema already fully defines the interface. The description adds value by listing the specific repair actions, giving an agent context on what the tool will do with no input. This aligns with the baseline of 4 for no-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Intenta reparar automáticamente problemas detectados en el sistema' (attempts to auto-repair detected system issues). It enumerates specific repairs like restarting PostgreSQL, creating missing tables, and verifying NVIDIA_API_KEY. However, it does not differentiate itself from siblings like 'hipocampo_health' or 'hipocampo_maintenance', which could overlap in functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus alternatives. It lists possible repairs but does not specify prerequisites, conditions for use, or scenarios where it should be avoided. Sibling tools like 'hipocampo_health' or 'hipocampo_maintenance' might be more appropriate in certain contexts, but no comparison is made.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_budgetA
Gestiona el presupuesto de memoria (budget + tiering automático).
3 tiers:
HOT: embedding presente (memoria_vectorial con pgvector)
WARM: embedding=NULL (excluido de HNSW, sigue buscable léxicamente)
COLD: contenido movido a memoria_historica (fuera de búsqueda principal)
Protecciones: automatica/semantica/critico/enlazadas → exemptas.
Args: dry_run: True (default) = solo análisis. False = ejecuta tiering.
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure and does it well: it explains the HOT/WARM/COLD states, that COLD content is moved to memoria_historica and removed from main search, and that protected categories are exempt. It does not mention reversibility or authorization requirements, but the main side effects are clearly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, well-organized, and front-loaded. The purpose, tier definitions, exemptions, and parameter behavior are each given clear sections without redundant prose. Every sentence contributes meaningful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core behavior, tier mechanics, exemptions, and the only parameter thoroughly. Since an output schema exists, return-value documentation is not required. It could optionally explain budget thresholds or what triggers automatic tiering, but the provided context is sufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the schema only provides type/default for dry_run. The description fully compensates by explaining that True is the default and means 'analysis only', while False executes the tiering. This is complete, unambiguous parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action ('Gestiona el presupuesto de memoria') and defines the underlying tiering mechanism with HOT/WARM/COLD categories. It distinguishes the tool's domain from general maintenance or search tools, though it does not explicitly name sibling alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The dry_run parameter is explained with actionable guidance: use True for analysis only and False to execute tiering. It also specifies that protected entries are exempt, which helps the agent decide what will be affected. However, it does not explicitly state when to prefer this tool over sibling tools like hipocampo_maintenance or compress_hipocampo.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_checkpointA
Comprime memorias antiguas usando checkpointing logarítmico.
Con dry_run=True (default) es solo lectura — seguro, no modifica datos. Con dry_run=False es destructivo: comprime memorias antiguas de forma irreversible (las originales se eliminan tras comprimir). Idempotente: ejecutar múltiples veces no daña datos.
Para ejecutar checkpoint como parte del ciclo completo de mantenimiento, usar hipocampo_maintenance (paso 3 del ciclo). Esta herramienta es para ejecución puntual o previsualización.
Recomendado ejecutar periódicamente (semanal o mensual) para mantener el rendimiento del sistema.
Args: dry_run: Si es True (default), solo muestra qué se comprimiría. Si es False, ejecuta la compresión (irreversible).
Returns: Reporte del checkpointing ejecutado o simulado. Incluye: cantidad de registros comprimidos, espacio liberado.
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description fully discloses safety: dry_run=true is read-only, dry_run=false is destructive and irreversible (original files deleted). It also states idempotency, which adds important behavior beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with paragraphs for safety, usage, and args/returns sections. Every sentence adds value, from the log-checkpointing concept to the periodic maintenance recommendation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter tool with an output schema, the description is complete: it explains purpose, usage context, behavioral safety, parameter effect, and return value (report with count and freed space). No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
While input schema only defines dry_run as a boolean with default, the description explains the semantic difference: True shows what would be compressed, False executes irreversible compression. This fully compensates for the 0% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Comprime memorias antiguas usando checkpointing logarítmico' with a specific verb and resource. It also distinguishes from hipocampo_maintenance by noting this tool is for standalone execution or preview, giving clear sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'Para ejecutar checkpoint como parte del ciclo completo de mantenimiento, usar hipocampo_maintenance (paso 3 del ciclo). Esta herramienta es para ejecución puntual o previsualización.' This gives a clear when-to-use and alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_dedupA
Detecta y opcionalmente fusiona duplicados en las tablas de memoria.
Con merge=False (default) es solo lectura — seguro de ejecutar, no modifica datos. Con merge=True es destructivo: consolida filas duplicadas en una sola, operación irreversible. Usar con precaución. Ejecutar primero sin merge para previsualizar.
¿Qué es un duplicado? Dos registros con alta similitud semántica (embedding
texto), por encima del umbral configurable (default 0.95).
El reporte incluye: cantidad de duplicados encontrados, IDs afectados y resumen de fusión si se ejecutó merge.
Para ejecutar dedup como parte del ciclo completo de mantenimiento, usar hipocampo_maintenance (paso 2 del ciclo). Esta herramienta es para uso puntual o previsualización antes del merge.
Args: merge: Si es True, fusiona los duplicados encontrados (irreversible). Si es False (default), solo muestra análisis (seguro).
Returns: Reporte de duplicados encontrados o fusionados.
| Name | Required | Description | Default |
|---|---|---|---|
| merge | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses that merge=False is read-only and safe, while merge=True is destructive and irreversible. It also defines what constitutes a duplicate (embedding+text similarity above 0.95) and outlines report contents, providing behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured into short paragraphs: purpose, safety modes, definition, report contents, and usage guidance. Every sentence adds distinct value with no redundancy, making it appropriately sized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with an output schema, the description covers purpose, safety, duplicate definition, report contents, and relationship to sibling tools. It leaves no significant gaps for an agent to invoke and interpret results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'merge' is fully explained in the description: False (default) is analysis-only and True merges irreversibly. Since the schema provides no description for the parameter, this explanation fills the gap entirely.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'Detecta y opcionalmente fusiona duplicados en las tablas de memoria' – a clear verb+resource. It further distinguishes from hipocampo_maintenance by noting this tool is for 'uso puntual o previsualización antes del merge', which differentiates it from that sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'Para ejecutar dedup como parte del ciclo completo de mantenimiento, usar hipocampo_maintenance' and advises 'Ejecutar primero sin merge para previsualizar', giving clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_healthA
Ejecuta un health check completo del sistema Hipocampo.
Verifica: PostgreSQL, NVIDIA API, tablas, espacio en disco, extensiones.
Returns: Reporte formateado del estado del sistema.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It lists checked components and states a formatted report is returned, suggesting a read-only operation, but does not explicitly confirm no side effects, authentication needs, or failure behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with two sentences, a bullet list, and a clear return statement. Every part is necessary and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero required parameters and an existing output schema, the description covers the tool's purpose, checks, and output format adequately. It lacks details on execution mode (sync/async) or error handling, but is sufficient for its simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so the description does not need to elaborate. The baseline is 4 for zero-parameter tools, and the description adds context about what the health check verifies, which is acceptable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it executes a complete health check of the Hipocampo system, lists specific components checked (PostgreSQL, NVIDIA API, tables, disk space, extensions), and mentions the return format. This distinguishes it from siblings like hipocampo_auto_repair.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The purpose implies it's for health checks, but there is no mention of when not to use it or which sibling to choose for specific tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_maintenanceA
Ejecuta el ciclo completo de mantenimiento:
Health check → auto-repair si es necesario
Dedup → fusiona duplicados
Checkpoint → comprime memorias antiguas
Purge → limpia access logs antiguos (>30d)
Tune → ajusta thresholds según métricas
Nota: hipocampo_budget y decay_hipocampo se ejecutan manualmente o via cron separado (son destructivos y requieren dry_run previo).
Returns: Reporte consolidado del mantenimiento.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It discloses concrete side effects for each step: auto-repair if needed, merges duplicates, compresses old memories, purges access logs >30d, and adjusts thresholds. It also states the return value is a consolidated report. It doesn't mention whether the overall operation is reversible or if confirmation is required, but the enumerated behaviors provide solid transparency for a maintenance tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized: a header sentence, a numbered list of steps, a cautionary note, and a return statement. Every sentence earns its place, with no redundancy or extraneous detail. The structure makes it easy to scan and parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with an output schema, the description covers the full behavior, including sub-steps, exclusions, and return value. It clearly separates this tool from two destructive sibling operations. There are no missing prerequisites, parameters, or critical caveats needed for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero properties and schema description coverage is 100%, so there are no parameters to document. Per the zero-parameter baseline, the description need not add parameter semantics. The description focuses on behavior, which is appropriate here.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Ejecuta el ciclo completo de mantenimiento' and enumerates five concrete steps (health check, dedup, checkpoint, purge, tune), each mapping to specific behaviors. It clearly distinguishes itself as the composite maintenance operation, and the note about budget/decay reinforces what the tool is not. This is a specific verb+resource with strong sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly lists the maintenance steps and then provides a cautionary note: 'hipocampo_budget y decay_hipocampo se ejecutan manualmente o via cron separado (son destructivos y requieren dry_run previo).' This tells the agent when to use this tool (full maintenance cycle) and when not to use it for those destructive operations, naming the alternatives directly. It gives clear context and exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_statsA
Muestra estadísticas de rendimiento del sistema Hipocampo.
Analiza latencia de queries, métodos usados, scores promedios y da recomendaciones de optimización.
Returns: Reporte de métricas y recomendaciones.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions analyzing stats and giving recommendations but does not specify if the tool is read-only, requires authentication, or has rate limits. The behavioral profile is incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, with a clear opening statement and bullet-like details. Every sentence contributes meaningful information, and it is appropriately front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and an existing output schema, the description adequately covers the tool's purpose and return values. It is complete for a statistics-gathering tool with no inputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so the baseline is 4. The description adds value by detailing what is analyzed (latency, methods, average scores) and the output (report with recommendations), which goes beyond the empty input schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool shows performance statistics and analysis of queries, methods, and scores, and provides optimization recommendations. It differentiates from sibling tools like health, tune, etc., by focusing on performance metrics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for performance analysis but does not explicitly state when to use this tool versus alternatives like hipocampo_health or hipocampo_tune. No exclusions or contextual advice are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hipocampo_tuneA
Ajusta automáticamente los thresholds y pesos del SSC basado en las métricas de rendimiento acumuladas.
Es destructivo: modifica los thresholds y pesos de forma irreversible. Sin embargo, es idempotente: ejecutarlo múltiples veces converge al mismo resultado. Usar con precaución.
Para solo ver estadísticas sin modificar nada, usar hipocampo_stats (solo lectura). Para ejecutar el ciclo completo de mantenimiento (que incluye tune como paso 5), usar hipocampo_maintenance.
Recomendado ejecutar solo después de acumular suficientes métricas (al menos 100 consultas registradas). No usar si el sistema funciona correctamente sin degradación.
Returns: Reporte de ajustes aplicados (nuevos thresholds y pesos).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It openly states that the tool is destructive ('modifica los thresholds y pesos de forma irreversible') and idempotent ('ejecutarlo múltiples veces converge al mismo resultado'), and advises caution. This is substantial transparency beyond the bare minimum.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. It front-loads the main purpose, then adds safety warnings, alternative tools, and specific usage conditions. Each sentence contributes value, with no redundant information. The length is appropriate given the destructive nature of the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers all essential aspects: what the tool does, its irreversible side effects, when to use it, when not to use it, alternatives, and what it returns. Given the empty input schema and presence of an output schema, this is complete. It effectively compensates for missing annotations by providing all necessary behavioral context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero input parameters, so the baseline score is 4. The description does not need to document parameter semantics, as there are none. It briefly mentions the internal 'thresholds y pesos' being tuned, which adds context but is not required for parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Ajusta automáticamente los thresholds y pesos del SSC basado en las métricas de rendimiento acumuladas.' It uses a specific verb and resource, and explicitly distinguishes itself from siblings like hipocampo_stats (read-only) and hipocampo_maintenance (full cycle). This makes the purpose unambiguous and well-differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use and when not to use: 'Recomendado ejecutar solo después de acumular suficientes métricas (al menos 100 consultas registradas)' and 'No usar si el sistema funciona correctamente sin degradación.' It also names alternatives: hipocampo_stats for read-only viewing and hipocampo_maintenance for the full maintenance cycle, giving clear context and exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
index_projectA
Indexa archivos de código fuente de un proyecto en Hipocampo (RAG).
Escanea archivos PHP, JS, TS, Python, SQL, HTML, CSS, JSON, YAML, los divide en chunks significativos y los guarda como recuerdos con embedding para búsqueda semántica.
La segunda corrida solo indexa archivos modificados (por mtime).
Args: project_path: Ruta absoluta del proyecto a indexar. Si está vacía, usa el directorio actual. force: Si True, re-indexa todo aunque no haya cambios.
Returns: Estadísticas de la indexación.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| project_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the transparency burden. It discloses that it scans specific file types, creates memory embeddings, and supports incremental updates. It does not detail all side effects like overwriting existing memories, but provides substantial behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear intro, incremental behavior note, args, and returns sections. Each sentence provides necessary information without unnecessary verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core functionality, parameters, and incremental logic. It does not explain potential edge cases like ignored directories or interaction with other Hipocampo tools, but given the output schema exists, the return value is adequately specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description fully compensates by explaining both parameters: project_path defaults to the current directory, and force triggers a full re-index. This adds meaning beyond the schema's type/default fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool indexes source code files into Hipocampo RAG, specifying file types and the chunking/embedding process. This distinguishes it from sibling tools like search_code or save_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides usage context by explaining the incremental mtime-based behavior on second runs and the purpose of the force parameter. However, it does not explicitly mention alternatives or exclusions relative to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
link_hipocampoB
Crea un enlace entre dos recuerdos en el grafo de memoria.
Args: source_id: ID del recuerdo origen (numérico: memoria_vectorial; string: memory_items). target_id: ID del recuerdo destino. relation_type: Tipo de relación. Valores comunes: "related" (default), "follow_up", "part_of", "references", "similar", "chain", "validates", "contradicts". weight: Peso de la relación (0.0 a 1.0, default 1.0).
Returns: Confirmación del enlace creado.
| Name | Required | Description | Default |
|---|---|---|---|
| weight | No | ||
| source_id | Yes | ||
| target_id | Yes | ||
| relation_type | No | related |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. While it states the action (creating a link) and the return value (confirmation), it does not mention potential side effects, whether the operation is destructive, if existing links are replaced, or any permission requirements. This is insufficient for a mutation tool without annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a one-sentence summary followed by an Args list and a Returns note. Each piece of information is useful and not redundant with the schema, given the schema lacks descriptions. It could be slightly tighter by moving the relation_type values to the schema, but the current format is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 parameters and an output schema, the description covers all necessary aspect: what it does, all arguments, and the return type. The parameter explanations are thorough, and the return value is stated as a confirmation. The only missing context is edge-case behavior (e.g., invalid IDs, duplicate links), but given the simplicity and output schema, this is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds substantial meaning beyond the raw schema. It explains each parameter: source_id and target_id with their types (numeric vs string), relation_type with common values and the default 'related', and weight with a valid range and default. This fully compensates for the schema's 0% description coverage, making the parameters clear and actionable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Crea un enlace entre dos recuerdos en el grafo de memoria' (Creates a link between two memories in the memory graph). This is a specific verb+resource combination that is easy to understand. However, it does not explicitly distinguish itself from related sibling tools like unlink_hipocampo, so it lacks sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It only defines what the tool does, without mentioning appropriate contexts, exclusions, or references to alternative tools. This leaves the agent to infer usage from the tool's name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_watch_dirsB
Lista los directorios configurados para auto-reindexación.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It accurately conveys a read-only listing operation, but it does not explicitly state that it makes no changes or how the configured directories are sourced; the output schema presumably covers the return shape.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, tightly written sentence that front-loads the action and object. Every word contributes to the meaning, and there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-parameter listing tool with an output schema, the description is largely adequate. However, the sibling set contains several watch-related tools such as list_watches and watch_hipocampo, and the definition does not disambiguate when list_watch_dirs is the appropriate choice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is no parameter ambiguity to resolve. With an empty properties schema and 100% schema coverage, the description does not need to add parameter-level meaning, and the baseline of 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the verb 'Lista' and the specific resource 'directorios configurados para auto-reindexación', making the tool's function clear. It is distinguishable from similar siblings like list_watches by the auto-reindexation scope, though it does not explicitly name or contrast that sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is given about when to use this tool versus list_watches, add_watch_dir, remove_watch_dir, or watch_hipocampo. The phrase 'para auto-reindexación' implies a context, but there is no direct when-to-use or when-not-to-use statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_watchesA
Lista todos los webhooks registrados.
Returns: Lista de watches con ID, patrón y URL.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. The phrase 'Lista todos' indicates a read-only action, but it does not explicitly state the absence of side effects, authentication needs, or any other behavioral traits such as pagination or ordering. The description adds minimal context beyond the obvious.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, using two short sentences and a return list. Every word adds value: it states the action, the object (webhooks), and the return format (ID, pattern, URL). No redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (zero parameters) and the presence of an output schema, the description fully covers the tool's purpose and expected return. It is complete and self-contained, making it easy for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is fully covered by the empty properties object. Per the rubric, a zero-parameter tool baselines at 4, and the description correctly omits any parameter details since none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool lists all registered webhooks ('Lista todos los webhooks registrados') and specifies the return fields (ID, pattern, URL). This is a specific verb+resource combination that differentiates it from sibling tools like watch_hipocampo (which adds a watch) and unwatch_hipocampo (which removes one).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving all webhooks but does not explicitly state when to use this tool versus alternatives, nor does it mention any exclusions or prerequisites. For a simple listing tool, the context is somewhat clear, but explicit guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
path_hipocampoA
Encuentra el camino más corto entre dos recuerdos en el grafo de memoria.
Args: from_id: ID del recuerdo origen. to_id: ID del recuerdo destino. max_depth: Profundidad máxima de búsqueda (default 5, max 10).
Returns: Camino encontrado como secuencia de nodos.
| Name | Required | Description | Default |
|---|---|---|---|
| to_id | Yes | ||
| from_id | Yes | ||
| max_depth | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure. It provides useful limits (max_depth default/max) and return format, but it does not mention whether the operation is read-only, what happens when no path exists, or any side effects. It offers some behavioral context but has gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a one-sentence purpose, then parameter definitions, then return statement. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the description covers purpose, parameters, and return value (and an output schema exists), it leaves important behavior unstated, such as behavior when no path is found, whether max_depth is inclusive, and whether the graph is weighted. For a pathfinding tool, these are significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only types and titles with zero description coverage. The description compensates fully by defining each parameter: from_id (origin memory), to_id (destination memory), and max_depth with default and max. This adds essential semantic meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool finds the shortest path between two memories in the memory graph, naming the specific resource and operation. However, it does not explicitly distinguish it from sibling search tools, so it misses the top score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool should be used when a shortest path between two memory nodes is needed, but it provides no explicit guidance on when to prefer this over sibling tools like search_hipocampo or graph_hipocampo.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
preload_contextA
Pre-load context for a project or workspace. Extracts relevant memories from the project path and returns them as a compressed summary.
Use this when starting work on a known project to restore working context.
Args: project_path: Absolute path to the project or workspace. If empty, uses current working directory. k: Number of relevant memories to retrieve (default 8, max 20).
Returns: Compressed context summary with project-relevant memories.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| project_path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the extraction and compression behavior, and the default path behavior for project_path. However, it does not explicitly state whether the operation is read-only or if there are any side effects, permissions, or prerequisites, leaving some ambiguity for such a memory-related tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: opening purpose sentence, a usage guideline sentence, a clear Args list, and a Returns statement. Every sentence serves a purpose with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (2 optional params, no required), and the description covers purpose, usage, parameters, and return value. It does not discuss error cases, prerequisites like existing memories, or permissions, but for a read-like preload operation this is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully compensates with a dedicated 'Args' section explaining both parameters: project_path (absolute path, defaults to cwd) and k (number of memories, default 8, max 20). This adds meaning far beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Pre-load context for a project or workspace' and 'Extracts relevant memories... returns them as a compressed summary.' It uses a specific verb and resource, and the phrase 'starting work on a known project to restore working context' distinguishes it from sibling search tools (e.g., search_hipocampo).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this when starting work on a known project to restore working context,' providing a clear usage context. It does not mention exclusions or alternative tools, but the context is specific enough to guide selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
profile_hipocampoA
Guarda un dato de perfil personal en Hipocampo (memory_items).
A diferencia de save_hipocampo (que guarda en memoria_vectorial técnica), esta herramienta guarda en memory_items, que está diseñado para datos personales: gustos, familia, preferencias, datos biográficos.
Args: summary: Texto corto con el dato personal. Ej: "Al usuario le gusta el té de hierbas". extra: Información adicional en texto plano (opcional). categories: Categorías (opcional). Ej: ["personal_info", "gustos"].
Returns: Confirmación con el ID asignado.
| Name | Required | Description | Default |
|---|---|---|---|
| extra | No | ||
| summary | Yes | ||
| categories | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It explains that the tool saves data in memory_items and the type of data, but it does not mention whether updates overwrite or append, or any side effects. For a basic save operation, the explanation is adequate but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two paragraphs with front-loaded purpose and differentiation. It is efficient but slightly verbose with the Spanish phrasing; however, every sentence adds value. Minor improvement could be more brevity, but overall well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 3 parameters, no enums, and an output schema (implied by the return description). The description covers usage, parameter semantics, and return value ('Confirmación con el ID asignado'). For a simple save tool, it is complete and leaves no critical gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It fully explains each parameter: summary as a short personal data text with an example, extra as optional additional plain text, and categories as optional categories with an example. This adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool saves personal profile data in Hipocampo's memory_items. It uses a specific verb ('guarda') and resource ('dato de perfil personal'), and explicitly distinguishes it from the sibling save_hipocampo, which stores technical vector memory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit when-to-use guidance by contrasting with save_hipocampo, noting that this tool is for personal data (gustos, familia, preferencias, datos biográficos). It clearly indicates the context where this tool should be chosen over its sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
quick_hipocampo_searchA
Búsqueda rápida en el Hipocampo (alias corto de search_hipocampo).
Es solo lectura — no modifica datos, no tiene efectos secundarios. Comportamiento y salida idénticos a search_hipocampo.
Útil cuando el cliente MCP prefiera nombres de herramienta más cortos. Para nombre descriptivo, usar search_hipocampo.
Args: query: Texto de búsqueda en lenguaje natural. Igual que search_hipocampo. Ej: "API REST en Python", "presupuesto". session_id: Opcional. Filtra resultados a una sesión específica.
Returns: Mismo formato que search_hipocampo: resultados como texto plano con scores de relevancia y metadatos.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| session_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the transparency burden. It states the tool is read-only, has no side effects, and behaves identically to search_hipocampo. It also describes the return format as plain text with relevance scores and metadata, which is rich behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections for behavior, usage, args, and returns. While somewhat verbose, every sentence contributes useful information, and the organization makes it easy to scan. Minor redundancy exists between 'Comportamiento y salida idénticos' and 'Mismo formato...'.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is an alias, and the description fully covers purpose, when to use it, behavior, parameters, and return format. It appropriately references search_hipocampo for the full behavior, which is acceptable given the alias relationship. There is no output schema shown, but the return description is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no descriptions for the parameters. The description compensates by explaining that 'query' is natural language search text with examples, and 'session_id' is optional to filter to a specific session. This adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states this is a quick search tool in Hipocampo and explicitly identifies it as a short alias for search_hipocampo. The verb 'search' and resource 'Hipocampo' are specific, and it distinguishes itself from other sibling tools by referencing the canonical tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells when to use this tool: when the MCP client prefers shorter tool names. It also directs to the alternative, search_hipocampo, for a more descriptive name. This provides clear when/alternative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reindex_nowB
Fuerza reindexación inmediata de un directorio (o todos los watch).
| Name | Required | Description | Default |
|---|---|---|---|
| path | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No hay anotaciones, así que la descripción es la única fuente de comportamiento. 'Fuerza reindexación inmediata' y '(o todos los watch)' comunican que la operación es forzosa, inmediata y puede abarcar todos los watch, pero no se mencionan efectos secundarios, coste o si requiere permisos específicos.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Una sola frase sin palabras de relleno. La información principal (acción forzosa, inmediatez, alcance directorio/todos los watch) está al frente y cada elemento aporta.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Para una herramienta de un solo parámetro opcional con output schema, la descripción es casi suficiente a nivel de invocación: define qué reindexa y el alcance. Falta aclarar si el directorio debe ser un watch existente, qué ocurre con una ruta inválida, y no hay guía de uso frente a herramientas hermanas.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Con 0% de cobertura en el schema, la descripción compensa en parte: indica que la operación se aplica a un directorio y que, en lugar de un directorio concreto, puede aplicarse a todos los watch, lo que da sentido al path opcional y a su default vacío. No relaciona explícitamente el nombre del parámetro 'path' con ese directorio.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
La descripción usa un verbo concreto ('Fuerza reindexación inmediata') y un recurso específico ('un directorio (o todos los watch)'), por lo que un agente entiende la acción y el alcance. No diferencia explícitamente de herramientas hermanas como hipocampo_maintenance o index_project, por eso no alcanza el 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No indica cuándo usar esta herramienta frente a las alternativas hermanas, ni excluye casos de uso. Solo se puede inferir que el caso de uso es una reindexación inmediata, pero no hay mención de condiciones, prerrequisitos ni cuándo no usarla.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
remove_watch_dirA
Elimina un directorio del watch list.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description carries the full burden of behavioral disclosure. It only says the directory is removed from the watch list; it does not mention whether the operation is persistent, idempotent, or what happens if the path is not currently watched.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single short sentence conveys the core action with no filler or repetition. The essential information is front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with an output schema, the description is mostly complete: the agent knows what action to take and what parameter to provide. It would benefit from a little more behavioral context, but the simplicity of the tool keeps the gap small.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It clarifies that 'path' refers to a directory in the watch list, but it does not specify path format, absolute vs relative, or behavior for invalid paths. This is minimal but non-redundant value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Elimina'), a clear resource ('directorio del watch list'), and is immediately distinguishable from sibling tools like add_watch_dir and list_watch_dirs. There is no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied: use this when a directory should no longer be watched. However, the description provides no explicit guidance on when to prefer it over alternatives such as unwatch_hipocampo, nor does it mention prerequisites or edge cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
restaurar_historicaA
Restaura una memoria desde memoria_historica a memoria_vectorial.
Reconstruye embedding automáticamente. La memoria vuelve al tier HOT.
Args: historica_id: ID de la memoria en memoria_historica.
| Name | Required | Description | Default |
|---|---|---|---|
| historica_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure itself. It does reveal that the embedding is automatically reconstructed and the memory moves to the HOT tier. It does not mention whether the historical copy is deleted, whether the operation is idempotent, or what side effects may occur, leaving some important gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and information-dense: three short sentences convey the action, the source/destination, the automatic embedding reconstruction, and the resulting tier. The Args line is necessary because the schema gives no parameter description, so every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with an output schema, the core operation and expected behavior are adequately described. Minor gaps remain, such as failure behavior and whether the source memory is retained or removed, but these are secondary for this low-complexity tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides only an integer type with zero description coverage. The description fully compensates by explaining that historica_id is 'ID de la memoria en memoria_historica,' which gives the agent the precise meaning needed to supply this required parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Restaura una memoria desde memoria_historica a memoria_vectorial.' It also adds distinctive behavior details — automatic embedding reconstruction and return to the HOT tier — that clearly separate it from the many hipocampo sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when a memory is in memoria_historica and needs to be restored to the HOT tier. However, it provides no explicit alternatives, exclusions, or comparison with related operations like rollback_checkpoint or consolidate_hipocampo.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
review_automaticaA
Revisa reglas 'automatica' sin revisión en los últimos N días.
Las reglas automatica son permanentes por diseño, pero pueden degradarse a 'semantica' si no han sido útiles (review_count=0) después de max_age_days.
Con dry_run=True solo lista las reglas candidatas a degradación. Con dry_run=False las degrada a 'semantica' (no se borran, solo pierden inmunidad de compresión).
Args: max_age_days: Edad máxima sin revisión antes de considerar degradación (default 30). dry_run: Si True, solo muestra qué se degradaría.
Returns: Reporte de reglas encontradas.
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| max_age_days | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It explicitly discloses that dry_run=False degrades rules to 'semantica', that rules are not deleted, and that they lose compression immunity. This covers the main side-effects and mutation behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an intro, explanation, args, and returns. Each sentence serves a purpose; no fluff. The dry-run behavior is repeated in prose and args for clarity, but not excessively.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains the rule lifecycle (permanent vs degradable), the condition for degradation (review_count=0 after max_age_days), and the effect of degradation. Since an output schema exists, return values are covered. It is complete for this tool's scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It clearly explains both parameters: 'max_age_days' as age threshold and 'dry_run' as toggle between listing and actually degrading. This adds meaningful semantics beyond the schema's titles and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Revisa reglas automatica') and the specific resource ('reglas automatica sin revisión'), and explains the additional degradation behavior. It distinguishes from siblings by focusing on automatica rules and their lifecycle.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clear context is provided: use this to review automatica rules not reviewed in N days and potentially degrade them if review_count=0. No explicit alternatives or exclusions are mentioned, but the trigger conditions are well-explained.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rollback_checkpointA
Revierte un checkpoint usando el snapshot guardado previamente.
Busca el snapshot por ID y verifica qué IDs originales fueron comprimidos. Si los originales aún existen, reporta que no se necesita rollback. Si fueron eliminados, intenta restaurarlos.
Args: snapshot_id: ID del snapshot [CHECKPOINT SNAPSHOT] guardado.
Returns: Reporte de la operación de rollback.
| Name | Required | Description | Default |
|---|---|---|---|
| snapshot_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the decision logic: checks if originals exist, reports no rollback, or attempts to restore. However, it does not state whether the operation is destructive, any side effects, or failure handling, leaving gaps in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, using a brief paragraph and an ordered Args/Returns structure. It provides necessary detail without unnecessary length, though a bit more structure could improve scannability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter tool with an output schema, the description covers the main process and return value. However, absence of annotations means safety/error context is missing, and the description does not explicitly mention permissions or potential failures, leaving completeness slightly incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description defines snapshot_id as 'ID del snapshot [CHECKPOINT SNAPSHOT] guardado,' adding meaningful context beyond the schema's bare integer type. This compensates well for the lack of property descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Revierte un checkpoint usando el snapshot guardado previamente' and details the rollback process. This distinguishes it from sibling tools like compress_hipocampo and delete_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by explaining when rollback is needed (when original IDs were compressed and deleted), but it does not explicitly mention alternatives or exclusion conditions. It provides context but lacks direct 'when to use' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save_hipocampoA
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.
Returns: Confirmación con el ID asignado.
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| force | No | ||
| nivel | No | episodica | |
| content | Yes | ||
| critico | No | ||
| auto_link | No | ||
| categories | No | ||
| session_id | No | ||
| memory_type | No | event |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and delivers: it discloses that the insert is non-blocking, the embedding is backfilled in background (_finalize_save_bg), the memory is temporarily WARM with embedding=NULL yet text-recoverable, trigram dedup skips unless force=True, semantic dedup >0.9 only logs, and critico grants lifetime protection. This goes far beyond what the schema or annotations would reveal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The layout is clear: one-line purpose, behavior overview, then labeled Args block and a Returns line. Slight redundancy exists — auto-link and dedup appear both in the opening background-task list and again in the parameter notes — but the length is earned given 9 undocumented parameters in the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 9-parameter write tool with no annotations and 0% schema description coverage, the description covers purpose, asynchronous behavior, all parameter semantics, dedup edge cases, protection semantics, and the return value (confirmation with assigned ID). The presence of an output schema means return details needn't be spelled out further; little that an agent needs to invoke this correctly is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates by documenting all 9 parameters: memory_type with enumerated meanings ('event', 'decision', 'profile'), code/categories with concrete example values, nivel with the three hierarchy levels and their semantics, plus the behavioral meaning of force and auto_link. Every parameter in the schema is explained with meaning beyond its type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the verb and resource explicitly: 'Guarda un recuerdo en el Hipocampo (memoria_vectorial)' — save a memory to the vectorial memory store. The opening also distinguishes the behavior (immediate non-blocking INSERT with background embedding) from any read/update sibling, so an agent can tell save_hipocampo apart from search_hipocampo, update_hipocampo, or link_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is strongly implied — this is the primary write path for persisting a new memory — and it explains when a save is skipped (existing near-identical trigram, unless force=True). However, it never names alternatives or states when-not-to-use, e.g., when to update an existing memory via update_hipocampo rather than re-saving, so the agent must infer sibling differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeA
Busca código fuente indexado en Hipocampo (RAG).
Similar a search_hipocampo pero filtra solo recuerdos de tipo code_snippet y devuelve fragmentos de código real con ubicación de archivo.
Args: query: Consulta en lenguaje natural. k: Número de resultados (default 5, max 20). language: Filtrar por lenguaje (php, javascript, python, sql, etc.). Vacío = todos los lenguajes.
Returns: Fragmentos de código relevantes con metadatos de archivo.
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | ||
| query | Yes | ||
| language | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It details the filtering mechanism (only code_snippet type), the return payload (real code fragments with file location), and parameter constraints (k max 20, language filter). However, it stops short of describing error conditions, authentication requirements, or whether the operation is read-only, which a search tool might safely assume.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, using an Args/Returns format. Every sentence adds value: purpose, comparison, parameters, and return type. No redundant or filler language is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the tool's purpose, usage context relative to siblings, all parameters, and return value shape. The existence of an output schema reduces need for describing return structure further. Minor gaps like potential errors or rate limits are not addressed, but for a read-only search tool this seems adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Although the JSON schema provides no descriptions (0% coverage), the tool description compensates by explaining each parameter: query as natural language, k for result count with default and max, language as optional filter with examples (php, javascript, python, sql). This fully resolves parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Busca código fuente indexado en Hipocampo (RAG)', clearly stating it searches indexed source code. It further distinguishes from sibling search_hipocampo by specifying it filters code_snippet memories and returns code fragments with file location, making the tool's purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly compares to search_hipocampo ('Similar a search_hipocampo pero...'), indicating this tool is for code-specific searches while the sibling handles broader memory types. It provides context on filtering behavior but does not offer explicit 'when not to use' scenarios, so it earns a 4 rather than 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_hipocampoA
Busca en el Hipocampo (memoria dual con SSC / BIRE v3.6).
Es solo lectura — no modifica datos, no tiene efectos secundarios. Sin límites de tasa (rate limits).
Realiza búsqueda semántica + léxica híbrida en las bases de datos de memoria del usuario, incluyendo memoria técnica (memoria_vectorial) y de perfil (memory_items).
Si se proporciona session_id, filtra solo memorias de esa sesión.
Para búsquedas rápidas cuando el nombre corto sea preferido, usar quick_hipocampo_search (alias idéntico). Esta herramienta es la versión completa con nombre descriptivo.
Args: query: Texto de búsqueda en lenguaje natural. Máximo 500 caracteres. Ejemplos: "proyecto contable", "perro", "planta medicinal", "API REST en Python", "gusta del té". session_id: Opcional. Filtra resultados a una sesión específica.
Returns: Resultados formateados del BIRE como texto plano. Incluye: contenido encontrado, scores de relevancia, y metadatos. Si no hay coincidencias, indica búsqueda exitosa pero sin resultados.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| session_id | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description fully carries the behavioral disclosure: read-only, no side effects, no rate limits, hybrid search over technical and profile memory, and explicit return format including no-match behavior. This exceeds typical transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear opening, behavioral notes, alias note, and dedicated Args/Returns sections. Every sentence provides value, and it remains reasonably compact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, the description covers purpose, usage, behavior, parameters, and return format. The output schema also exists, but the description still summarizes the return values, making it fully self-contained and contextually complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, but the description's Args section fully explains query as natural language text with a 500-character max and examples, and session_id as an optional filter. This adds substantial meaning beyond the schema's bare types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Busca en el Hipocampo' and elaborates 'Realiza búsqueda semántica + léxica híbrida en las bases de datos de memoria del usuario', clearly identifying the verb, resource, and scope. It also distinguishes this tool from the alias quick_hipocampo_search and other memory tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states the read-only nature and no rate limits, providing a safe-search context. It names the alternative quick_hipocampo_search for quick calls with a short name, and explains the session_id filtering condition, giving clear when-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_nivel_hipocampoA
Cambia el nivel jerárquico de un recuerdo.
Niveles:
"episodica" — detalle completo, comprimible por checkpoint
"semantica" — conocimiento consolidado, protegido de compresión
"automatica" — regla permanente, nunca se comprime/checkpointea
Args: id: ID del recuerdo. nivel: Nuevo nivel: "episodica", "semantica", o "automatica".
Returns: Confirmación del cambio.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| nivel | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing behavioral traits. It explains the behavioral consequences of each level (e.g., episodica is comprimible, semantica is protected, automatica is never compressed), which adds valuable context beyond the schema. It does not detail error handling or reversibility, but the core behavior is well covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: a one-sentence purpose, a bulleted list of levels with explanations, followed by Args and Returns sections. It is concise with no unnecessary words, and every sentence provides meaningful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple setter tool, the description is fairly complete: it explains the levels, parameters, and return value. It could be more complete by mentioning handling of invalid IDs or invalid nivel values, but the explicit enumeration of valid nivel values mitigates one of these gaps. Overall, it is adequate for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no property descriptions (0% coverage). The description fully compensates by explaining both parameters: 'id' as the memory ID and 'nivel' as the new level, explicitly listing all valid values. This provides complete semantic meaning for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Cambia') and resource ('nivel jerárquico de un recuerdo'). It distinguishes itself from sibling tools by focusing specifically on changing hierarchical levels, which is a unique operation compared to siblings like compress_hipocampo or update_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context by explaining the three levels (episodica, semantica, automatica) and their compression/checkpoint implications, which implies when each level might be appropriate. However, it does not explicitly mention when to use this tool versus alternatives or any exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unlink_hipocampoB
Elimina un enlace del grafo de memoria.
Args: id: ID del enlace a eliminar (si se conoce). source_id: Si no se provee id, elimina por source+target+type. target_id: ID destino (requerido si no hay id). relation_type: Tipo de relación (opcional si no hay id).
Returns: Confirmación de eliminación.
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| source_id | No | ||
| target_id | No | ||
| relation_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description states that the tool deletes a link and returns a confirmation, but with no annotations, the burden is on the description to disclose behavioral traits. It does not mention side effects, whether deletion is permanent, permission requirements, or behavior when the link does not exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with a clear one-line purpose, an Args section, and a Returns section. Each sentence is informative and there is no unnecessary filler, though the format could be slightly more compact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the common invocation modes (by id or by source/target/type) and the return value, but it lacks edge-case behavior such as what happens if both id and source_id are provided, or if neither is provided. It also does not explain how this tool fits within the broader tool set for graph manipulation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Given zero description coverage in the schema, the description effectively explains each parameter's role and the conditional logic (id vs source_id+target_id+relation_type). This adds significant meaning beyond the schema's titles and defaults, though it could clarify whether source_id is required when id is absent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Elimina un enlace' = deletes a link) and the resource ('grafo de memoria' = memory graph). This distinguishes it from sibling tools like delete_hipocampo, which likely deletes nodes, and link_hipocampo, which creates links.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides conditional parameter guidance (use id if known, otherwise source+target+type) but does not explicitly discuss when to use this tool versus alternatives like delete_hipocampo or other graph operations. There is no mention of prerequisite conditions or contexts where this tool is preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unwatch_hipocampoB
Elimina un webhook registrado por su ID.
Args: id: ID del watch a eliminar.
Returns: Confirmación de eliminación.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the tool deletes a webhook and returns a confirmation, but it does not disclose whether deletion is permanent, whether any related data is affected, or any error behavior. As a destructive operation, this lack of context is a notable gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, with a single sentence for the main action and short 'Args' and 'Returns' sections. It is front-loaded with the purpose and contains no redundant information. Every element serves a functional role.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter and a simple delete action, the description covers the essential operation and the parameter's meaning. However, it omits usage context, such as prerequisites or error handling, and does not mention where the ID comes from. Given the lack of annotations and the presence of an output schema, a bit more context would be expected, but the simplicity of the tool mitigates the gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, 'id', is explained as 'ID del watch a eliminar' in the description, which adds meaning beyond the bare integer in the schema. However, it does not specify how to obtain this ID (e.g., via list_watches) or any validation rules. The description compensates for the 0% schema coverage but stays minimal.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description begins with 'Elimina un webhook registrado por su ID', which clearly states the action (delete) and the resource (a registered webhook/watch). This distinguishes it from sibling tools like watch_hipocampo and list_watches, which perform create and list operations. The tool name aligns with the description, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention that the ID can be obtained from list_watches, nor does it contrast with other deletion tools like delete_hipocampo. The usage context is only implied from the tool name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_hipocampoA
Actualiza un recuerdo existente en el Hipocampo (memoria_vectorial).
Si se proporciona content, se regenera el embedding automáticamente. Los campos no proporcionados no se modifican.
Args: id: ID numérico del recuerdo a actualizar. content: Nuevo texto del recuerdo (opcional). Si se provee, se regenera el embedding. memory_type: Nuevo tipo de memoria (opcional). Ej: "event", "decision". code: Código o etiqueta corta (opcional). categories: Nueva lista de categorías (opcional).
Returns: Confirmación de la actualización.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| code | No | ||
| content | No | ||
| categories | No | ||
| memory_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and adds meaningful behavioral details: content triggers automatic embedding regeneration, and unprovided fields remain unchanged. It also states the return type as a confirmation. It doesn't cover error cases or permissions, but it discloses the most important side effects for an update operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured: purpose first, key behavioral notes, then a clear Args list, followed by Returns. Every sentence adds value and there is no redundant filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter update tool with an output schema, the description covers all parameters, partial-update semantics, and the embedding regeneration side effect. It doesn't mention failure behavior or authorization requirements, but these are not critical for the core update operation and the output schema likely defines the confirmation structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, but the description compensates by documenting all five parameters with semantic cues: id as numeric, content as optional with embedding regeneration, memory_type with an example, code as a short label, and categories as a new list. This goes well beyond the schema's bare type declarations.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description begins with a specific verb and resource: 'Actualiza un recuerdo existente en el Hipocampo (memoria_vectorial)' — explicitly an update operation on existing memories. This clearly distinguishes it from sibling tools like save_hipocampo (create) or delete_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides context that the tool updates only provided fields ('Los campos no proporcionados no se modifican') and that content triggers embedding regeneration, but it does not explicitly state when to choose this tool over alternatives or provide exclusions. Usage is implied rather than directly contrasted with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_immune_ruleA
Valida una regla inmunológica (Nivel 4).
Analiza una regla 'automatica' marcada como REGLA INMUNOLÓGICA:
Verifica snapshots pre-cambio vinculados en memory_links
Detecta reglas contradictorias sobre el mismo archivo/proyecto
Reporta reglas huérfanas (>30d sin enlaces entrantes)
Args: rule_id: ID de la regla inmunológica a validar.
Returns: Reporte de validación con recomendaciones.
| Name | Required | Description | Default |
|---|---|---|---|
| rule_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses three analysis behaviors and states it returns a validation report with recommendations, strongly implying read-only behavior. It does not explicitly confirm non-mutation or permissions, but for a validation/report tool this is sufficient context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-organized: a one-line purpose, three numbered checks, and clean Args/Returns sections. Every sentence earns its place, and the structure makes it easy for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter validation tool with an output schema, the description is fairly complete: it explains the input, the validation logic, and the output. It lacks explicit usage guidance and caveats, but those are not critical for such a focused tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only defines rule_id as an integer with 0% description coverage. The description compensates by explaining that rule_id is the ID of the immune rule to validate, adding domain meaning beyond the raw type. More details like format or examples would help, but the single parameter is adequately clarified.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool validates an immune rule (Nivel 4) and provides three specific checks, making the purpose concrete. It distinguishes this tool from siblings like review_automatica by focusing on immune rules and their validation workflow, though it does not explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for validating 'automatica' rules marked as immune, listing the analysis steps. However, it does not explicitly state when to use this tool over siblings or mention exclusions, leaving the usage guidance somewhat implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
watch_hipocampoA
Registra un webhook que se dispara cuando se crea/modifica/elimina un recuerdo cuyo contenido o metadatos contengan el patrón dado.
Args: pattern: Texto a buscar en contenido o metadatos del recuerdo. webhook_url: URL que recibirá un POST con event, id, content, metadatos.
Returns: Confirmación con ID del watch creado.
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| webhook_url | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the trigger events, HTTP method (POST), payload fields (event, id, content, metadatos), and return value (watch ID). It lacks details on webhook lifecycle or failure handling, but core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a single purpose statement followed by Args and Returns sections. No unnecessary filler; every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 2-parameter tool with an output schema, the description covers purpose, inputs, and return value. It could mention how to remove the watch, but that is handled by sibling tools like unwatch_hipocampo, so it is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description's Args section fully explains both parameters: pattern as the text to search in content/metadata, and webhook_url as the URL receiving a POST with specific fields. This adds meaning beyond the bare schema types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool registers a webhook that triggers on create/modify/delete of a memory matching a pattern. This specific verb+resource (register webhook) distinguishes it from sibling tools like search_hipocampo or unwatch_hipocampo.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: it is for receiving notifications when memories matching a pattern change. It does not explicitly mention alternatives or exclusions, but the purpose is concrete enough that an agent can infer when to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
9 tool updates
v6.0.0- Added
add_watch_dir - Added
contradicciones_hipocampo - Changed
decay_hipocampo1 field changed- added
Input schema / properties / min_age_daysAdded value: +{ + "default": 30, + "title": "Min Age Days", + "type": "integer" +}
- Added
hipocampo_budget - Added
list_watch_dirs - Added
reindex_now - Added
remove_watch_dir - Added
restaurar_historica - Changed
save_hipocampo1 field changed- added
Input schema / properties / criticoAdded value: +{ + "default": false, + "title": "Critico", + "type": "boolean" +}
22 tool updates
v4.3.0- Added
compress_hipocampo - Added
consolidate_hipocampo - Added
decay_hipocampo - Added
delete_hipocampo - Added
graph_hipocampo - Added
index_project - Added
link_hipocampo - Added
list_watches - Added
path_hipocampo - Added
preload_context - Changed
quick_hipocampo_search1 field changed- added
Input schema / properties / session_idAdded value: +{ + "default": "", + "title": "Session Id", + "type": "string" +}
- Added
review_automatica - Added
rollback_checkpoint - Changed
save_hipocampo4 fields changed- added
Input schema / properties / auto_linkAdded value: +{ + "default": false, + "title": "Auto Link", + "type": "boolean" +} - added
Input schema / properties / forceAdded value: +{ + "default": false, + "title": "Force", + "type": "boolean" +} - added
Input schema / properties / nivelAdded value: +{ + "default": "episodica", + "title": "Nivel", + "type": "string" +} - added
Input schema / properties / session_idAdded value: +{ + "default": "", + "title": "Session Id", + "type": "string" +}
- Added
search_code - Changed
search_hipocampo1 field changed- added
Input schema / properties / session_idAdded value: +{ + "default": "", + "title": "Session Id", + "type": "string" +}
- Added
set_nivel_hipocampo - Added
unlink_hipocampo - Added
unwatch_hipocampo - Added
update_hipocampo - Added
validate_immune_rule - Added
watch_hipocampo
11 tool updates
v1.0.0- First observed
hipocampo_auto_repair - First observed
hipocampo_checkpoint - First observed
hipocampo_dedup - First observed
hipocampo_health - First observed
hipocampo_maintenance - First observed
hipocampo_stats - First observed
hipocampo_tune - First observed
profile_hipocampo - First observed
quick_hipocampo_search - First observed
save_hipocampo - First observed
search_hipocampo
TDQS
Scored across 37 tools
Several tools overlap or share confusing boundaries: search_hipocampo and quick_hipocampo_search are exact aliases, search_code and compress_hipocampo are search variants, and 'watch' refers to both directory watching and webhooks (add_watch_dir vs watch_hipocampo). The descriptions clarify intent, but the set would still make an agent choose between near-equivalent retrieval and maintenance tools.
Naming mixes verb-first (save_hipocampo, search_hipocampo), noun-first (hipocampo_maintenance, hipocampo_stats), Spanish and English (restaurar_historica vs preload_context), and two different 'watch' concepts. Some tools follow a clear verb_noun pattern, but it is not predictable across the set.
37 tools is well beyond the typical well-scoped range and creates unnecessary surface area. Many operations are available both as standalone tools and bundled inside hipocampo_maintenance or budget/decay, adding maintenance overhead.
The surface covers the core memory lifecycle thoroughly: create, update, delete, search, graph links, compression, tiering, restore, health, and webhooks. The main gap is a direct get-by-id/list-memories tool, and retrieval is fragmented across search_code, compress_hipocampo, preload_context, and the search alias.
Maintenance
Related MCP Connectors
Bilingual dual memory with SSC for AI agents. Semantic search, embeddings, profiles.
Shared cross-LLM long-term memory over MCP: semantic recall, sessions, and media (pgvector).
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA self-organizing, persistent semantic memory layer that enables AI agents to store, categorize, and retrieve information using hybrid vector and keyword search. It features autonomous chunking, deduplication, and hierarchical taxonomy management through a PostgreSQL-backed MCP server.1MIT
- AlicenseAqualityAmaintenanceLocal RAG system for Claude Code with hybrid search (semantic + BM25), cross-encoder reranking, markdown-aware chunking, and 12 MCP tools. Zero external servers, pure ONNX in-process.13278MIT
- AlicenseAqualityAmaintenanceDurable hybrid memory for AI agents. Combines vector search, BM25, temporal retrieval, and optional Memgraph knowledge graph via reciprocal rank fusion. 6 MCP tools: health, search, answer, feedback, graph_query, graph_add_triple. Self-hosted with Qdrant backend.77Apache 2.0
- AlicenseAqualityBmaintenanceAgent-agnostic persistent memory backend. 13 MCP tools, Supabase + Jina embeddings, multi-profile isolation, semantic recall across sessions.167Apache 2.0