Versions in this module Expand all Collapse all v2 v2.3.0 Nov 24, 2026 v2.2.0 Nov 16, 2026 Changes in this version + const DefaultPageSize + const DigestPrefix + const DirectoryMIMEType + const DynamicResources + const ExtensionID + const ListTTL + const MaxNameLength + const MaxResourcesPerSkill + const MaxSkillBytes + const MetaPrefix + const MethodGetSkill + const MethodListSkills + const MethodReadDirectory + const ProtocolVersionRequestScoped + const ReservedMetadataPrefix + const ResultTypeComplete + const SettingDirectoryRead + const SkillFile + const SkillMIMEType + const URIScheme + var ErrInvalidCursor = errors.New("invalid pagination cursor") + var ErrMissingResources = errors.New("skill entry resources must be an array or the string \"dynamic\"") + func Digest(content []byte) string + func FileMIMEType(filePath string, content []byte) string + func FrontmatterEqual(a, b Frontmatter) bool + func IsText(content []byte) bool + func NegotiatedProtocolVersion(ctx context.Context, params mcp.Params, ss *mcp.ServerSession) string + func SkillURI(skillPath, filePath string) string + func SupportsRequestScopedContext(version string) bool + func ValidateDigest(digest string) error + func ValidateName(name string) error + func Verify(content []byte, want EntryResource) error + func WithinSkill(skillPath, uri string) bool + type Child struct + Description string + MIMEType string + Name string + Size int64 + URI string + func (c Child) IsDir() bool + type ContentSource interface + Files func(ctx context.Context) ([]ResourceFile, error) + type DirectorySource interface + ReadDirectory func(ctx context.Context, uri string) ([]Child, bool, error) + type Entry struct + Dynamic bool + Frontmatter Frontmatter + Resources []EntryResource + URI string + func (e *Entry) UnmarshalJSON(data []byte) error + func (e Entry) MarshalJSON() ([]byte, error) + func (e Entry) TotalSize() int64 + func (e Entry) Validate() error + type EntryResource struct + Digest string + Size int64 + URI string + func (r EntryResource) Validate() error + type File struct + Content []byte + MIMEType string + Path string + func (f File) MediaType() string + type Frontmatter map[string]any + func ParseFrontmatter(content []byte) (Frontmatter, string, error) + func (f Frontmatter) Description() string + func (f Frontmatter) Name() string + func (f Frontmatter) Validate() error + type GetSkillParams struct + URI string + type GetSkillResult struct + CacheScope string + ResultType string + Skill Entry + TTLMs *int + type ListSkillsParams struct + Cursor string + type ListSkillsResult struct + CacheScope string + NextCursor string + ResultType string + Skills []Entry + TTLMs *int + type Publisher struct + PageSize int + func NewPublisher(source Source) *Publisher + func (p *Publisher) DeclareCapability(caps *mcp.ServerCapabilities) + func (p *Publisher) Install(s *mcp.Server) error + func (p *Publisher) SupportsDirectoryRead() bool + type ReadDirectoryParams struct + Cursor string + URI string + type ReadDirectoryResult struct + CacheScope string + NextCursor string + Resources []*mcp.Resource + ResultType string + TTLMs *int + type Registry struct + func NewRegistry(skills ...*Skill) (*Registry, error) + func (r *Registry) Files(context.Context) ([]ResourceFile, error) + func (r *Registry) ForTools(available func(string) bool) (*Registry, error) + func (r *Registry) Get(_ context.Context, uri string) (Entry, bool, error) + func (r *Registry) Len() int + func (r *Registry) List(context.Context) ([]Entry, error) + func (r *Registry) ReadDirectory(_ context.Context, uri string) ([]Child, bool, error) + func (r *Registry) Retaining(keep func(*Skill) bool) (*Registry, error) + func (r *Registry) Skill(skillPath string) (*Skill, bool) + func (r *Registry) WithSkills(additional ...*Skill) (*Registry, error) + type ResourceFile struct + Description string + File File + Name string + SkillPath string + URI string + type Skill struct + Dynamic bool + Frontmatter Frontmatter + OptionalTools []string + RequiredTools [][]string + SkillPath string + func NewSkill(skillPath string, files []File) (*Skill, error) + func (s *Skill) Description() string + func (s *Skill) Entry() Entry + func (s *Skill) File(relPath string) (File, bool) + func (s *Skill) Files() []File + func (s *Skill) Name() string + func (s *Skill) Root() string + func (s *Skill) URI() string + type Source interface + Get func(ctx context.Context, uri string) (Entry, bool, error) + List func(ctx context.Context) ([]Entry, error) + type URI struct + FilePath string + Scheme string + SkillPath string + func ParseURI(raw string) (URI, error) + func (u URI) Name() string + func (u URI) Root() string + func (u URI) String() string