Skip to main content
Glama

Extract Data Models

extract_data_models
Read-onlyIdempotent

Parses Mongoose, Prisma, Sequelize, SQL, or JSON schemas into tables and columns, with per-field confidence and known limitations for data model migration or analysis.

Instructions

Parse mongoose, prisma, sequelize, SQL or JSON data declarations into tables and columns, with per-field confidence and an honest limitations list.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_data_models"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoInline source to parse instead of reading a path
pathNoSource file (mongoose model, schema.prisma, sequelize model, SQL or JSON) inside an allowed root
file_nameNoVirtual file name for inline code, used for auto-detection (default input)
source_typeNoSource type: mongoose, prisma, sequelize, sql or json (auto-detected when omitted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), so the description's contribution is the output behavior it volunteers: per-field confidence values and a 'limitations list' that flags where parsing is unreliable. That is genuinely useful disclosure absent from the annotations, though it omits what happens when both 'code' and 'path' are supplied or what errors look like.

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?

A single front-loaded sentence that packs the source formats, the transformation, and the distinctive output traits with no filler or redundant restatement of the title.

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 all parameters optional, no output schema, and a read-only profile, the description gives enough to call the tool correctly and sets expectations about the returned confidence and limitations. The remaining gap is precedence between inline 'code' and 'path', which it never resolves.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including auto-detection and the allowed-root constraint is already documented in the schema. The description's format list duplicates the source_type enum values rather than adding precedence rules or defaults, so a baseline 3 is appropriate.

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?

States a specific verb ('Parse'), enumerates the accepted source formats (mongoose, prisma, sequelize, SQL, JSON) and names the output ('tables and columns'). This distinguishes it from generic code analyzers, but it never names the closest siblings (models_to_schema, analyze_schema_normalization, export_schema_ddl), so the agent must infer the boundary.

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?

Usage is only implied: the agent infers 'use this when you have a data declaration to turn into a table/column model.' There is no explicit when-to-use vs. when-not guidance, no mention of prerequisites such as the allowed-root constraint, and no routing to or from models_to_schema.

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