Skip to main content
Glama
result.ts580 B
/** * Result type pattern for handling operation results * Success case contains data, failure case contains error */ export type Result<T, E = Error> = | { success: true; data: T } | { success: false; error: E }; /** * Creates a success result with the provided data */ export function createSuccessResult<T>(data: T): { success: true; data: T } { return { data, success: true }; } /** * Creates an error result with the provided error */ export function createErrorResult<E = Error>( error: E, ): { success: false; error: E } { return { error, success: false }; }

Latest Blog Posts

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/8beeeaaat/touchdesigner-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server