This is the documentation for v2 — looking for the v1 documentation?
Skip to content

MCP TypeScript SDK (V2) / @modelcontextprotocol/server / ext/skills/types

ext/skills/types ​

Interfaces ​

SkillCatalogChanges ​

Defined in: packages/server/src/ext/skills/types.ts:68

What a reload() changed, as SKILL.md URIs.

Properties ​

added ​

added: string[]

Defined in: packages/server/src/ext/skills/types.ts:69

changed ​

changed: string[]

Defined in: packages/server/src/ext/skills/types.ts:71

listChanged ​

listChanged: boolean

Defined in: packages/server/src/ext/skills/types.ts:76

Whether what clients list changed: a skill added or removed, or a SKILL.md's name or description. When true, tell clients (resources/list_changed); behind createMcpHandler, call handler.notify.resourcesChanged().

removed ​

removed: string[]

Defined in: packages/server/src/ext/skills/types.ts:70


SkillCatalogOptions ​

Defined in: packages/server/src/ext/skills/types.ts:58

Extends ​

Properties ​

cacheHint? ​

optional cacheHint?: CacheHint

Defined in: packages/server/src/ext/skills/types.ts:33

ttlMs / cacheScope for skills/list, skills/get, directory reads and skill files (2026-07-28). Default 0 / private.

Inherited from ​

SkillsOptions.cacheHint

limits? ​

optional limits?: object

Defined in: packages/server/src/ext/skills/types.ts:64

Publication limits per skill. Default SKILL_LIMITS (512 files, 16 MiB). Beyond them: a warning, or an error under strict.

bytes? ​

optional bytes?: number

files? ​

optional files?: number

onWarning? ​

optional onWarning?: (warning) => void

Defined in: packages/server/src/ext/skills/types.ts:37

Where warnings go. Default: console.warn (stderr).

Parameters ​
warning ​

SkillWarning

Returns ​

void

Inherited from ​

SkillsOptions.onWarning

pageSize? ​

optional pageSize?: number

Defined in: packages/server/src/ext/skills/types.ts:62

Entries per skills/list and directory page: a positive integer or Infinity. Default 100.

prefix? ​

optional prefix?: string

Defined in: packages/server/src/ext/skills/types.ts:60

Organisational prefix: 'acme' serves skill://acme/<skill>/….

strict? ​

optional strict?: boolean

Defined in: packages/server/src/ext/skills/types.ts:35

Turn problems that are otherwise warnings into errors. Default false.

Inherited from ​

SkillsOptions.strict


SkillFileEntry ​

Defined in: packages/server/src/ext/skills/types.ts:47

One child of a directory. unsupported marks symlinks and other special files; the catalog skips the skill that contains one.

Properties ​

kind ​

kind: "file" | "directory" | "unsupported"

Defined in: packages/server/src/ext/skills/types.ts:49

name ​

name: string

Defined in: packages/server/src/ext/skills/types.ts:48


SkillFiles ​

Defined in: packages/server/src/ext/skills/types.ts:53

Storage adapter for catalogs: two operations over relative, /-separated paths ('' is the root).

Methods ​

list() ​

list(dir): Promise<SkillFileEntry[]>

Defined in: packages/server/src/ext/skills/types.ts:54

Parameters ​
dir ​

string

Returns ​

Promise<SkillFileEntry[]>

read() ​

read(path): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/server/src/ext/skills/types.ts:55

Parameters ​
path ​

string

Returns ​

Promise<Uint8Array<ArrayBufferLike>>


SkillsOptions ​

Defined in: packages/server/src/ext/skills/types.ts:31

Extended by ​

Properties ​

cacheHint? ​

optional cacheHint?: CacheHint

Defined in: packages/server/src/ext/skills/types.ts:33

ttlMs / cacheScope for skills/list, skills/get, directory reads and skill files (2026-07-28). Default 0 / private.

onWarning? ​

optional onWarning?: (warning) => void

Defined in: packages/server/src/ext/skills/types.ts:37

Where warnings go. Default: console.warn (stderr).

Parameters ​
warning ​

SkillWarning

Returns ​

void

strict? ​

optional strict?: boolean

Defined in: packages/server/src/ext/skills/types.ts:35

