Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
idForProvider.ts884 B
import { Providers } from './providers' export interface Options { includeDefault: boolean } export function idForProvider(provider: Providers, options: Options = { includeDefault: true }): string { const strs = ['String @id'] switch (provider) { case Providers.MONGODB: if (options.includeDefault) { strs.push('@default(auto())') } strs.push('@map("_id") @db.ObjectId') break default: if (options.includeDefault) { strs.push('@default(cuid())') } break } return strs.join(' ') } export interface ForeignKeyOptions { optional?: boolean } export function foreignKeyForProvider(provider: Providers, { optional = false }: ForeignKeyOptions = {}): string { const type = optional ? 'String?' : 'String' if (provider === Providers.MONGODB) { return `${type} @db.ObjectId` } return type }

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