/**
* Generic Result type for operations that can fail
* Used throughout the domain layer to avoid throwing
*/
export type Result<T, E = Error> =
| { success: true; value: T }
| { success: false; error: E };
export const Result = {
ok<T>(value: T): Result<T, never> {
return { success: true, value };
},
fail<E>(error: E): Result<never, E> {
return { success: false, error };
}
};
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/Stefan-Nitu/mcp-xcode'
If you have feedback or need assistance with the MCP directory API, please join our Discord server