Turn problems that are otherwise warnings into errors. Default false.


SkillSource ​

Defined in: packages/server/src/ext/skills/types.ts:14

A catalog you build yourself: per-user, generated per request, too large to enumerate, or "dynamic".

Methods ​

get() ​

get(uri, ctx): Promise<{[key: string]: unknown; _meta?: Record<string, unknown>; frontmatter: {[key: string]: unknown; description: string; name: string; }; resources: "dynamic" | object[]; uri: string; } | undefined>

Defined in: packages/server/src/ext/skills/types.ts:18

The entry whose SKILL.md is at uri, listed or not; undefined when none is served.

Parameters ​
uri ​

string

ctx ​

ServerContext

Returns ​

Promise<{[key: string]: unknown; _meta?: Record<string, unknown>; frontmatter: {[key: string]: unknown; description: string; name: string; }; resources: "dynamic" | object[]; uri: string; } | undefined>

list() ​

list(params, ctx): Promise<{ nextCursor?: string; skills: object[]; }>

Defined in: packages/server/src/ext/skills/types.ts:16

One page of entries; an empty or partial listing is allowed.

Parameters ​
params ​
cursor? ​

string

ctx ​

ServerContext

Returns ​

Promise<{ nextCursor?: string; skills: object[]; }>

listResources()? ​

optional listResources(ctx): Promise<object[]>

Defined in: packages/server/src/ext/skills/types.ts:28

What appears in resources/list (a small set; not paged). Absent: nothing is listed.

Parameters ​
ctx ​

ServerContext

Returns ​

Promise<object[]>

read() ​

read(uri, ctx): Promise<SkillReadResult | undefined>

Defined in: packages/server/src/ext/skills/types.ts:20

A skill file's content; undefined when no such file is served.

Parameters ​
uri ​

string

ctx ​

ServerContext

Returns ​

Promise<SkillReadResult | undefined>

readDirectory()? ​

optional readDirectory(uri, params, ctx): Promise<{ nextCursor?: string; resources: object[]; } | undefined>

Defined in: packages/server/src/ext/skills/types.ts:22

Direct children of a directory resource; undefined when uri is not one. Implementing it declares directoryRead.

Parameters ​
uri ​

string

params ​
cursor? ​

string

ctx ​

ServerContext

Returns ​

Promise<{ nextCursor?: string; resources: object[]; } | undefined>


SkillSourceOptions ​

Defined in: packages/server/src/ext/skills/types.ts:40

Extends ​

Properties ​

baseUri? ​

optional baseUri?: string

Defined in: packages/server/src/ext/skills/types.ts:43

Every URI the source serves starts with this. Default skill://.

cacheHint? ​

optional cacheHint?: CacheHint

Defined in: packages/server/src/ext/skills/types.ts:33

ttlMs / cacheScope for skills/list, skills/get, directory reads and skill files (2026-07-28). Default 0 / private.

Inherited from ​

SkillsOptions.cacheHint

onWarning? ​

optional onWarning?: (warning) => void

Defined in: packages/server/src/ext/skills/types.ts:37

Where warnings go. Default: console.warn (stderr).

Parameters ​
warning ​

SkillWarning

Returns ​

void

Inherited from ​

SkillsOptions.onWarning

source ​

source: SkillSource

Defined in: packages/server/src/ext/skills/types.ts:41

strict? ​

optional strict?: boolean

Defined in: packages/server/src/ext/skills/types.ts:35

Turn problems that are otherwise warnings into errors. Default false.

Inherited from ​

SkillsOptions.strict


SkillWarning ​

Defined in: packages/server/src/ext/skills/types.ts:5

A problem found while building or serving skills. path names the file, folder or URI.

Properties ​

message ​

message: string

Defined in: packages/server/src/ext/skills/types.ts:7

path ​

path: string

Defined in: packages/server/src/ext/skills/types.ts:6

Type Aliases ​

SkillReadResult ​

SkillReadResult = { mimeType?: string; text: string; } | { bytes: Uint8Array; mimeType?: string; }

Defined in: packages/server/src/ext/skills/types.ts:11

A skill file's content: text (sent as text) or bytes (sent as a base64 blob).