We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/martechery/mcp-google-ads-ts'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
normalizeApiVersion.ts•513 B
/**
* Normalizes Google Ads API version to standard format
* Handles: "21" → "v21", "v21" → "v21", "V21" → "v21"
*/
export function normalizeApiVersion(version?: string): string {
if (!version) return 'v21';
const normalized = version.toLowerCase().trim();
// Already has v prefix
if (normalized.startsWith('v')) {
return normalized;
}
// Just a number, add v prefix
if (/^\d+$/.test(normalized)) {
return `v${normalized}`;
}
// Fallback to default
return 'v21';
}