Skip to main content
Glama

validate_model

Run structural checks on a model to detect missing primary keys, duplicate codes, and invalid references. Get errors with locations, fix issues, and re-run to confirm.

Instructions

Run built-in structural checks on a model: missing primary keys, duplicate table/column codes, missing data types, missing comments, FK type mismatches, dangling references, duplicate/redundant indexes. Returns passed/errors/warnings with object locations - fix issues and re-run to close the loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool performs non-mutating checks (by telling the user to 'fix issues and re-run') and describes the return as passed/errors/warnings with object locations. It doesn't mention preconditions like whether the model must be open, but the core behavior is clear.

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 sentence front-loads the purpose and packs a useful list of checks plus the re-run loop. Every element adds value and there is no redundant filler.

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?

For a simple one-parameter validation tool, the description covers purpose, the exact checks performed, and the output shape. The main missing piece is clear model_id semantics and whether any model state is required, but an agent can still form a correct call from the description alone.

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%, and the description only says 'on a model' without explaining that model_id is the model identifier, how to obtain it, or any format constraints. With one required parameter and zero schema help, the description fails to compensate.

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 uses a specific verb ('Run') and resource ('structural checks on a model'), then lists concrete checks: missing primary keys, duplicate codes, missing data types/comments, FK mismatches, dangling references, duplicate indexes. This clearly distinguishes validate_model from sibling tools like inspect_schema or check_database_design.

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 implies a validation workflow: run checks, fix issues, re-run to close the loop. This gives clear context for when to use the tool relative to editing operations, though it does not explicitly name alternative tools or state when not to use it.

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