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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "<format>"
    },
    "name": "export_data_model"
  }
}

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 THIS call targets (overrides the session project).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous value: -"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."New value: +"UUID of the project THIS call targets (overrides the session project)."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedProjectId / description
      Previous 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."New value: +"UUID of the project THIS call targets (overrides the session project). No access: refused, nothing changed."
  3. 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)."
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description goes well beyond that by disclosing the return payload (serialized content plus mimeType, extension, stats) and a per-format asymmetry with real consequences. The round-trip warning is behavior the annotations cannot express and directly affects an agent's format choice.

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?

Purpose, return shape, format routing, and the round-trip hazard are front-loaded in that order, with no filler. The warning section is somewhat repetitive ('OUTBOUND-ONLY', 'no parser', 'does not come back', 'cannot be fed back in'), which is defensible for a lossy-operation warning but costs a point.

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?

There is no output schema, and the description compensates by describing the returned content and metadata. For a two-parameter read-only export tool, everything an agent needs to choose a format and interpret the result is present, including the one irreversible choice.

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 100%, so the enum values and the UUID format of expectedProjectId are already documented and a baseline of 3 applies. The description adds genuine meaning beyond the schema by explaining the intended downstream use of each format and which ones survive a round trip, though it does not clarify the session-override behavior of expectedProjectId.

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 opens with a specific verb and resource ('Exports the current project's data model (MCD/ERD)') and immediately enumerates all four concrete output formats. An agent can distinguish this from export_ddl or export_diagram because the format set and the round-trip framing are stated explicitly.

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?

It gives per-format routing guidance ('dbml' for dbdiagram.io, 'sql-postgres' for bootstrapping a database, 'json-schema' for driving a REST API) and names the sibling to use for the reverse direction (import_data_model). It also states an explicit exclusion: 'mermaid' cannot be re-imported and edited files cannot be fed back in.

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.