Skip to main content
Glama
util.ts479 B
import { AgentMailClient } from 'agentmail' export const safeFunc = async <T>( func: (client: AgentMailClient, args: Record<string, any>) => Promise<T>, client: AgentMailClient, args: Record<string, any> ) => { try { return { isError: false, result: await func(client, args) } } catch (error) { if (error instanceof Error) return { isError: true, result: error.message } else return { isError: true, result: 'Unknown error' } } }

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/agentmail-to/agentmail-toolkit'

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