Skip to main content
Glama

Roam Research

by 2b3pro
helpers.ts628 B
// Helper function to get ordinal suffix for numbers (1st, 2nd, 3rd, etc.) export function getOrdinalSuffix(n: number): string { const j = n % 10; const k = n % 100; if (j === 1 && k !== 11) return "st"; if (j === 2 && k !== 12) return "nd"; if (j === 3 && k !== 13) return "rd"; return "th"; } // Format date in Roam's preferred format (e.g., "January 1st, 2024") export function formatRoamDate(date: Date): string { const month = date.toLocaleDateString('en-US', { month: 'long' }); const day = date.getDate(); const year = date.getFullYear(); return `${month} ${day}${getOrdinalSuffix(day)}, ${year}`; }

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/2b3pro/roam-research-mcp'

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