Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
AbstractRenderer.php625 B
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Lib\Content\Renderer; use Butschster\ContextGenerator\Lib\Content\Block\BlockInterface; /** * Abstract base class for content renderers */ abstract class AbstractRenderer implements RendererInterface { public function renderContent(array $blocks): string { $content = ''; foreach ($blocks as $block) { if (!$block instanceof BlockInterface) { continue; } $content .= \preg_replace("/(\r\n|\n)+$/", "\n", $block->render($this)); } return $content; } }

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/context-hub/generator'

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