Table of Contents

Class Skill

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

Represents the entry for a single skill, as returned by skills/list and skills/get.

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

Remarks

An entry describes a skill: the URI of its SKILL.md, the verbatim frontmatter of that file, and a manifest of the skill's files with their digests and sizes. A host that pages through a listing has everything it needs to build its registry, present a skill for approval, and verify every file it later reads, without a second round-trip per skill.

See the Skills extension specification for details.

Properties

AllowedTools

Gets the skill's allowed-tools value from Frontmatter, a space-separated string of tools, or null if it is absent or not a string.

[JsonIgnore]
public string? AllowedTools { get; }

Property Value

string

Remarks

The Agent Skills specification marks this field as experimental. A server that sets it is asking for elevated access on the host, so the Skills extension specification requires hosts to ignore it for skills that arrive over MCP unless the user has explicitly approved that grant for that skill.

Compatibility

Gets the skill's compatibility from Frontmatter, or null if it is absent or not a string.

[JsonIgnore]
public string? Compatibility { get; }

Property Value

string

Remarks

The Agent Skills specification uses it to state environment requirements, such as the intended product, system packages, or network access.

Description

Gets the skill's description from Frontmatter, or null if it is absent or not a string.

[JsonIgnore]
public string? Description { get; }

Property Value

string

Frontmatter

Gets or sets the skill's SKILL.md YAML frontmatter, rendered verbatim as a JSON object.

[JsonPropertyName("frontmatter")]
public required JsonObject Frontmatter { get; set; }

Property Value

JsonObject

Remarks

Every field the author wrote is passed through, not a curated subset. name and description must be present in valid entries. Hosts re-parse the fetched SKILL.md and compare its frontmatter against this object field by field, treating any discrepancy as a verification failure, so this must reproduce the authored frontmatter exactly. Structural validation of the entry does not read the file to check that.

License

Gets the skill's license from Frontmatter, or null if it is absent or not a string.

[JsonIgnore]
public string? License { get; }

Property Value

string

Remarks

The Agent Skills specification defines it as a license name or a reference to a license file bundled with the skill.

Meta

Gets or sets metadata reserved by the protocol for clients and servers to associate with this skill.

[JsonPropertyName("_meta")]
public JsonObject? Meta { get; set; }

Property Value

JsonObject

Remarks

This metadata is separate from the metadata field in Frontmatter. Implementations must not make assumptions about its contents.

Name

Gets the skill's name from Frontmatter, or null if it is absent or not a string.

[JsonIgnore]
public string? Name { get; }

Property Value

string

Remarks

A skill's name is a label, not an identifier. Skills are identified by Uri within a server, and by the pair of server identity and Uri across servers.

Resources

Gets or sets the skill's file manifest: an enumeration of every file with its digest and size, or Dynamic when the skill's content is generated and cannot be digested.

[JsonPropertyName("resources")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public required SkillResources Resources { get; set; }

Property Value

SkillResources

Uri

Gets or sets the resource URI of the skill's SKILL.md, readable via resources/read.

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

Property Value

string

Remarks

The decoded path segment preceding /SKILL.md must equal the name field of Frontmatter, so that a skill's name is recoverable from its URI alone.