Skip to main content
Glama
join-media.js872 B
"use strict" const startsWithKeywordRegexp = /^(all|not|only|print|screen)/i module.exports = function (parentMedia, childMedia) { if (!parentMedia.length && childMedia.length) return childMedia if (parentMedia.length && !childMedia.length) return parentMedia if (!parentMedia.length && !childMedia.length) return [] const media = [] parentMedia.forEach(parentItem => { const parentItemStartsWithKeyword = startsWithKeywordRegexp.test(parentItem) childMedia.forEach(childItem => { const childItemStartsWithKeyword = startsWithKeywordRegexp.test(childItem) if (parentItem !== childItem) { if (childItemStartsWithKeyword && !parentItemStartsWithKeyword) { media.push(`${childItem} and ${parentItem}`) } else { media.push(`${parentItem} and ${childItem}`) } } }) }) return media }

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/MatheusgVentura/Project-One'

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