Skip to main content
Glama
Orphnet

@orphnet/d1-eloquent-mcp

by Orphnet

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_modelsA

List all discovered BaseModel subclasses in the project, with table names and feature flags (soft deletes, revisions, relationships, casts). Read-only.

read_modelA

Return the full source code of a model file plus parsed metadata (relations, casts, static config). Read-only.

list_migrationsB

List all discovered migration files with timestamps. Read-only.

read_migrationB

Return the source of a migration file. Read-only.

migration_statusA

Run d1-eloquent status against the local D1 - shows which migrations have run vs pending. Read-only. The CLI resolves the D1 binding from wrangler config automatically.

inspect_schemaA

Query the local D1 sqlite_master to list every table + the column definitions actually applied. Read-only.

query_d1A

Run a read-only SQL query (SELECT / WITH / EXPLAIN / PRAGMA only) against the local D1. Multi-statement payloads and writes are rejected.

list_seedersA

List discovered seeder files. Read-only.

list_factoriesA

List discovered factory files. Read-only.

read_fileA

Read any project file by path (relative to project root). Read-only.

refresh_projectB

Re-run project discovery, update cached state.

validate_modelA

Compare a single model's declared shape (table, casts, softDeletes, timestamps, revisions) against the actual local D1 schema and return any drift as a list of issues.

validate_allA

Run validate_model across every discovered model. Returns per-model issues and a summary count of ok / warn / fail.

make_modelB

Scaffold a new model file. Delegates to d1-eloquent make:model.

make_migrationB

Scaffold a new migration. Delegates to d1-eloquent make:migration.

make_seederC

Scaffold a new seeder. Delegates to d1-eloquent make:seeder.

make_factoryB

Scaffold a new factory. Delegates to d1-eloquent make:factory.

make_resourceB

Scaffold model + migration + seeder + factory in one go. Delegates to d1-eloquent make:resource.

make_pivotB

Scaffold a pivot table migration. Delegates to d1-eloquent make:pivot.

run_generateA

Diff models against the project's migrations (schema diff) and report what a reconciling migration would change. Dry-run by default: prints per-model added/dropped/type-changed columns and writes NOTHING. Pass write=true to emit migration file(s) into the project's migrations directory (review them, then run_migrate). Delegates to d1-eloquent generate.

run_migrateB

Apply pending migrations. Delegates to d1-eloquent migrate against local D1.

run_rollbackA

Roll back the last migration batch. Delegates to d1-eloquent rollback.

run_freshA

Drop all tables and re-run every migration. Delegates to d1-eloquent fresh --force.

run_seedC

Run seeders. Delegates to d1-eloquent seed.

Prompts

Interactive templates invoked by user choice

NameDescription
create-modelMulti-step walkthrough to scaffold a new model + its migration + seeder + factory, then verify.
audit-schemaCompare every model in the project against the actual D1 schema and report drift.

Resources

Contextual data attached and managed by the client

NameDescription
Project summaryDiscovered project state: models, migrations, seeders, factories, D1 bindings.
BaseModel API
QueryBuilder API
Relationships API
Transactions API
Quick start guide

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/Orphnet/d1-eloquent-mcp'

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