Skip to main content
Glama

mcp-server-cloudflare

Official
by cloudflare
format.ts908 B
import { writeToString } from '@fast-csv/format' /** * A collection of formatting functions (think of it like Golang's `fmt` package) */ export const fmt = { /** * Trims all lines of a string. * Useful for formatting tool instructions. */ trim: (str: string): string => str .trim() .split('\n') .map((line) => line.trim()) .join('\n'), /** * Converts a multi-line string into a single line. * Useful for formatting tool instructions. */ oneLine: (str: string): string => str .trim() .split('\n') .map((line) => line.trim()) .filter((line) => line.length > 0) .join(' '), /** * Convert an array of objects to a string of tab-separated values (TSV). * This is better than JSON for returning data to the model because it uses fewer tokens */ asTSV: (data: any[]): Promise<string> => writeToString(data, { headers: true, delimiter: '\t' }), } as const

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/cloudflare/mcp-server-cloudflare'

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