Skip to main content
Glama

amnesic — el servidor MCP con el nombre más irónico del registro

Versión de PyPI Python Licencia: MIT Registro MCP Puntuación Glama

La memoria institucional de tu base de datos, como servidor MCP. El nombre es irónico: lo recuerda todo.

"El servidor MCP con el nombre más irónico del registro. Es cualquier cosa menos amnésico: recuerda tu base de datos para que tu IA no tenga que hacerlo."

La mayoría de los servidores MCP de bases de datos son ejecutores de consultas: se conectan, inspeccionan, ejecutan SQL y olvidan. amnesic es una memoria semántica: acumula lo que tu esquema significa (qué es status = 3, qué columnas son realmente claves foráneas, para qué sirve esa tabla heredada) y lo entrega automáticamente a cada sesión futura. Piensa en un catálogo de datos, sin la plataforma, sin el pipeline de ingesta y sin la factura. Dónde encaja amnesic ↓

Funciona con Claude Code · Claude Desktop · Cursor · VS Code · Cline · Windsurf — cualquier cliente compatible con MCP.

Disponible en Registro oficial de MCP · Mercado de plugins de Claude Code

👋 ¿Usas amnesic? Saluda en el hilo de adoptantes — los contadores de descargas no me dicen qué se usa realmente, y eso influye directamente en lo que se construye a continuación.

🔒 Solo lectura por diseño. amnesic se niega a ejecutar INSERT, UPDATE, DELETE, DROP, TRUNCATE, ALTER, CREATE, EXEC, MERGE, GRANT, REVOKE — y cualquier sentencia de escritura oculta dentro de un CTE WITH. Dos capas de defensa: el análisis estático de SQL rechaza la sentencia antes de conectarse, y cada consulta se ejecuta dentro de una transacción que se revierte inmediatamente. Seguro para apuntar a producción. Detalles ↓


El problema

Cada sesión con una IA comienza en frío. Pasas los primeros minutos reexplicando qué tablas existen, qué significa un valor de 3 en la columna status, qué FK conecta orders con users. Luego la sesión termina, y al día siguiente lo haces todo de nuevo.

amnesic soluciona esto. Le da a tu IA un almacén de conocimiento SQLite persistente — uno por base de datos — que sobrevive entre sesiones. Anota un enum de estado una vez; cada sesión futura verá esas etiquetas automáticamente. Descubre relaciones de FK una vez; cada futura consulta JOIN usará ese grafo.

El conocimiento también es portátil y sobrevive a tu acceso a la base de datos. Cuando te cambias de proyecto, amnesic export le entrega al siguiente desarrollador todo lo que le enseñaste — años de "ah, esa columna en realidad significa…" que de otro modo se irían contigo.


Related MCP server: engram-mcp

Dónde encaja amnesic

El ecosistema de MCP para bases de datos se divide en dos bandos, y amnesic está deliberadamente en ninguno de ellos.

Ejecutores de consultasDBHub, Postgres MCP Pro, MCP Toolbox de Google y los servidores de los proveedores (Supabase, Neon). Inspeccionan en vivo, ejecutan SQL y algunos profundizan en el rendimiento — Postgres MCP Pro hace un ajuste de índices genuino y comprobaciones de salud estilo PgHero. Son excelentes en eso. También son sin estado: cada sesión vuelve a aprender tu esquema desde cero, y nada de lo que devuelven puede decirte qué significa una columna, porque la base de datos tampoco lo sabe.

Catálogos empresarialesDataHub, Atlan, Cube, AtScale. Estos contienen contexto semántico: glosarios, descripciones de columnas, propiedad, linaje. También son un compromiso de plataforma: ingesta de metadatos, un servicio que ejecutar, normalmente un nivel de pago. Vale la pena a escala empresarial; desproporcionado para un desarrollador que necesita recordar qué significan seis códigos de estado en una base de datos MSSQL heredada que nadie incorporará jamás a un catálogo.

amnesic es la tercera cosa: memoria semántica de grado catálogo con el costo de configuración de un ejecutor de consultas. pipx install, un archivo TOML, un archivo SQLite local por base de datos. Sin plataforma, sin ingesta, sin servidor que ejecutar.

Comparación honesta

amnesic

Ejecutores de consultas

Catálogos empresariales

Contexto semántico (qué significa un valor)

✅ persistente, tuyo

❌ ninguno

✅ gestionado por la plataforma

Sobrevive entre sesiones

Portátil / sobrevive al acceso a la BD

export/import

⚠️ ligado a la plataforma

Costo de configuración

un comando

un comando

pipeline de ingesta

Actualidad del esquema en vivo

⚠️ en caché, actualización manual

✅ siempre en vivo

⚠️ retraso de ingesta

Planes de ejecución / ajuste de índices

✅ (Postgres MCP Pro)

Linaje / propiedad / gobernanza

Funciona en esquemas heredados sin restricciones FK

✅ anótalas tú mismo

❌ nada que inspeccionar

⚠️ necesita ingesta

Usa un ejecutor de consultas en lugar de amnesic si quieres planes de ejecución, recomendaciones de índices o diagnósticos de salud de la base de datos — eso no es trabajo de amnesic y añadirlo lo convertiría en una versión peor de una herramienta que ya existe.

Usa amnesic junto con uno. Se complementan: nada te impide ejecutar ambos. amnesic guarda el significado; ellos guardan la maquinaria.

Las filas marcadas con ⚠️ arriba son brechas conocidas con problemas abiertos — ver Hoja de ruta ↓.


Inicio rápido (90 segundos)

pipx install amnesic            # install the core
amnesic init                    # interactive wizard

Pruébalo sin credenciales. Ejecuta amnesic init --demo en su lugar — añade una base de datos SQLite de muestra autocontenida (esquema de comercio electrónico: clientes / productos / pedidos con FKs y una columna enum) para que puedas ejercitar todas las herramientas en menos de un minuto. Genial para una primera impresión antes de apuntar amnesic a una base de datos real.

El asistente pregunta a qué tipo de base de datos te vas a conectar y te dice el único comando que debes ejecutar si su controlador aún no está instalado — nunca necesitas adivinar extras por adelantado.

