Table of Contents

Class SkillResource

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

Represents a single file belonging to a skill, as listed in a Resources manifest.

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

Remarks

This is distinct from Resource, the base protocol's resource metadata type. A SkillResource carries only the integrity information a host needs to verify a skill's file: its URI, digest, and size.

See the Skills extension specification for details.

Properties

Digest

Gets or sets the SHA-256 digest of the file's raw bytes, formatted as sha256:{hex} where {hex} is 64 lowercase hexadecimal characters.

[JsonPropertyName("digest")]
public required string Digest { get; set; }

Property Value

string

Remarks

Digests are unsigned and supplied by the same server that supplies the content. A match proves the manifest and the content are consistent; it is not a security boundary and must not be treated as one.

Size

Gets or sets the length in bytes of the file's raw content, being the same bytes Digest covers.

[JsonPropertyName("size")]
public required long Size { get; set; }

Property Value

long

Remarks

A read whose byte length differs from this value is a verification failure equivalent to a digest mismatch.

Uri

Gets or sets the resource URI of the file, readable via resources/read.

[JsonPropertyName("uri")]
public required string Uri { get; set; }

Property Value

string