Skip to main content
Glama
rebelice

schema-lint-mcp

by rebelice

Schema Lint MCP

An MCP server that validates schema files against lint rules using Claude or Gemini AI.

Installation

  1. Clone this repository

  2. Install dependencies: npm install

  3. Build the project: npm run build

Related MCP server: machinegrade-validate

Configure with Claude Code

Add this to your Claude Code settings JSON file:

{
  "mcpServers": {
    "schema-lint": {
      "command": "node",
      "args": ["/path/to/schema-lint-mcp/dist/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "your-anthropic-api-key-here",
        "GEMINI_API_KEY": "your-gemini-api-key-here"
      }
    }
  }
}

Or use environment variables:

{
  "mcpServers": {
    "schema-lint": {
      "command": "node",
      "args": ["/path/to/schema-lint-mcp/dist/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "${env:ANTHROPIC_API_KEY}",
        "GEMINI_API_KEY": "${env:GEMINI_API_KEY}"
      }
    }
  }
}

Usage

Once configured, you can use the validate_schema tool in Claude Code:

// Using Claude (default)
validate_schema(schemaPath: "/path/to/schema.json", rulesPath: "/path/to/rules.json")

// Using Gemini
validate_schema(schemaPath: "/path/to/schema.json", rulesPath: "/path/to/rules.json", provider: "gemini")

Example Files

The examples/ directory contains sample schemas and rule sets:

Schema Files

  • schema.json - Example JSON schema

  • schema.sql - Example SQL schema with tables and relationships

Rule Sets

  • rules.json - Basic JSON schema validation rules

  • sql-rules.json - General SQL best practices

  • schema-rules.json - Database schema structure and naming conventions (inspired by Bytebase)

  • migration-rules.json - Database migration safety and compatibility rules (inspired by Bytebase)

Rule Categories

Schema Rules focus on:

  • Naming conventions (tables, columns, indexes)

  • Table structure requirements (primary keys, constraints)

  • Column definitions (types, defaults, nullability)

  • Index optimization

  • Documentation (comments)

Migration Rules focus on:

  • Backward compatibility

  • DDL safety (avoiding table locks, data loss)

  • DML safety (WHERE clauses, row limits)

  • Performance considerations

  • Migration hygiene (separation of concerns)

Available Tools

1 tool
validate_schemaC

Validate a schema file against lint rules

ParametersJSON Schema
NameRequiredDescriptionDefault
providerNoAI provider to use: "claude" or "gemini"claude
rulesPathYesPath to the lint rules file
schemaPathYesPath to the schema file to validate

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure, but it only states a high-level action. It does not disclose whether the tool reads files, makes network calls, has side effects, or what the output format is. The behavior is underspecified.

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?

The description is a single, short sentence that is easy to parse. It contains no filler, though it could be more informative without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is insufficiently complete for a tool with no output schema. It does not explain what a successful validation returns, how errors are reported, or any side effects. The minimal text leaves significant gaps in understanding the tool's behavior.

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 coverage is 100%, so the schema already explains all parameters. The description adds no additional meaning beyond the schema, which is acceptable but does not elevate the score above the baseline.

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?

The description clearly identifies the action ('Validate') and the resource ('a schema file') against 'lint rules'. The purpose is specific and unambiguous, though it does not differentiate from siblings because none are provided.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool, what prerequisite steps are needed, or how it relates to other tools. The description simply states what it does without providing usage context or exclusions.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedvalidate_schema

TDQS

B3.2/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion between tools. The validate_schema tool has a unique and clear purpose.

Naming Consistency5/5

The single tool name follows the verb_noun pattern consistently (validate_schema). There is no inconsistency within the set.

Tool Count3/5

The server has exactly one tool, which is borderline for usability. It feels thin but could be acceptable given the narrow scope of schema validation.

Completeness2/5

The surface only provides validation, with no ability to inspect or configure lint rules. This is a significant gap for a schema linting server, as users cannot discover available rules or customize behavior.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rebelice/schema-lint-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server