El asistente:

  • Pregunta por tu tipo de base de datos, host y credenciales

  • Prueba la conexión antes de guardar nada

  • Almacena la contraseña de forma segura en ~/.config/amnesic/.env (chmod 600)

  • Escribe el bloque de conexión en ~/.config/amnesic/connections.toml

Luego añade amnesic a tu cliente de IA y reinicia.

Instala pipx (una sola vez):

brew install pipx                                  # macOS
sudo apt install pipx                              # Linux (Debian/Ubuntu)
python -m pip install --user pipx                  # Windows / generic

O usa uv (alternativa de binario único — rápida, sin necesidad de Python):

brew install uv                                            # macOS
curl -LsSf https://astral.sh/uv/install.sh | sh            # Linux / macOS
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Windows

uv tool install amnesic

O pip normal (se instala en tu entorno de Python activo):

pip install amnesic

Elijas lo que elijas, amnesic init pregunta a qué base de datos te conectarás e imprime el único comando extra para instalar ese controlador — no necesitas comprometerte con extras por adelantado.

Después de la instalación, amnesic --help funciona desde cualquier terminal.

Dónde guarda las cosas amnesic

Archivo

macOS / Linux

Windows

Config

~/.config/amnesic/connections.toml

%APPDATA%\amnesic\connections.toml

Secretos

~/.config/amnesic/.env (chmod 600)

%APPDATA%\amnesic\.env (ACL del perfil de usuario)

Conocimiento

~/.config/amnesic/knowledge_<name>.db

%APPDATA%\amnesic\knowledge_<name>.db

Establece $AMNESIC_HOME (o $XDG_CONFIG_HOME en Linux) para anular la ubicación.

Añadir más conexiones más tarde

amnesic add          # add another connection to existing config
amnesic test         # verify all connections
amnesic test orders.prod  # verify one connection

Establecer y rotar contraseñas

amnesic init y amnesic add guardan tu contraseña automáticamente — para el flujo de configuración típico, nunca necesitas pensar en esta sección.

Usa set-secret cuando necesites cambiar una contraseña almacenada más tarde — TI la rotó, la escribiste mal durante la configuración, o estás editando el config a mano.

$ amnesic set-secret ORDERS_PROD_PASSWORD
Value: ****            ← hidden input (your typing is invisible)
Confirm: ****
✓ Set ORDERS_PROD_PASSWORD in ~/.config/amnesic/.env

¿Cuál es el nombre de la variable? Es la variable de entorno a la que tu connections.toml hace referencia para la contraseña de esa conexión. El asistente genera automáticamente estos nombres como <NOMBRE_DE_CONEXIÓN_EN_MAYÚSCULAS_CON_GUIONES_BAJOS>_PASSWORD:

Nombre de conexión

Variable de entorno generada

orders.prod

ORDERS_PROD_PASSWORD

analytics

ANALYTICS_PASSWORD

drive.staging

DRIVE_STAGING_PASSWORD

Para ver el nombre exacto que usa tu config, revisa ~/.config/amnesic/connections.toml — cualquier cosa dentro de ${...} es la variable que debes pasar a set-secret.

Por debajo: escribe (o reemplaza) la línea en ~/.config/amnesic/.env, establece el permiso del archivo a chmod 600 (solo tu usuario puede leerlo), conserva todas las demás entradas.

Gestionar conexiones y conocimiento

El conocimiento se acumula por conexión en un archivo SQLite local. Estos comandos te permiten moverlo entre máquinas y limpiarlo:

# Hand off everything you've taught amnesic about a database (annotations +
# relationships, not the re-derivable schema cache) as portable JSON:
amnesic export orders.prod -o orders-knowledge.json
amnesic export orders.prod            # or print to stdout to pipe/redirect

# Load that knowledge into another connection (e.g. promote staging → prod,
# or onboard a teammate). Unconditional upsert — existing entries are overwritten:
amnesic import orders.prod orders-knowledge.json

# Wipe stored knowledge for a connection but keep the config entry:
amnesic clear orders.staging

# Drop a connection from connections.toml entirely (knowledge file kept
# unless you pass --delete-knowledge):
amnesic remove old.connection
amnesic remove old.connection --delete-knowledge

export/import/clear/remove operan únicamente sobre archivos locales — nunca se conectan a la base de datos, por lo que funcionan incluso si las credenciales de una conexión no están configuradas. remove edita connections.toml con ediciones de cadena quirúrgicas, dejando el formato y los comentarios de todos los demás bloques intactos byte a byte.


Añade a tu cliente de IA

Una vez que amnesic está instalado con los extras de controlador correctos (ver Inicio rápido), el comando amnesic está en tu PATH. Usa el mismo fragmento en todos los clientes MCP:

Claude Code

Instalación en una línea (recomendada — sin editar JSON). Dentro de Claude Code:

/plugin marketplace add https://github.com/SurajKGoyal/amnesic-marketplace
/plugin install amnesic@amnesic

Eso conecta amnesic como servidor MCP automáticamente. Fuente: SurajKGoyal/amnesic-marketplace.

{
  "mcpServers": {
    "amnesic": {
      "command": "amnesic"
    }
  }
}

Claude Desktop

Añade a la configuración de Claude Desktop de tu plataforma:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "amnesic": {
      "command": "amnesic"
    }
  }
}

Cursor

Instalación en un clic — haz clic en el botón de abajo y Cursor lo configura por ti:

Añade a .cursor/mcp.json en tu proyecto (o ~/.cursor/mcp.json globalmente):

{
  "mcpServers": {
    "amnesic": {
      "command": "amnesic"
    }
  }
}

Sin instalación global (efímero)

Si prefieres no instalar amnesic en tu sistema, usa uvx o pipx para obtenerlo cada vez que el cliente MCP se inicie. Ten en cuenta que los extras del controlador deben pasarse explícitamente:

// uvx — requires `uv` installed (see Install section for per-OS instructions)
{
  "mcpServers": {
    "amnesic": {
      "command": "uvx",
      "args": ["--from", "amnesic[mssql]", "amnesic"]
    }
  }
}

