Prisma Migrate Dev is used to update Prisma whenever the schema.prisma file has been modified. Always provide a descriptive name argument describing the change that was made to the Prisma Schema. The migrate dev command performs these steps: 1. Reruns the existing migration history in the shadow ...
AI agents invoke migrate-dev to trigger actions in Prisma MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
migrate-dev executes database migration operations that alter schema structure. While it creates new migration files (Write) and applies schema changes to a database (Execute/potentially Destructive), it is primarily an execution operation that triggers multi-step database transformations.
From the tool's definition migrate dev command performs these steps: Reruns the existing migration history in the shadow database, Applies pending migrations, Generates a new migration
Documented attack patterns abuse exactly the kind of access migrate-dev gives an agent:
PolicyLayer is an MCP gateway — it sits between your AI agents and Prisma MCP Server, and nothing reaches the server without passing your rules. This is the rule we recommend for migrate-dev:
{
"version": "1",
"default": "deny",
"tools": {
"migrate-dev": {
"limits": [
{
"counter": "migrate-dev_rate",
"window": "minute",
"max": 10,
"scope": "grant"
}
]
}
}
} migrate-dev stays usable, but rate-capped — a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
Free to start. No card required.
Prisma Migrate Dev is used to update Prisma whenever the schema.prisma file has been modified. Always provide a descriptive name argument describing the change that was made to the Prisma Schema. The migrate dev command performs these steps: 1. Reruns the existing migration history in the shadow database in order to detect schema drift (edited or deleted migration file, or a manual changes to the database schema) 2. Applies pending migrations to the shadow database (for example, new migrations created by colleagues) 3. Generates a new migration from any changes you made to the Prisma schema before running migrate dev 4. Applies all unapplied migrations to the development database and updates the _prisma_migrations table 5. Triggers the generation of artifacts (for example, Prisma Client). It is categorised as a Execute tool in the Prisma MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Prisma MCP Server MCP server in PolicyLayer and add a rule for migrate-dev: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Prisma MCP Server. Nothing to install.
migrate-dev is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the migrate-dev rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for migrate-dev. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
migrate-dev is provided by the Prisma MCP Server MCP server (prisma/prisma). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 4 Prisma MCP Server tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4 Prisma MCP Server tools catalogued and risk-classified — across an index of 42,500+ MCP servers.