Skip to main content
Glama
batch.ts572 B
/** * Batch Formatters * * Batch operation result formatters */ import type { BatchResult, BatchSummary } from '../types/batch.js'; /** Format batch results */ export function formatBatchResults(results: BatchResult[]): BatchSummary { const succeeded = results.filter((r) => r.success).length; return { total: results.length, succeeded, failed: results.length - succeeded, results, }; } /** Extract error message */ export function getErrorMessage(error: unknown): string { return error instanceof Error ? error.message : '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/huiseo/outline-smart-mcp'

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