Skip to main content
Glama
selectors.ts513 B
export function normaliseSelector(target: string | string[]): string { if (Array.isArray(target)) { return target.join(' > '); } return target; } export function extractDOMContext(html: string, maxLength: number = 200): string { if (!html) { return ''; } const trimmed = html.trim(); if (trimmed.length <= maxLength) { return trimmed; } return trimmed.substring(0, maxLength) + '...'; } export function buildSelectorPath(target: string[]): string { return target.join(' > '); }

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/Duds/accessibility-mcp'

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