Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
ModelFile.ts878 B
import * as ts from '@prisma/ts-builders' import { GenerateContext } from '../GenerateContext' import { Model } from '../Model' export function createModelFile(context: GenerateContext, modelName: string): string { const jsDocHeader = `/* * This file exports the \`${modelName}\` model and its related types. * * 🟢 You can import this file directly. */ ` const imports = [ ts.moduleImport(context.runtimeImport).asNamespace('runtime').typeOnly(), ts.moduleImport(context.importFileName(`../enums`)).asNamespace('$Enums').typeOnly(), ts.moduleImport(context.importFileName(`../internal/prismaNamespace`)).asNamespace('Prisma').typeOnly(), ] const importsString = imports.map((i) => ts.stringify(i)).join('\n') const model = context.dmmf.typeAndModelMap[modelName] return jsDocHeader + importsString + '\n' + new Model(model, context).toTS() }

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/prisma/prisma'

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