Skip to main content
Glama
IBM

IBM i MCP Server

Official
by IBM
utils.ts1.07 kB
import { clsx, type ClassValue } from 'clsx' import { twMerge } from 'tailwind-merge' export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)) } export const truncateText = (text: string, limit: number) => { if (text) { return text.length > limit ? `${text.slice(0, limit)}..` : text } return '' } export const isValidUrl = (url: string): boolean => { try { const pattern = new RegExp( '^https?:\\/\\/' + '((([a-zA-Z\\d]([a-zA-Z\\d-]*[a-zA-Z\\d])*)\\.)+[a-zA-Z]{2,}|' + 'localhost|' + '\\d{1,3}(\\.\\d{1,3}){3})' + '(\\:\\d+)?' + '(\\/[-a-zA-Z\\d%@_.~+&:]*)*' + '(\\?[;&a-zA-Z\\d%@_.,~+&:=-]*)?' + '(\\#[-a-zA-Z\\d_]*)?$', 'i' ) return pattern.test(url.trim()) } catch { return false } } export const getJsonMarkdown = (content: object = {}) => { let jsonBlock = '' try { jsonBlock = `\`\`\`json\n${JSON.stringify(content, null, 2)}\n\`\`\`` } catch { jsonBlock = `\`\`\`\n${String(content)}\n\`\`\`` } return jsonBlock }

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

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