Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
PathExclusion.php1.04 kB
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Config\Exclude; /** * Exact path exclusion pattern * * Excludes specific paths (directories or files) */ final readonly class PathExclusion extends AbstractExclusion { private string $normalizedPattern; public function __construct(string $pattern) { parent::__construct($pattern); $this->normalizedPattern = $this->normalizePattern($pattern); } /** * Check if a path matches this exclusion pattern * * A path matches if it's exactly the same as the pattern * or if it's a file within the directory specified by the pattern */ public function matches(string $path): bool { $normalizedPath = $this->normalizePattern($path); return $normalizedPath === $this->normalizedPattern || \str_contains($normalizedPath, $this->normalizedPattern); } public function jsonSerialize(): array { return [ 'pattern' => $this->pattern, ]; } }

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