Skip to main content
Glama

Substrate

by ivan-saorin
JSON_VS_YAML.md2.46 kB
# JSON vs YAML Reference Format Comparison ## Before (JSON) ```json { "content": "**{{title}}**\n\n{{content}}\n\n**TL;DR**: {{summary}}\n\n**Edit**: Thanks for the gold, kind stranger!", "metadata": { "site": "reddit", "format_type": "post", "placeholders": ["title", "content", "summary"], "created": "2025-01-18T12:00:00Z", "version": 1 } } ``` ## After (YAML) ```yaml # Reddit post format template content: | **{{title}}** {{content}} **TL;DR**: {{summary}} **Edit**: Thanks for the gold, kind stranger! metadata: site: reddit format_type: post placeholders: - title - content - summary created: '2025-01-18T12:00:00Z' version: 1 ``` ## Key Improvements 1. **Readability**: Content is displayed exactly as it will appear 2. **No escaping**: No need for `\n` characters 3. **Comments**: Can add `#` comments for documentation 4. **Natural formatting**: Indentation shows structure clearly 5. **Less syntax noise**: Fewer quotes, brackets, and commas ## Multiline Benefits ### JSON (hard to read) ```json { "content": "Write with short sentences. Use simple words.\n\nSay what you mean. Cut the fat. Every word must earn its place.\n\nAvoid adverbs. They weaken prose. Strong verbs carry the weight." } ``` ### YAML (natural formatting) ```yaml content: | Write with short sentences. Use simple words. Say what you mean. Cut the fat. Every word must earn its place. Avoid adverbs. They weaken prose. Strong verbs carry the weight. ``` ## Complex Metadata ### JSON ```json { "metadata": { "features": { "formatting": ["bold", "italic", "headers"], "sections": { "intro": true, "body": true, "conclusion": true } } } } ``` ### YAML ```yaml metadata: features: formatting: - bold - italic - headers sections: intro: true body: true conclusion: true ``` ## With Comments ```yaml # Hemingway writing style persona content: | # Core principles Write with short sentences. Use simple words. # Technique Say what you mean. Cut the fat. # Style notes Avoid adverbs. Strong verbs carry weight. metadata: persona: hemingway style: minimalist # These characteristics define the output characteristics: - concise # Short, to the point - direct # No fluff - powerful # Every word matters ``` This is impossible with JSON!

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/ivan-saorin/substrate'

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