Skip to main content
Glama
wabox32

schema-engram-mcp

by wabox32

db_schema_get

Retrieve saved database schema snapshots to access table structures and metadata. Specify workspace and connection to get the latest schema or a specific snapshot by ID.

Instructions

Obtiene un esquema guardado. Si snapshot_id es None, devuelve el más reciente para workspace_id + connection_name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspace_idYes
connection_nameYes
snapshot_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool `db_schema_get` is registered and implemented in `server.py`. It handles retrieving a database schema snapshot by ID or the most recent one.
    @mcp.tool()
    def db_schema_get(
        workspace_id: str,
        connection_name: str,
        snapshot_id: int | None = None,
    ) -> str:
        """
        Obtiene un esquema guardado. Si `snapshot_id` es None, devuelve el más reciente
        para workspace_id + connection_name.
        """
        conn = _get_conn()
        if snapshot_id is not None:
            row = storage.get_snapshot_by_id(conn, snapshot_id)
            if row is None:
                return json.dumps({"error": "snapshot not found"}, ensure_ascii=False)
            if row["workspace_id"] != workspace_id.strip() or row["connection_name"] != connection_name.strip():
                return json.dumps(
                    {"error": "snapshot_id no coincide con workspace/connection"},
                    ensure_ascii=False,
                )
        else:
            row = storage.get_latest(
                conn, workspace_id=workspace_id.strip(), connection_name=connection_name.strip()
            )
            if row is None:
                return json.dumps({"error": "no hay instantáneas"}, ensure_ascii=False)
        return json.dumps(row, ensure_ascii=False)
Behavior2/5

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 mentions that it returns the most recent schema when snapshot_id is None, which adds some context. However, it lacks details on permissions, error handling, rate limits, or what the output contains (though an output schema exists). For a tool with no annotations, this is insufficient.

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 front-loaded: it states the main purpose in the first phrase, followed by a conditional behavior. Both sentences earn their place by providing essential information without waste.

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

Completeness3/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 annotations, but with an output schema), the description is minimally adequate. It explains the core functionality and one parameter's behavior, but lacks details on permissions, errors, or full parameter semantics. The output schema reduces the need to describe return values, but more context is still needed for a higher score.

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

Parameters2/5

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 explains the behavior of snapshot_id (if None, returns the most recent), which adds meaning for one parameter. However, it doesn't clarify workspace_id or connection_name, leaving two parameters undocumented. This partial coverage is inadequate given the low schema coverage.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Obtiene un esquema guardado' (Gets a saved schema). It specifies the verb (obtiene/gets) and resource (esquema guardado/saved schema), making the action clear. However, it doesn't explicitly differentiate from siblings like db_schema_list or db_schema_update, which would require a 5.

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 context on when to use it: 'Si `snapshot_id` es None, devuelve el más reciente para workspace_id + connection_name' (If snapshot_id is None, returns the most recent for workspace_id + connection_name). This gives guidance on parameter behavior but doesn't explicitly mention when to use this tool versus alternatives like db_schema_list or db_schema_update, which would be needed for a 5.

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