Skip to main content
Glama
role-parser.js376 B
export function extractRoleHeader(source) { const trimmed = source.trimStart(); if (!trimmed.startsWith("/**")) { throw new Error("ROLE_HEADER_MISSING: file must start with /** */ block"); } const endIndex = trimmed.indexOf("*/"); if (endIndex === -1) { throw new Error("ROLE_HEADER_MALFORMED: missing */"); } return trimmed.slice(0, endIndex + 2); }

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/dylanmarriner/MCP-server'

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