// pipx — usually pre-installed via Homebrew or system package manager
{
  "mcpServers": {
    "amnesic": {
      "command": "pipx",
      "args": ["run", "--spec", "amnesic[mssql]", "amnesic"]
    }
  }
}

Para varios controladores, sepáralos con comas dentro de los corchetes — por ejemplo, amnesic[postgres,mssql] o usa amnesic[all] para todo.

VS Code (con la extensión MCP)

Añade a .vscode/mcp.json:

{
  "servers": {
    "amnesic": {
      "type": "stdio",
      "command": "amnesic"
    }
  }
}

Actualización

amnesic publica a menudo. Actualiza con la misma herramienta con la que lo instalaste:

Instalado mediante

Comando de actualización

pipx

pipx upgrade amnesic

uv tool

uv tool upgrade amnesic

pip

pip install --upgrade amnesic

uvx (efímero, en tu configuración de MCP)

uvx almacena en caché las compilaciones — ejecuta uv cache clean amnesic para obtener la más reciente

Luego reinicia tu cliente MCP (Claude Code, Cursor, …) para que relance el servidor amnesic y detecte las nuevas herramientas.

Actualizar es seguro: no perderás anotaciones. Tus archivos de conocimiento se migran automáticamente al nuevo esquema en la primera carga; amnesic solo añade columnas, nunca elimina tus datos.

Para comprobar la versión instalada: amnesic --version. Última versión: PyPI · Releases.


Herramientas

Herramienta

Descripción

db_list_connections()

Lista todas las conexiones configuradas (sin exponer secretos)

db_list_tables(connection)

Todas las tablas conocidas con descripciones y recuentos de columnas

db_search(query, connection, target, limit)

Búsqueda BM25 sobre descripciones de tablas/columnas y alias

db_get_schema(table, connection)

Esquema de columnas combinado con anotaciones guardadas

db_query(sql, connection)

Ejecuta una consulta SELECT de solo lectura

db_annotate(table, connection, ...)

Persiste anotaciones semánticas para tablas/columnas

db_deprecate(table, connection, column?, reason?, undo?)

Retira de forma suave una anotación obsoleta — marcada (y avisada) pero conservada, reversible

db_detect_drift(connection)

Audita las anotaciones frente al esquema en vivo — detecta anotaciones huérfanas y tablas sin documentar

db_forget(table, connection, column?, cascade?)

Elimina de forma definitiva una anotación (cascade opcional) — permanente

db_sync_knowledge(from, to)

Copia anotaciones entre conexiones (p. ej. staging → prod)

db_discover_relationships(connection)

Descubre todas las relaciones FK de la base de datos en vivo

db_get_relationships(table, connection)

Navega el grafo de FK para planificar JOINs


Búsqueda en la base de conocimiento

Para esquemas grandes, db_list_tables no es práctico: volcarías más de 500 filas en el contexto de Claude. Usa db_search para encontrar las tablas/columnas relevantes por palabra clave:

"What table tracks customer payments?"
  → db_search("payments")
    Top results:
      - dbo.payments  (table) "Customer payment records..."
      - dbo.orders.payment_method  (column) "Mode of payment..."

db_search usa SQLite FTS5 con ranking BM25 — rápido, local, sin embeddings ni servicios externos. La sintaxis de búsqueda admite:

Sintaxis

Efecto

payment

Coincide con la palabra (con stemming — también coincide con "payments", "paying")

"payment method"

Frase exacta

pay*

Coincidencia por prefijo — "payment", "payable", etc.

payment AND status

Ambos términos son obligatorios

payment OR refund

Cualquiera de los términos

Los resultados devuelven filas de tablas/columnas ordenadas por relevancia con descripciones y fragmentos resaltados.


La capa de conocimiento

El diferenciador principal. Cada anotación sobrevive a reinicios, actualizaciones del modelo y nuevas sesiones.

Sesión 1 — descubres algo

You: What does status=3 mean in the orders table?
AI: Let me check. [runs db_query: SELECT DISTINCT status FROM dbo.orders]
    I see values 1, 2, 3, 4. Let me look at some examples...
    Based on the data, 3 appears to be "cancelled".

You: Save that. And status=1 is "pending", 2 is "confirmed", 4 is "delivered".
AI: [calls db_annotate]
    db_annotate(
      table="dbo.orders",
      column="status",
      column_description="Order lifecycle status",
      enum_values={"1": "pending", "2": "confirmed", "3": "cancelled", "4": "delivered"}
    )
    Saved. Future sessions will see these labels automatically.

Sesión 2 — el conocimiento ya está ahí

You: How many cancelled orders are there this month?
AI: [calls db_get_schema("dbo.orders")]
    Schema response includes:
      column: "status"
      description: "Order lifecycle status"
      enum_values: {"1": "pending", "2": "confirmed", "3": "cancelled", "4": "delivered"}

    [writes correct SQL immediately]
    SELECT COUNT(*) FROM dbo.orders WHERE status = 3 AND ...

Sin redescubrimientos. Sin turnos desperdiciados. La anotación persistió.


Grafo de relaciones

Comprende la estructura de JOINs de tu esquema una vez y reutilízala para siempre.

AI: [db_discover_relationships(connection="orders.prod")]
    Discovered 47 foreign key relationships.

AI: [db_get_relationships(table="orders", depth=2)]
    neighbors:
      orders → users (via user_id → id)
      orders → order_items (via id ← order_id)
    paths:
      orders -> users
      orders -> order_items
      order_items -> products

Ahora la IA sabe exactamente cómo hacer JOINs en tu esquema sin adivinar.


Sincronización entre entornos

Acumula anotaciones en staging y luego promuévelas a prod:

db_sync_knowledge(from_connection="orders.staging", to_connection="orders.prod")

Devuelve {synced: [...], skipped: [{table, reason}], warnings: [{table, column, reason}]}.

Las tablas que faltan en la caché del esquema de destino se omiten con un motivo claro. Las columnas que faltan en el esquema de destino generan una advertencia, pero no bloquean el resto de la sincronización.


Avanzado: editar el TOML manualmente

Si prefieres gestionar el archivo de configuración tú mismo, genera una plantilla en blanco:

amnesic init --template

Esto escribe ~/.config/amnesic/connections.toml con ejemplos comentados y sale — sin asistente. Edita el archivo directamente:

