Skip to main content
Glama

export_data_model

Read-only

Exports the current project's data model (MCD/ERD) in a universal format. Supported formats: 'dbml' (DBML / dbdiagram.io), 'sql-postgres' (PostgreSQL DDL — CREATE TABLE + ALTER TABLE FK), 'json-schema' (JSON Schema Draft 2020-12 with a vendor extension for relations), 'mermaid' (Mermaid ERD for documentation). Returns the serialized content + metadata (mimeType, extension, stats). 'dbml' is for transferring to dbdiagram.io, 'sql-postgres' for bootstrapping a database, 'json-schema' for driving a REST API. ⚠️ ROUND TRIP: only 'dbml', 'sql-postgres' and 'json-schema' can be re-imported (import_data_model). 'mermaid' is OUTBOUND-ONLY — it has no parser: a data model that leaves in this format does not come back, and a file edited elsewhere cannot be fed back in.

Input Schema

NameRequiredDescriptionDefault
formatYesOutput format. Recommended: 'dbml' (DBML / dbdiagram.io), 'sql-postgres' (PostgreSQL DDL), 'json-schema' (Draft 2020-12), 'mermaid' (ERD).
expectedProjectIdNoUUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID du projet visé par CET appel. Cible RÉELLEMENT ce projet au lieu du projet de session. Refusé sans rien modifier si l'accès n'est pas accordé."New value: +"UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted."
    • changedInput schema / properties / format / description
      Previous value: -"Format de sortie. Recommandé : 'dbml' (DBML / dbdiagram.io), 'sql-postgres' (PostgreSQL DDL), 'json-schema' (Draft 2020-12), 'mermaid' (ERD)."New value: +"Output format. Recommended: 'dbml' (DBML / dbdiagram.io), 'sql-postgres' (PostgreSQL DDL), 'json-schema' (Draft 2020-12), 'mermaid' (ERD)."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint; the description adds substantive behavior on top: the exact return shape ('serialized content + metadata (mimeType, extension, stats)'), and the irreversibility caveat that mermaid output can never be re-imported or fed back in. That lossy-format warning is the kind of consequence an agent cannot infer from annotations or schema.

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?

Front-loaded with purpose and format inventory, then the warning, with no filler sentences. There is mild redundancy between the initial format list and the later 'dbml is for…' sentences, but each still carries distinct decision value.

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?

With no output schema, the description correctly takes on the burden of describing the return payload, and it covers formats, round-trip limits, and project targeting. The one gap is that it never scopes itself against export_ddl/export_diagram, which is the remaining ambiguity for a multi-export toolset.

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 description coverage is 100%, so both parameters are already documented, including expectedProjectId's targeting-and-refusal semantics. The description nonetheless adds meaning beyond the schema by attaching a use case and a round-trip capability to each enum value, which the schema's terse enum description does not fully convey.

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?

States a precise verb+resource ('Exports the current project's data model (MCD/ERD)') and enumerates the four concrete output formats with a one-line purpose for each. It also distinguishes itself from import_data_model by spelling out which formats survive the round trip, so an agent can tell export from import without opening a schema.

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

Usage Guidelines4/5

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

Gives explicit routing guidance per format ('dbml' for dbdiagram.io transfer, 'sql-postgres' for bootstrapping a database, 'json-schema' for driving a REST API) and an explicit when-not via the OUTBOUND-ONLY mermaid warning. It does not, however, address the closest siblings export_ddl and export_diagram, whose overlap with the sql-postgres/mermaid outputs is left for the agent to guess.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.