Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
TextSource.php1 kB
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Source\Text; use Butschster\ContextGenerator\Source\BaseSource; /** * Source for plain text content */ final class TextSource extends BaseSource { /** * @param string $description Human-readable description * @param non-empty-string $content Text content * @param array<non-empty-string> $tags */ public function __construct( public readonly string $content, string $description = '', public readonly string $tag = 'INSTRUCTION', array $tags = [], ) { parent::__construct(description: $description, tags: $tags); } #[\Override] public function jsonSerialize(): array { return \array_filter([ 'type' => 'text', ...parent::jsonSerialize(), 'content' => $this->content, 'tag' => $this->tag, ], static fn($value) => $value !== null && $value !== '' && $value !== []); } }

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