Table of Contents

Class SkillResources

Namespace
ModelContextProtocol.Extensions.Skills
Assembly
ModelContextProtocol.Extensions.Skills.dll

Represents a skill's file manifest: either a complete enumeration of the skill's files, or the "dynamic" marker indicating that the skill's content is generated and cannot be digested.

[JsonConverter(typeof(SkillResourcesConverter))]
[Experimental("MCPEXP005", UrlFormat = "https://github.com/modelcontextprotocol/csharp-sdk/blob/main/docs/list-of-diagnostics.md#mcpexp005")]
public sealed class SkillResources
Inheritance
SkillResources
Inherited Members

Remarks

The specification requires this value on every skill entry and admits exactly two forms. An entry with no manifest at all, or with any value other than an array or the string "dynamic", is invalid and hosts must not load it. Use FromResources(IEnumerable<SkillResource>) or Dynamic to construct one. This union represents the supported wire forms; it does not validate the supplied file entries or their agreement with the owning skill. High-level Skills operations perform those structural checks.

See the Skills extension specification for details.

Properties

Dynamic

Gets a manifest representing a skill whose content is generated dynamically.

public static SkillResources Dynamic { get; }

Property Value

SkillResources

Remarks

A skill declared this way offers no content integrity and cannot be content-bound. Hosts may decline to load it, and server authors should expect that some will.

Entries

Gets the enumerated files, or null when IsDynamic is true.

public IReadOnlyList<SkillResource>? Entries { get; }

Property Value

IReadOnlyList<SkillResource>

IsDynamic

Gets a value indicating whether this manifest is the "dynamic" marker.

[MemberNotNullWhen(false, "Entries")]
public bool IsDynamic { get; }

Property Value

bool

Methods

FromResources(IEnumerable<SkillResource>)

Creates a manifest enumerating every file of a skill.

public static SkillResources FromResources(IEnumerable<SkillResource> resources)

Parameters

resources IEnumerable<SkillResource>

The skill's complete file list. It must include an entry whose URI equals the skill's own Uri, carrying the digest and size of the SKILL.md itself.

Returns

SkillResources

A manifest wrapping a copy of resources.

Exceptions

ArgumentNullException

resources is null.