/**
* Returns an {@link Error} if the value is an instance of Error, otherwise
* returns a string representation of the value.
*/
export function extractErrorFromUnknown(value: unknown): Error | string {
if (value instanceof Error) {
return value
}
return String(value)
}
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