Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,210
  • Linux
  • Apple
getModelActions.ts485 B
import type * as DMMF from '@prisma/dmmf' import { DMMFHelper } from '../../dmmf' export function getModelActions(dmmf: DMMFHelper, name: string) { const mapping = dmmf.mappingsMap[name] ?? { model: name, plural: `${name}s` } const mappingKeys = Object.keys(mapping).filter( (key) => key !== 'model' && key !== 'plural' && mapping[key], ) as DMMF.ModelAction[] if ('aggregate' in mapping) { mappingKeys.push('count' as DMMF.ModelAction) } return mappingKeys }

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