Skip to main content
Glama
validateYamlMergeKeys.ts799 B
import * as yaml from 'yaml'; import { ValidationContext } from '../types.js'; /** * Validates that YAML merge keys are not used (invalid in LAML) */ export function validateYamlMergeKeys(context: ValidationContext): void { const { document, session } = context; yaml.visit(document, { Pair(_, pair) { if (yaml.isScalar(pair.key) && pair.key.value === '<<') { session.logger.addError({ code: 'LAML_YAML_MERGE_KEY_INVALID', message: 'YAML merge keys (<<:) are not allowed in LAML. Use explicit LAML references instead.', context: { invalidSyntax: '<<: *reference', suggestion: 'Use explicit property assignment with LAML reference like "property: \'*section.property\'"' } }); } } }); }

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/EgorKluch/mcp-laml'

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