| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | /** |
| 6: | * This file is part of the Nexus MCP SDK package. |
| 7: | * |
| 8: | * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com> |
| 9: | * |
| 10: | * For the full copyright and license information, please view |
| 11: | * the LICENSE file that was distributed with this source code. |
| 12: | */ |
| 13: | |
| 14: | namespace Nexus\Mcp\Extension\Skills\Server; |
| 15: | |
| 16: | use Nexus\Mcp\Core\Schema\Resource\Resource; |
| 17: | use Nexus\Mcp\Extension\Skills\Schema\Skill; |
| 18: | use Nexus\Mcp\Server\ServerContext; |
| 19: | |
| 20: | /** |
| 21: | * Source of unlisted skills, such as a set too large to enumerate or one whose content is generated on request. |
| 22: | */ |
| 23: | interface SkillProviderInterface |
| 24: | { |
| 25: | /** |
| 26: | * The entry of the skill whose `SKILL.md` is at the URI, or null when the provider serves no skill there. |
| 27: | * |
| 28: | * @param non-empty-string $uri |
| 29: | */ |
| 30: | public function findSkill(string $uri, ServerContext $context): ?Skill; |
| 31: | |
| 32: | /** |
| 33: | * The file at the URI, or null when the provider serves none there. |
| 34: | * |
| 35: | * @param non-empty-string $uri |
| 36: | */ |
| 37: | public function findFile(string $uri, ServerContext $context): ?SkillFile; |
| 38: | |
| 39: | /** |
| 40: | * The direct children of the directory at the URI, or null when the provider serves no directory there. |
| 41: | * |
| 42: | * @param non-empty-string $uri |
| 43: | * |
| 44: | * @return null|list<Resource> |
| 45: | */ |
| 46: | public function findDirectory(string $uri, ServerContext $context): ?array; |
| 47: | } |
| 48: |