Skip to main content
Glama
wabox32

schema-engram-mcp

by wabox32

db_schema_save

Save a snapshot of database schema structure including tables, columns, types, and relationships for persistent reference and version tracking.

Instructions

Guarda una instantánea del esquema de una base de datos.

schema debe ser un objeto JSON con la estructura que quieras persistir (por ejemplo tablas con columnas, tipos, nullability, PK/FK e índices).

Args: workspace_id: Identificador del proyecto o carpeta (p. ej. nombre del repo). connection_name: Nombre lógico de la BD (p. ej. local, staging, prod). schema: Objeto o texto JSON con el esquema. dialect: Opcional: postgresql, mysql, sqlite, etc. label: Etiqueta opcional (p. ej. versión de migración). summary: Nota corta opcional.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
connection_nameYes
schemaYes
dialectNo
labelNo
summaryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The db_schema_save tool is registered and implemented as a decorated function in server.py, which calls storage.save_snapshot to persist the schema data.
    @mcp.tool()
    def db_schema_save(
        workspace_id: str,
        connection_name: str,
        schema: Any,
        dialect: str | None = None,
        label: str | None = None,
        summary: str | None = None,
    ) -> str:
        """
        Guarda una instantánea del esquema de una base de datos.
    
        `schema` debe ser un objeto JSON con la estructura que quieras persistir
        (por ejemplo tablas con columnas, tipos, nullability, PK/FK e índices).
    
        Args:
            workspace_id: Identificador del proyecto o carpeta (p. ej. nombre del repo).
            connection_name: Nombre lógico de la BD (p. ej. local, staging, prod).
            schema: Objeto o texto JSON con el esquema.
            dialect: Opcional: postgresql, mysql, sqlite, etc.
            label: Etiqueta opcional (p. ej. versión de migración).
            summary: Nota corta opcional.
        """
        sid = storage.save_snapshot(
            _get_conn(),
            workspace_id=workspace_id.strip(),
            connection_name=connection_name.strip(),
            schema=schema,
            dialect=dialect.strip() if dialect else None,
            label=label.strip() if label else None,
            summary=summary.strip() if summary else None,
        )
        return json.dumps({"snapshot_id": sid, "ok": True}, ensure_ascii=False)
Behavior2/5

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. While it indicates this is a save/persist operation, it doesn't describe important behavioral traits like whether this creates new records or overwrites existing ones, authentication requirements, error conditions, or rate limits. The description provides basic functional context but lacks critical operational details.

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?

The description is appropriately sized and well-structured with a clear purpose statement followed by parameter explanations. The Args section is organized, though the Spanish/English mix slightly affects coherence. Every sentence adds value with no redundant 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 (6 parameters, mutation operation) and the presence of an output schema (which handles return values), the description provides good contextual coverage. It explains all parameters meaningfully and states the tool's core purpose. The main gap is lack of behavioral transparency details that would be important for a write operation.

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?

With 0% schema description coverage, the description provides substantial semantic value for all 6 parameters. It explains workspace_id as 'proyecto o carpeta (p. ej. nombre del repo)', connection_name as 'nombre lógico de la BD', schema structure expectations, dialect options, and label/summary purposes. This compensates well for the schema's lack of descriptions.

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 with specific verb ('Guarda una instantánea') and resource ('esquema de una base de datos'), distinguishing it from siblings like delete, get, list, and update. It precisely communicates this is a save/persist operation for database schema snapshots.

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

Usage Guidelines3/5

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

The description implies usage context through the parameter explanations (e.g., workspace_id as 'proyecto o carpeta', connection_name as 'nombre lógico de la BD'), but doesn't explicitly state when to use this tool versus alternatives like db_schema_update or db_schema_delete. No explicit when-not-to-use guidance is provided.

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

Install Server

Other Tools

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/wabox32/schema-mcp'

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