# ~/.config/amnesic/connections.toml

# Nested style: [connections.product.env]
[connections.orders.prod]
driver = "mssql"
server = "localhost"
port = 11433
database = "OrdersDB"
user = "${ORDERS_USER}"
password = "${ORDERS_PROD_PASSWORD}"
tunnel_script = "~/.scripts/mssql-tunnel.sh"     # macOS / Linux (bash)
# tunnel_script = "C:/scripts/mssql-tunnel.ps1"  # Windows (PowerShell)

[connections.orders.staging]
driver = "mssql"
server = "localhost"
port = 11434
database = "OrdersDB_Staging"
user = "${ORDERS_USER}"
password = "${ORDERS_STAGING_PASSWORD}"

# Flat style: [connections.name]
[connections.analytics]
driver = "postgres"
server = "analytics.company.com"
port = 5432
database = "warehouse"
user = "${ANALYTICS_DB_USER}"
password = "${ANALYTICS_DB_PASSWORD}"

# SQLite — no credentials needed
[connections.local]
driver = "sqlite"
database = "/absolute/path/to/local.db"       # macOS / Linux
# database = "C:/path/to/local.db"            # Windows (use forward slashes)

Usa ${ENV_VAR} para las credenciales: nunca codifiques contraseñas.

Los secretos se cargan automáticamente desde ~/.config/amnesic/.env (formato: KEY=VALUE, uno por línea, # para comentarios). Para cada ${VAR_NAME} referenciado en tu TOML, completa la entrada correspondiente en .env con amnesic set-secret VAR_NAME (entrada oculta, chmod 600), o escribe .env tú mismo.

Los nombres de conexión canónicos usan notación de puntos: orders.prod, orders.staging, analytics, local.


Bases de datos compatibles

Base de datos

Controlador Python

Instalado mediante

PostgreSQL

psycopg2-binary

sugerencia del asistente al elegir Postgres, o extras amnesic[postgres]

MySQL / MariaDB

pymysql

sugerencia del asistente al elegir MySQL, o extras amnesic[mysql]

Microsoft SQL Server

pymssql

sugerencia del asistente al elegir MSSQL, o extras amnesic[mssql]

SQLite

sqlite3 de la stdlib

siempre disponible — sin extras


Seguridad y aplicación de solo lectura

amnesic está diseñado para ser seguro apuntándolo a bases de datos de producción.

Por qué tu IA no puede dañar tus datos

Cada consulta pasa por dos capas independientes antes de llegar a la base de datos:

  1. Análisis estático (en amnesic/readonly.py) — el SQL se tokeniza y se rechaza si contiene cualquiera de estos: INSERT, UPDATE, DELETE, DROP, TRUNCATE, ALTER, CREATE, EXEC, EXECUTE, MERGE, BULK, GRANT, REVOKE, DENY. Esto incluye sentencias de escritura ocultas dentro de CTEs (WITH x AS (SELECT ...) UPDATE ... se detecta y se rechaza).

  2. Rollback de transacción — incluso si una sentencia de escritura lograra pasar el análisis estático, la consulta se ejecuta dentro de BEGIN TRANSACTION ... ROLLBACK, por lo que nunca se confirma nada. Cinturón y tirantes.

Solo SELECT y WITH ... SELECT llegan a la base de datos. Los comentarios se eliminan antes del análisis para que /* DELETE FROM users */ no pueda usarse para ocultar un ataque.

Otras medidas de seguridad

  • Sin credenciales en las respuestas: db_list_connections elimina contraseñas y nombres de usuario de su salida. La IA puede ver qué conexiones existen, nunca cómo autenticarse en ellas.

  • Credenciales solo mediante variables de entorno: expansión de ${ENV_VAR} al cargar la configuración — las contraseñas nunca tocan connections.toml en disco.

  • Almacenamiento seguro de .env: en macOS/Linux chmod 0o600 (solo lectura/escritura del propietario); en Windows, el .env vive en %APPDATA%, que está restringido a tu perfil de usuario mediante ACL de Windows.

  • Validación de identificadores: los nombres de tablas/esquemas/bases de datos se verifican contra [A-Za-z0-9_]+ antes de cualquier interpolación de cadenas en SQL.

  • Probado: más de 40 pruebas unitarias en tests/test_readonly.py cubren cada palabra clave de escritura, casos límite de eliminación de comentarios, intentos de escritura con CTE, múltiples sentencias separadas por punto y coma e intentos de inyección de identificadores. Ejecuta pytest tests/test_readonly.py para verificarlo en tu máquina.


¿Es seguro con mis datos?

amnesic es solo local y solo protocolo. No introduce un nuevo límite de confianza externo — el límite de confianza está donde tu cliente MCP envía los datos, no en amnesic en sí. Elegir el cliente de IA determina la política que se aplica a tus filas.

your DB → amnesic (local) → MCP client → your AI deployment
                                          ↑ trust boundary lives here

La pregunta honesta que debes hacerte, tanto si eres independiente como si perteneces a una empresa:

¿Confío en mi cliente de IA con los datos de esta base de datos?

Si la respuesta es sí — y en la mayoría de las configuraciones lo es — estás bien. Eso cubre:

  • Desarrolladores independientes en Claude Pro / Cursor / Copilot que usan sus propios proyectos, bases de datos de desarrollo o datos de prueba

  • Proyectos secundarios que consultan SQLite personal o Postgres autoalojado

  • Mantenedores de código abierto que trabajan con esquemas públicos

  • Equipos en IA empresarial con aislamiento explícito: AWS Bedrock (tenant + IAM), Azure OpenAI (fijado por región, tu suscripción), Anthropic Enterprise (retención de datos cero, exclusión de entrenamiento), Vertex AI (tu proyecto de GCP), autoalojado (Ollama, vLLM, Claude/GPT local — los datos nunca salen de la red)

  • Cualquier persona con un plan de IA de pago con garantías de retención cero y un DPA que cubra tu uso

Merece un análisis más detallado si

  • Tu base de datos contiene datos que pertenecen a otras personas (usuarios, clientes, pacientes) y no has verificado que los términos de tu proveedor de IA cubran ese tratamiento

  • Estás en IA de nivel consumidor (gratuita / Pro personal) Y trabajas con datos regulados — PHI (entidad cubierta por HIPAA), datos de titulares de tarjetas (PCI-DSS), PII restringida según GDPR / la Ley DPDP de la India

  • Tu empleador tiene una política explícita que restringe el uso de herramientas de IA externas en bases de datos de producción

  • Estás sujeto a normas de residencia de datos en las que las filas no pueden salir de una región específica

La minimización de datos está integrada

Es una propiedad del diseño, no un añadido posterior: la capa de anotaciones hace que la IA responda la mayoría de las preguntas sobre el esquema desde un archivo de conocimiento SQLite local — no se ejecuta db_query, no se envía ningún dato de filas a ningún sitio.

  • "¿Qué significa status=3?" → se resuelve desde tu anotación guardada

  • "¿Cómo se unen orders con users?" → se resuelve desde el grafo de FK

  • "¿Qué tablas tienen una columna created_at?" → se resuelve desde la caché del esquema

Para la exploración puramente estructural, seis herramientas nunca tocan tus datos: db_list_tables, db_get_schema, db_search, db_annotate, db_discover_relationships, db_get_relationships. Solo devuelven metadatos.

Eso es un movimiento de datos mediblemente menor que un MCP SQL "desnudo" — que tiene que ejecutar SELECT DISTINCT status FROM orders cada vez que la IA está confundida sobre un enum. amnesic lo responde una vez desde anotaciones locales.

Aviso legal: amnesic se proporciona tal cual bajo la Licencia MIT (sin garantía, sin responsabilidad — consulta LICENSE). Esta sección no es asesoramiento legal ni de cumplimiento normativo. El uso de amnesic y del cliente de IA al que lo conectes es tu responsabilidad. Si manejas datos regulados, consulta a tu equipo de seguridad / cumplimiento antes de apuntarlo a producción.


Hoja de ruta

Entregado hasta ahora: la capa de conocimiento (v0.1), búsqueda BM25 (v0.1.5), gestión del ciclo de vida — deprecación / detección de deriva / olvido (v0.2) y exportación/importación portátil de conocimiento (v0.2.2).

Lo siguiente (v0.3 — "Ganarse la memoria"): conocimiento que se acumula sin que nadie lo escriba — autodetección de enums, inferencia de FK suaves para esquemas heredados sin restricciones y aprendizaje de patrones de JOIN. Además del trabajo básico: un presupuesto de tokens en cada respuesta, índices y claves primarias en la obtención del esquema, indicadores de caché obsoleta y una superficie de herramientas más reducida.

Consulta ROADMAP.md para ver el panorama completo y el razonamiento detrás del orden.

🙌 Se buscan contribuciones

Cada elemento de la v0.3 está registrado como un issue de GitHub con el diseño ya pensado: el problema, la forma propuesta, los archivos a tocar y cómo probarlo. Varios están etiquetados como good first issue.

Elige uno y abre un PR — no hace falta pedir permiso primero. Solo comenta en el issue para que dos personas no construyan lo mismo.

¿Tienes una idea que no esté en la lista? Abre un issue. Un caso de uso vale más que un parche: te ahorra retrabajo.


Seguimiento de uso

pypistats.org/packages/amnesic


Licencia

MIT — consulta LICENSE.


Registro MCP

Este servidor está registrado en el registro oficial de MCP.

mcp-name: io.github.SurajKGoyal/amnesic

Available Tools

12 tools
db_annotateA
Persist semantic annotations for a table or column — survives across sessions.

This is the core of amnesic's persistent memory. Every annotation saved here
is automatically merged into future db_get_schema() responses, so the AI
never has to rediscover what a status code means or what a table is for.

Call this after discovering: what an enum value means, what a column represents,
how a table relates to another, or what a table is used for.

Args:
    table:              Table name, optionally schema-qualified to match your
                        DB — e.g. "users", "public.users" (Postgres),
                        "dbo.Orders" (MSSQL), "mydb.orders" (MySQL).
    connection:         Connection name. Defaults to first defined.
    table_description:  Human-readable description of the table's purpose.
    table_aliases:      Alternative names the table is known by.
    column:             Column to annotate (required for column-level args below).
    column_description: What this column represents in the business domain.
    enum_values:        Dict mapping stored values to labels {"1": "active", "2": "inactive"}.
    foreign_key:        FK reference as "other_table.column_name".
    example_values:     Representative sample values from this column.

Returns:
    {table, connection, updated: {table_knowledge?, column_knowledge?}}
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo
table_descriptionNo
table_aliasesNo
columnNo
column_descriptionNo
enum_valuesNo
foreign_keyNo
example_valuesNo

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description must fully disclose behavior. It states annotations survive sessions, are merged into future db_get_schema responses, and calls it the core of persistent memory. This effectively communicates the mutating and persistent nature. It doesn't discuss permissions or reversibility, but given the positive intent (annotating for better future queries), the transparency is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a brief summary, contextual motivation, usage guidance, parameter list, and return type. Every sentence adds value, and the length is appropriate for the tool's complexity. There is no redundancy or filler.

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

Completeness5/5

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

Despite 9 parameters and no annotations or output schema, the description covers the tool's purpose, when to use it, parameter semantics, and return format. It also explains how it integrates with db_get_schema, providing sufficient context for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% coverage (no descriptions), so the description must compensate. The Args section provides clear semantic explanations for each parameter, including schema qualification for table, relationship between column and column-level fields, and the dict format for enum_values. This adds significant meaning beyond the raw schema.

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

Purpose5/5

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

The description clearly states the tool persists semantic annotations for tables or columns, surviving across sessions. It distinguishes from siblings by positioning itself as the persistent memory mechanism that feeds into db_get_schema, a unique role not covered by other sibling tools.

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

Usage Guidelines4/5

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

The description explicitly advises calling this tool after discovering semantic knowledge (enum meanings, column purposes, relationships). While it doesn't list when to avoid it or name alternatives, the context and sibling list imply when to use versus when to use other tools like db_get_schema or db_query.

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

db_deprecateA
Soft-retire a table or column annotation — flag it stale without deleting it.

Use when a table/column still exists but should no longer be relied on. The
deprecation flag is surfaced in db_get_schema so the AI is warned off it on
future calls. Reversible via undo=True. To remove an annotation entirely
(e.g. the column was dropped from the DB), use db_forget instead.

Args:
    table:      Table name, optionally schema-qualified (e.g. "users",
                "public.users", "dbo.Orders", "mydb.orders").
    connection: Connection name. Defaults to first defined.
    column:     Column to deprecate. Omit to deprecate the whole table.
    reason:     Why it's deprecated (e.g. "replaced by status_v2").
    undo:       Clear the deprecation flag instead of setting it.

Returns:
    {table, connection, column, target, deprecated, reason}
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo
columnNo
reasonNo
undoNo

TDQS

A4.7/5.0
Behavior4/5

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

No annotations provided, but description explains the deprecation flag is surfaced in db_get_schema and that operation is reversible. Lacks details on permissions or side effects, but sufficient for a soft-retire tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with summary, usage guidelines, and argument list. Slightly wordy but each sentence adds value. No redundancy.

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

Completeness5/5

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

Given 5 parameters, no output schema, and no annotations, the description covers all inputs, explains return format, and mentions interaction with db_get_schema. Distinguishes from sibling db_forget.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description provides full argument list with detailed explanations, defaults, and usage nuances (e.g., connection defaults to first defined, column omitted means whole table).

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

Purpose5/5

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

Description clearly states the tool soft-retires a table or column annotation, distinguishing it from db_forget which removes entirely. Specific verb+resource combination.

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

Usage Guidelines5/5

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

Explicitly states when to use (table/column still exists, should not be relied on) and when not (use db_forget instead). Also mentions reversibility via undo=True.

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

db_detect_driftA
Audit saved annotations against the live database schema (read-only).

Surfaces drift after the schema evolves:
  - orphaned annotations — a table or column you annotated that no longer
    exists in the DB. Remove with db_forget, or db_deprecate if pending.
  - undocumented tables — live tables with no annotation yet (coverage gaps).

Changes nothing — purely a report. Run after schema changes, or periodically.

Args:
    connection: Connection name. Defaults to first defined.

Returns:
    {connection, orphaned_tables, orphaned_columns, undocumented_tables,
     undocumented_truncated, summary}
ParametersJSON Schema
NameRequiredDescriptionDefault
connectionNo

TDQS

A4.9/5.0
Behavior5/5

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

The description explicitly states the tool is read-only ('Changes nothing — purely a report.') and details what it surfaces (orphaned annotations, undocumented tables). It also outlines the return structure (connection, orphaned_tables, etc.), providing full transparency without relying on annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: it opens with a clear verb-resource statement, uses bullet points for key outputs, and includes a separate Args/Returns section. Every sentence adds value without redundancy.

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

Completeness5/5

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

Despite having only one optional parameter and no output schema, the description fully covers the tool's function, when to use it, what it detects, and the format of its return. No gaps remain for the intended use case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only has one parameter (connection) with default null. The description adds meaning by stating 'Defaults to first defined,' which goes beyond the schema's default value. Given the parameter's simplicity, the description provides sufficient context.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Audit saved annotations against the live database schema (read-only).' It specifies the verb (audit) and the resource (annotations vs live schema), and distinguishes itself from sibling tools like db_forget and db_deprecate by emphasizing it is a read-only report that detects drift.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: 'Run after schema changes, or periodically.' It also advises on follow-up actions ('Remove with db_forget, or db_deprecate if pending.'), making the usage context clear.

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

db_discover_relationshipsA
Discover all foreign key relationships in the database and save them to the graph.

Runs driver-specific FK introspection queries against the live database and
persists results to the local KnowledgeStore. Run once per database; re-run
after schema changes. After discovery, use db_get_relationships to navigate
the graph when planning complex JOIN queries.

Args:
    connection: Connection name. Defaults to first defined.

Returns:
    {connection, discovered: count, relationships: [{from_table, from_column, to_table, to_column}]}
ParametersJSON Schema
NameRequiredDescriptionDefault
connectionNo

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description fully discloses behavior: runs driver-specific FK introspection queries, persists to KnowledgeStore, and implies potential impacts (live database query). Could mention performance implications or permissions, but still transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with a short summary, usage guidelines, and listed args/returns. Every sentence adds value, no fluff.

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

Completeness5/5

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

Completely covers the tool's lifecycle, return format, and relationship to sibling tools. No gaps given the simple parameter set and no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description includes an Args section explaining the single parameter 'connection', its meaning, and default behavior ('Defaults to first defined'), adding value beyond the schema which only shows default null.

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

Purpose5/5

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

The description clearly states the tool discovers all foreign key relationships and saves them to the graph. It uses specific verbs (discover, save) and resources (foreign key relationships, database, graph), and distinguishes from sibling tool db_get_relationships.

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

Usage Guidelines5/5

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

Explicitly states when to use ('Run once per database; re-run after schema changes') and when not, by directing to use db_get_relationships for navigation after discovery.

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

db_forgetA
Permanently delete a table or column annotation. Safe by default — NOT reversible.

Use to remove a wrong annotation, or to clean up after a table/column was
dropped from the DB (pairs with db_detect_drift). Unlike db_deprecate, this
hard-deletes. Cascade is opt-in so you can't nuke a table by accident:
  - db_forget(table)               -> ONLY the table's own annotation
  - db_forget(table, column="x")   -> ONLY that column's annotation
  - db_forget(table, cascade=True) -> the table + all its column annotations
                                      + all relationships touching it

Only the local knowledge store is changed — never the live database.

Args:
    table:      Table name, optionally schema-qualified (e.g. "users",
                "public.users", "dbo.Orders", "mydb.orders").
    connection: Connection name. Defaults to first defined.
    column:     Column annotation to delete. Omit to target the table.
    cascade:    When targeting a table, also delete its columns +
                relationships. Ignored when column is given.

Returns:
    {table, connection, column, removed_table, removed_columns, removed_relationships}
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo
columnNo
cascadeNo

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description fully discloses behavior. It states 'Safe by default — NOT reversible,' explains cascade behavior, and clarifies that only the local knowledge store is changed, never the live database.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with bullet points and examples. Every sentence adds value, and critical information is front-loaded immediately after the first line.

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

Completeness5/5

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

Given no output schema, the description explains the return object structure. It covers all necessary context: irreversibility, local-only modification, cascade behavior, and relation to siblings. Complete for a destructive knowledge store tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description provides detailed semantics for all 4 parameters: table examples, connection default, column omit behavior, cascade ignored when column given. This adds significant value beyond the schema.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Permanently delete a table or column annotation.' It uses specific verbs and resources, and explicitly distinguishes from siblings like db_deprecate (soft-delete) and pairs with db_detect_drift.

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

Usage Guidelines5/5

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

Explicitly states when to use: 'Use to remove a wrong annotation, or to clean up after a table/column was dropped from the DB.' Provides when-not guidance by contrasting with db_deprecate, and explains cascade opt-in to prevent accidents.

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

db_get_relationshipsA
Get the foreign key relationship graph for a table up to the given traversal depth.

Depth 1 returns direct neighbors (tables one JOIN away). Depth 2 returns
neighbors-of-neighbors. Returns both a flat neighbor list and formatted join
path strings to help plan multi-table queries. Requires db_discover_relationships
to have been run first.

Args:
    table:      Table name (e.g. "Orders").
    connection: Connection name. Defaults to first defined.
    depth:      BFS traversal depth (default 1, recommended max 3).

Returns:
    {table, connection, neighbors: [...], paths: ["TableA -> TableB -> TableC", ...]}
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo
depthNo

TDQS

A4.6/5.0
Behavior4/5

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

The description discloses the output format (neighbor list and join paths) and the prerequisite step. As no annotations are provided, the description carries full burden; it lacks explicit mention of side effects or idempotency but is sufficient for understanding behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for Args and Returns. It is concise without unnecessary words, front-loading the primary purpose and then detailing parameters and output.

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

Completeness5/5

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

Given no output schema and no annotations, the description is comprehensive: it explains the output structure, prerequisite, and each parameter fully. An agent can correctly invoke this tool based solely on the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining all three parameters, their purposes, defaults, and even a recommended maximum depth for depth. This provides complete semantic understanding.

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

Purpose5/5

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

The description clearly states the tool's purpose: retrieving the foreign key relationship graph for a table up to a given depth. It distinguishes itself from sibling tools by explicitly requiring db_discover_relationships to have been run first.

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

Usage Guidelines4/5

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

The description provides clear usage context: it explains depth levels and that the prerequisite tool must be run first. However, it does not explicitly state when not to use this tool or mention alternatives beyond the prerequisite.

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

db_get_schemaA
Get column schema for a table, merged with any saved semantic annotations.

Checks the local cache first; fetches from the database on cache miss or
when force_refresh=True. Saves the result to cache for future calls.
Merges column descriptions, enum value mappings, and FK references from
previous db_annotate() calls into the response.

Args:
    table:         Table name, optionally schema-qualified. Use whatever your
                   DB uses — e.g. "users", "public.users" (Postgres),
                   "dbo.Orders" (MSSQL), "mydb.orders" (MySQL).
    connection:    Connection name. Defaults to first defined.
    force_refresh: Bypass cache and fetch fresh schema from the database.

Returns:
    {table, connection, columns (with annotations merged in), table_description, cached}
ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
connectionNo
force_refreshNo

TDQS

A4.8/5.0
Behavior5/5

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

Given no annotations, the description fully discloses caching behavior, force refresh mechanism, and annotation merging, providing complete behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loaded with the purpose, and every subsequent sentence adds necessary detail without redundancy.

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

Completeness5/5

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

Despite lacking output schema, the description covers all essential aspects: purpose, caching, param details, and return structure, making it complete for a 3-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, the description thoroughly explains each parameter: table with DB-specific examples, connection with default, and force_refresh with functionality, adding significant value.

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

Purpose5/5

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

The description clearly states the tool retrieves column schema merged with semantic annotations, distinguishing it from sibling tools like db_annotate (which adds annotations) and db_list_tables (which lists tables).

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

Usage Guidelines4/5

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

The description provides context on when to use (to get annotated schema) and parameter usage, but lacks explicit guidance on when not to use or alternatives to sibling tools, which would improve clarity.

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

db_list_connectionsA
List all configured database connections without exposing passwords or usernames.

Use this first to see what databases are available before calling other tools.
Returns connection names, drivers, databases, and server addresses.

Returns:
    {connections: [{name, driver, database, server}]}
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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

Discloses that passwords and usernames are not exposed, which is a key behavioral trait. However, does not explicitly state read-only nature or any side effects, though implied for a list operation. No annotations to contradict or supplement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two sentences plus a returns block. Front-loaded with main purpose. Every sentence adds value, no fluff.

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

Completeness5/5

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

Fully explains what the tool does and what it returns (list of connections with name, driver, database, server). No missing info given the simplicity of the tool and absence of parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so baseline is 4. Description does not need to add parameter info. Schema coverage is 100% by default.

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

Purpose5/5

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

Clearly states listing all configured database connections without exposing sensitive info. Differentiates from siblings like db_list_tables by specifying the resource (connections). Uses specific verb 'list' and describes return fields.

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

Usage Guidelines5/5

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

Explicitly advises to use this tool first before other tools to see available databases. Provides a clear usage context and sequential guidance.

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

db_list_tablesA
List all known tables for a connection, with descriptions and column counts.

Tables appear once they have been fetched via db_get_schema or annotated via
db_annotate. Descriptions come from the knowledge store — richer than raw
INFORMATION_SCHEMA.

Args:
    connection: Connection name. Defaults to first defined.

Returns:
    {connection, database, tables: [{table_fqn, description, aliases, column_count}]}
ParametersJSON Schema
NameRequiredDescriptionDefault
connectionNo

TDQS

A4.5/5.0
Behavior4/5

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

No annotations provided, so description carries the burden. It discloses that descriptions come from the knowledge store (richer than raw schema) and that tables are only shown if known. No destructive behavior implied. Return format is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear purpose, behavioral notes, Args, and Returns. Every sentence adds value, no fluff.

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

Completeness5/5

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

Given the tool's simplicity (one optional parameter, no output schema), the description covers all essential aspects: purpose, prerequisites, return format, and parameter behavior. Complete for its complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Single optional parameter 'connection' is documented with default behavior ('Defaults to first defined'), adding useful meaning beyond the schema type and default.

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

Purpose5/5

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

Description clearly states it lists all known tables for a connection, including descriptions and column counts. It distinguishes itself from siblings like db_get_schema (which fetches schema) and db_annotate (which annotates) by noting that tables appear only after those actions.

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

Usage Guidelines4/5

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

Provides context by explaining that tables appear only after being fetched or annotated, guiding the user on prerequisites. However, it does not explicitly state when to use or not use this tool versus alternatives.

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

db_queryA
Execute a read-only SELECT query and return rows as a list of dicts.

All queries run inside an immediately-rolled-back transaction — write
statements are blocked both statically and at the transaction level.
Call db_get_schema first if you are unfamiliar with the table structure.

Args:
    sql:        SELECT query to execute. No INSERT/UPDATE/DELETE allowed.
    connection: Connection name (e.g. "orders.prod"). Defaults to first defined.
    max_rows:   Maximum rows to return (default 500). Set lower for large tables.

Returns:
    {rows, row_count, connection, database, truncated}
ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes
connectionNo
max_rowsNo

TDQS

A4.5/5.0
Behavior4/5

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

The description discloses that queries run in an immediately-rolled-back transaction and that write statements are blocked both statically and at the transaction level. It also outlines the return structure (rows, row_count, connection, database, truncated). Since no annotations are provided, the description carries the full burden and does so well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a single sentence stating the core purpose, followed by a brief note on transaction behavior and a recommendation to use a sibling tool, then a bullet-style summary of parameters and return value. No superfluous information.

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

Completeness4/5

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

Given the tool's complexity (3 parameters, no output schema), the description covers the main behavioral aspects (transaction, write blocking), parameter semantics, and return format. It could optionally mention error handling or performance implications, but overall it is sufficiently complete for an AI agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description provides comprehensive meaning for all three parameters: sql (SELECT-only), connection (defaults to first defined), and max_rows (default 500, lower for large tables). This goes far beyond the bare schema, which only supplies names and types.

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

Purpose5/5

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

The description clearly states the tool executes a read-only SELECT query and returns rows as a list of dicts. It specifies that write statements are blocked, making the purpose unambiguous. Although not explicitly compared to siblings, the verb-resource combination ('Execute a read-only SELECT query') is specific and distinct.

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

Usage Guidelines4/5

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

The description advises to call db_get_schema first if unfamiliar with the table structure, providing a clear alternative. It also implicitly limits usage to read-only queries (SELECT only) and mentions max_rows for large tables. However, it does not explicitly exclude other query types or describe when not to use the tool beyond the SELECT constraint.

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

db_sync_knowledgeA
Copy annotations from one connection's knowledge store to another.

Typical use: after confirming that staging and prod share the same schema,
sync all the semantic knowledge you've built up in staging to prod.
Only syncs tables and columns that exist in the target schema cache —
tables missing from target are reported in 'skipped', columns in 'warnings'.

Args:
    from_connection: Source connection (e.g. "orders.staging").
    to_connection:   Target connection (e.g. "orders.prod").
    tables:          Optional list of specific table FQNs to sync. Defaults to all.

Returns:
    {synced: [...], skipped: [{table, reason}], warnings: [{table, column, reason}]}
ParametersJSON Schema
NameRequiredDescriptionDefault
from_connectionYes
to_connectionYes
tablesNo

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description fully bears the transparency burden. It discloses that only tables/columns existing in target are synced, with skipped and warnings reported. It also describes the return structure in detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured with a typical use case, behavior explanation, and clear Args/Returns sections. No superfluous words.

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

Completeness5/5

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

Given 3 parameters, no output schema, and no annotations, the description is highly complete. It covers the sync process, edge cases (missing items), and return format, leaving no critical gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds meaning by explaining 'from_connection' and 'to_connection' as source/target with example values ('orders.staging', 'orders.prod'), and 'tables' as an optional list of FQNs defaulting to all. This provides clarity beyond the schema.

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

Purpose5/5

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

The description clearly states the tool copies annotations between knowledge stores. It uses a specific verb 'sync' and resource 'annotations from knowledge store', distinguishing it from sibling tools like db_annotate or db_query.

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

Usage Guidelines4/5

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

It provides a typical use case: syncing from staging to prod after confirming schema match. It also explains behavior for missing tables/columns. However, it does not explicitly exclude other scenarios or mention alternatives.

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. Dates show when Glama detected each change.

  1. 12 tool updatesv0.2.2
    • First observeddb_annotate
    • First observeddb_deprecate
    • First observeddb_detect_drift
    • First observeddb_discover_relationships
    • First observeddb_forget
    • First observeddb_get_relationships
    • First observeddb_get_schema
    • First observeddb_list_connections
    • First observeddb_list_tables
    • First observeddb_query
    • First observeddb_search
    • First observeddb_sync_knowledge

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose. There is no overlap: annotation management (annotate, deprecate, forget), schema retrieval (get_schema, list_tables), querying (query), searching (search), relationship discovery (discover_relationships, get_relationships), drift detection (detect_drift), and knowledge sync (sync_knowledge) are all separate concerns.

Naming Consistency5/5

All tools follow the consistent pattern `db_<verb>_<noun>` using snake_case. The verbs are descriptive and indicate the action (e.g., annotate, query, list_tables). No mixing of conventions or vague names.

Tool Count5/5

With 12 tools, the server is well-scoped for a database knowledge management system. Each tool serves a necessary function in the lifecycle of schema understanding, annotation, querying, and maintenance. Not overloaded nor sparse.

Completeness4/5

The tool set covers the core workflow: connection listing, table discovery, schema retrieval, querying, annotation CRUD (annotate, deprecate, forget), relationship discovery, drift detection, and knowledge sync. Missing a direct tool to view all annotations in isolation, but schema retrieval and search provide access.

Maintenance

ActivityActive
ResponsivenessSlow

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SurajKGoyal/amnesic'

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