Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
buildDMMF.ts1.01 kB
import { dmmfToRuntimeDataModel, PrunedRuntimeDataModel, pruneRuntimeDataModel, RuntimeDataModel, } from '@prisma/client-common' import type * as DMMF from '@prisma/dmmf' import { escapeJson } from '../TSClient/helpers' import { TSClientOptions } from '../TSClient/TSClient' /** * Given DMMF models, computes runtime datamodel from it and embeds * it into generated client. */ export function buildRuntimeDataModel(datamodel: DMMF.Datamodel, runtimeName: TSClientOptions['runtimeName']) { const runtimeDataModel = dmmfToRuntimeDataModel(datamodel) let prunedDataModel: PrunedRuntimeDataModel | RuntimeDataModel if (runtimeName === 'wasm-engine-edge' || runtimeName === 'wasm-compiler-edge' || runtimeName === 'client') { prunedDataModel = pruneRuntimeDataModel(runtimeDataModel) } else { prunedDataModel = runtimeDataModel } const datamodelString = escapeJson(JSON.stringify(prunedDataModel)) return ` config.runtimeDataModel = JSON.parse(${JSON.stringify(datamodelString)})` }

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