Skip to main content
Glama
args.ts•641 B
import { SchedulerLike } from '../types'; import { isFunction } from './isFunction'; import { isScheduler } from './isScheduler'; function last<T>(arr: T[]): T | undefined { return arr[arr.length - 1]; } export function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined { return isFunction(last(args)) ? args.pop() : undefined; } export function popScheduler(args: any[]): SchedulerLike | undefined { return isScheduler(last(args)) ? args.pop() : undefined; } export function popNumber(args: any[], defaultValue: number): number { return typeof last(args) === 'number' ? args.pop()! : defaultValue; }

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/samihalawa/brevo-mcp'

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