Skip to main content
Glama

Generate Schema from Models

models_to_schema
Read-onlyIdempotent

Convert parsed schema models into normalized schema proposals with proposed DDL, pass-through verdicts, and a verification list of medium/low-confidence fields.

Instructions

Convert parsed schema models into normalized schema proposals: proposed DDL, pass-through verdicts, and a verification list of medium/low-confidence fields.

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": "models_to_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile inside an allowed root containing extract_data_models JSON output
entitiesNoParsed schema model entities array (extract_data_models output), inline
source_typeNoSource type: mongoose, prisma, sequelize, sql or json (auto-detected from path)
functional_dependenciesNoOptional declared functional dependencies, one per line: table: A,B -> C,D

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description earns credit for disclosing the output shape (proposed DDL as a proposal rather than executed DDL, pass-through verdicts, and a verification list of medium/low-confidence fields) — useful since no output schema exists. It does not say what happens with an empty/invalid model set or how path and entities interact.

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?

A single front-loaded sentence listing the transformation and its outputs, with no filler. The dense clause chain ('proposed DDL, pass-through verdicts, and a verification list...') is slightly compressed but still readable and every clause carries 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?

With no output schema, the description adequately covers return values via the three named artifacts. Inputs are fully handled by the schema. Remaining gaps are minor: the alternative/combination semantics of path vs inline entities, and what 'pass-through verdicts' concretely contain.

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%: path, entities, source_type (with the mongoose/prisma/sequelize/sql/json enumeration), and functional_dependencies (with a 'table: A,B -> C,D' syntax example) are all documented inline. The description adds no parameter meaning beyond the schema, so the baseline 3 applies.

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 and transformation: 'Convert parsed schema models into normalized schema proposals', and enumerates the three return artifacts (proposed DDL, pass-through verdicts, verification list). An agent can tell this apart from the input producer (extract_data_models) and from DDL export/generation siblings, though no sibling is named explicitly to sharpen 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 by the input provenance (parsed models from extract_data_models). There is no explicit statement of when to choose this over export_schema_ddl, generate_database, or analyze_schema_normalization, and no when-not guidance or prerequisites.

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