Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,192
  • Linux
  • Apple
simpleDebounce.ts877 B
// makes sure, that there is only one execution at a time // and the last invocation doesn't get lost (tail behavior of debounce) // mostly designed for watch mode, where it's fine if something fails, we just try catch it /* eslint-disable @typescript-eslint/no-explicit-any */ export function simpleDebounce<T extends Function>(fn: T): T { let executing = false let pendingExecution: any = null return (async (...args) => { if (executing) { // if there are 2 executions 50ms apart, ignore the last one pendingExecution = args return null as any } executing = true await fn(...args).catch((e) => console.error(e)) if (pendingExecution) { await fn(...pendingExecution).catch((e) => console.error(e)) pendingExecution = null } executing = false }) as any } /* eslint-enable @typescript-eslint/no-explicit-any */

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