@todoist/mcp-core 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,7 +19,9 @@ The MCP SDK and Zod are peer dependencies, so the server and the core share one
19
19
  | `@modelcontextprotocol/server` | `^2.2.0` |
20
20
  | `zod` | `^4.3.0` |
21
21
 
22
- `./testing` also imports `vitest` (4.1 or later) and `@modelcontextprotocol/client` (2.2 or later), from the server's own devDependencies. They are deliberately not peers: npm installs a peer of a production dependency in production, so declaring them would put vitest in every server's `npm ci --omit=dev`.
22
+ `./skills` and `./testing` need `@modelcontextprotocol/server` 2.4 or later, the first with the skills extension. The root entry and `./host` work with 2.2.
23
+
24
+ `./testing` also imports `vitest` (4.1 or later) and `@modelcontextprotocol/client` (2.4 or later), from the server's own devDependencies. They are deliberately not peers: npm installs a peer of a production dependency in production, so declaring them would put vitest in every server's `npm ci --omit=dev`.
23
25
 
24
26
  ## What's in it
25
27
 
@@ -33,7 +35,8 @@ The MCP SDK and Zod are peer dependencies, so the server and the core share one
33
35
  | `annotations` | `getMcpAnnotations`, `formatToolTitle` |
34
36
  | `app-meta` | `normalizeToolMeta` |
35
37
  | `host` (subpath) | `validateBearerToken`, `ValidateBearerTokenOptions`, `TokenValidationError`, `TokenValidationResult`, `ValidateToken`, `McpServerOptions`, `isTransientValidationError`, `getValidationRateLimit`, `ValidationRateLimit`, `buildBearerChallenge`, `createTokenVerdictCache` |
36
- | `testing` (subpath) | `describeOutputSchemaNullability`, `describeAdvertisedToolSchemas`, `describeToolAnnotations`, `describeTokenFootprint`, `measureTokenFootprint`, `findNullablePaths`, `listAdvertisedTools` |
38
+ | `skills` (subpath) | `createSkillsRegistrar`, `McpSkill`, `SkillsRegistrarOptions` |
39
+ | `testing` (subpath) | `describeServedSkills`, `ServedSkillsConfig`, `describeOutputSchemaNullability`, `describeAdvertisedToolSchemas`, `describeToolAnnotations`, `describeTokenFootprint`, `measureTokenFootprint`, `findNullablePaths`, `listAdvertisedTools` |
37
40
 
38
41
  ## Usage
39
42
 
@@ -143,6 +146,41 @@ if (given === undefined && (await api.audience(channelId)) >= 10) {
143
146
  }
144
147
  ```
145
148
 
149
+ ### Serving skills
150
+
151
+ A skill is a workflow a client loads into the model's context only when a task calls for it, served over the `io.modelcontextprotocol/skills` extension. Guidance too long for the `instructions` block, which every request carries, can be spelled out there in full. Only some clients load skills, so routing and safety rules stay in the instructions and tool descriptions.
152
+
153
+ ```ts
154
+ import { McpServer } from '@modelcontextprotocol/server'
155
+ import { createSkillsRegistrar, type McpSkill } from '@todoist/mcp-core/skills'
156
+
157
+ const planMyDay: McpSkill = {
158
+ name: 'plan-my-day',
159
+ files: {
160
+ 'SKILL.md': `---
161
+ name: plan-my-day
162
+ description: Plan the user's day. Use when they ask what to work on today.
163
+ ---
164
+
165
+ Read today's tasks with **find-tasks**, then propose an order.
166
+ `,
167
+ },
168
+ }
169
+
170
+ // Once per process: the listing's file digests are hashed on first use and kept.
171
+ const registerSkills = createSkillsRegistrar([planMyDay], {
172
+ cacheHint: { ttlMs: 3_600_000, cacheScope: 'private' },
173
+ })
174
+
175
+ export function getMcpServer(): McpServer {
176
+ const server = new McpServer({ name: 'notes', version: '1.0.0' })
177
+ registerSkills(server) // before the server connects
178
+ return server
179
+ }
180
+ ```
181
+
182
+ `SKILL.md` starts with YAML frontmatter whose `name` equals the skill's `name` and whose `description` says what it does and when to reach for it: that is all a model sees until it loads the skill. Other files are served next to it under `skill://<name>/`. Skill names must be unique, or `createSkillsRegistrar` throws. Reserve bold for tool names (`**find-tasks**`): `describeServedSkills` checks each bold word against the tools the server advertises, so ordinary emphasis in bold fails it.
183
+
146
184
  ### The wire shape of a result
147
185
 
148
186
  `getToolOutput` turns a `ToolResult` into a `CallToolResult`:
@@ -281,6 +319,13 @@ describeToolAnnotations({
281
319
  - `describeTokenFootprint`: the fixed cost every session pays (the `tools/list` payload as one array, plus `instructions`) stays under `budget`, and either half going missing fails too. It prints the cost per tool. Treat the budget as a ratchet: a rise needs justifying in the change that causes it. `measureTokenFootprint` returns the same numbers. The tokenizer is yours to pass, so mcp-core depends on none.
282
320
  - `describeToolAnnotations`: every advertised tool has exactly the expected annotations, title and defaults included (`openWorldHint` defaults to false), and every expected tool is advertised. Clients decide from these whether a call needs the user's confirmation.
283
321
 
322
+ A server that serves skills runs `describeServedSkills({ createServer, skills })`. It checks:
323
+
324
+ - the server serves exactly those skills;
325
+ - every file reads back matching its listing, as a client checks before using it;
326
+ - every tool a skill names in bold is advertised;
327
+ - the instructions never route to a skill, since only some clients can load one.
328
+
284
329
  ## Rules for tools
285
330
 
286
331
  These hold for every Doist MCP server. Where the core can enforce one, it says how.
@@ -0,0 +1,2 @@
1
+ export { createSkillsRegistrar, type McpSkill, type SkillsRegistrarOptions } from './skills.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,KAAK,QAAQ,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { createSkillsRegistrar } from './skills.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skills/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA8C,MAAM,aAAa,CAAA"}
@@ -0,0 +1,40 @@
1
+ import type { McpServer } from '@modelcontextprotocol/server';
2
+ import { type SkillsOptions } from '@modelcontextprotocol/server/ext/skills';
3
+ /**
4
+ * A skill served over MCP (the `io.modelcontextprotocol/skills` extension): instructions a client
5
+ * loads into the model's context only when a task calls for them, so a workflow can be spelled out
6
+ * in full without adding to every request.
7
+ */
8
+ export type McpSkill = {
9
+ /** The skill's folder name. Must equal the `name` in its `SKILL.md` frontmatter. */
10
+ name: string;
11
+ /**
12
+ * The skill's files, keyed by their path inside the skill's folder. `SKILL.md` starts with
13
+ * YAML frontmatter carrying `name` and `description`: the description is all a model sees
14
+ * until it loads the skill, so it says what the skill does and when to reach for it. Bold is
15
+ * reserved for tool names (`**find-tasks**`), which `describeServedSkills` checks against the
16
+ * tools the server advertises.
17
+ */
18
+ files: {
19
+ 'SKILL.md': string;
20
+ } & Record<string, string>;
21
+ };
22
+ export type SkillsRegistrarOptions = {
23
+ /**
24
+ * How long a client may keep `skills/list`, `skills/get` and the files (2026-07-28). Skills
25
+ * served from code change only with a deploy, so a server usually passes the same hint as its
26
+ * other catalogues. Default: not cached.
27
+ */
28
+ cacheHint?: SkillsOptions['cacheHint'];
29
+ };
30
+ /**
31
+ * Returns a function that serves `skills` on a server: the `skills/list` and `skills/get` methods,
32
+ * a `skill://` resource template for the files, and the extension in the server's capabilities.
33
+ * Clients that do not declare the extension never ask for them. Call it before the server
34
+ * connects.
35
+ *
36
+ * Build one per process, not per server: the listing carries a digest and size of every file,
37
+ * which a client checks each file it reads against, and those are hashed once, on first use.
38
+ */
39
+ export declare function createSkillsRegistrar(skills: readonly McpSkill[], { cacheHint }?: SkillsRegistrarOptions): (server: McpServer) => void;
40
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/skills/skills.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAGH,KAAK,aAAa,EAGrB,MAAM,yCAAyC,CAAA;AAEhD;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG;IACnB,oFAAoF;IACpF,IAAI,EAAE,MAAM,CAAA;IACZ;;;;;;OAMG;IACH,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACzD,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACjC;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;CACzC,CAAA;AAID;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,EAAE,SAAS,EAAE,GAAE,sBAA2B,GAC3C,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAgD7B"}
@@ -0,0 +1,47 @@
1
+ import { SkillsExtension, skillEntry, } from '@modelcontextprotocol/server/ext/skills';
2
+ const SKILL_BASE_URI = 'skill://';
3
+ /**
4
+ * Returns a function that serves `skills` on a server: the `skills/list` and `skills/get` methods,
5
+ * a `skill://` resource template for the files, and the extension in the server's capabilities.
6
+ * Clients that do not declare the extension never ask for them. Call it before the server
7
+ * connects.
8
+ *
9
+ * Build one per process, not per server: the listing carries a digest and size of every file,
10
+ * which a client checks each file it reads against, and those are hashed once, on first use.
11
+ */
12
+ export function createSkillsRegistrar(skills, { cacheHint } = {}) {
13
+ const repeated = skills
14
+ .map((skill) => skill.name)
15
+ .filter((name, index, names) => names.indexOf(name) !== index);
16
+ if (repeated.length > 0) {
17
+ // Two skills at one URI would list twice and serve one's files under the other's name.
18
+ throw new Error(`Skill names must be unique; repeated: ${[...new Set(repeated)].join(', ')}`);
19
+ }
20
+ const files = new Map(skills.flatMap((skill) => Object.entries(skill.files).map(([path, text]) => [`${SKILL_BASE_URI}${skill.name}/${path}`, text])));
21
+ let entries;
22
+ const loadEntries = () => {
23
+ entries ??= Promise.all(skills.map((skill) => skillEntry(skill.name, skill.files, { baseUri: SKILL_BASE_URI })));
24
+ return entries;
25
+ };
26
+ const source = {
27
+ async list() {
28
+ return { skills: await loadEntries() };
29
+ },
30
+ async get(uri) {
31
+ return (await loadEntries()).find((skill) => skill.uri === uri);
32
+ },
33
+ async read(uri) {
34
+ const text = files.get(uri);
35
+ return text === undefined ? undefined : { text, mimeType: 'text/markdown' };
36
+ },
37
+ };
38
+ const extension = new SkillsExtension({
39
+ source,
40
+ baseUri: SKILL_BASE_URI,
41
+ ...(cacheHint ? { cacheHint } : {}),
42
+ });
43
+ return (server) => {
44
+ extension.attach(server);
45
+ };
46
+ }
47
+ //# sourceMappingURL=skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/skills/skills.ts"],"names":[],"mappings":"AACA,OAAO,EAIH,eAAe,EACf,UAAU,GACb,MAAM,yCAAyC,CAAA;AA6BhD,MAAM,cAAc,GAAG,UAAU,CAAA;AAEjC;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CACjC,MAA2B,EAC3B,EAAE,SAAS,EAAE,GAA2B,EAAE;IAE1C,MAAM,QAAQ,GAAG,MAAM;SAClB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAA;IAClE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,uFAAuF;QACvF,MAAM,IAAI,KAAK,CACX,yCAAyC,CAAC,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/E,CAAA;IACL,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,GAAG,CACjB,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CACrB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAC3B,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,cAAc,GAAG,KAAK,CAAC,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,CAAU,CAC9E,CACJ,CACJ,CAAA;IAED,IAAI,OAAqC,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AS,gBAAgB,EAAE,CAAA;IAClC,+EAA+E;IAC/E,YAAY,EAAE,MAAM,SAAS,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,EAC1C,KAAK,EACL,YAAY,GACf,EAAE,uBAAuB,GAAG,IAAI,CAiDhC"}
@@ -1,23 +1,16 @@
1
- import { Client, InMemoryTransport } from '@modelcontextprotocol/client';
2
1
  import { describe, expect, it } from 'vitest';
3
2
  import { z } from 'zod';
3
+ import { withClient } from './in-memory-client.js';
4
4
  const JSON_SCHEMA_2020_12 = 'https://json-schema.org/draft/2020-12/schema';
5
5
  /**
6
6
  * What a client sees of a server before it calls anything: the `tools/list` payload and the
7
7
  * `instructions` block, read through an in-memory client. Closes the server afterwards.
8
8
  */
9
9
  export async function readAdvertisedSurface(server) {
10
- const client = new Client({ name: 'mcp-core-testing', version: '1.0.0' });
11
- const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
12
- await Promise.all([server.connect(serverTransport), client.connect(clientTransport)]);
13
- try {
10
+ return withClient(server, async (client) => {
14
11
  const { tools } = await client.listTools();
15
12
  return { tools, instructions: client.getInstructions() };
16
- }
17
- finally {
18
- await client.close();
19
- await server.close();
20
- }
13
+ });
21
14
  }
22
15
  /** The tools a server advertises on `tools/list`, read through an in-memory client. */
23
16
  export async function listAdvertisedTools(server) {
@@ -1 +1 @@
1
- {"version":3,"file":"advertised-schemas.js","sourceRoot":"","sources":["../../src/testing/advertised-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAExE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,mBAAmB,GAAG,8CAA8C,CAAA;AAE1E;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,MAAiB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,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAC/E,CAAA;YAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACvB,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACxC,MAAM,CAAC,MAAM,EAAE,2BAA2B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;gBACpE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAC1C,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;oBACtC,MAAM,EAAE,eAAe;oBACvB,EAAE,EAAE,OAAO;iBACd,CAAC,CACL,CAAA;gBAED,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;oBACpB,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAC3C,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE;wBACxC,MAAM,EAAE,eAAe;wBACvB,EAAE,EAAE,QAAQ;qBACf,CAAC,CACL,CAAA;gBACL,CAAC;qBAAM,CAAC;oBACJ,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAA;gBAC3D,CAAC;YACL,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Client } from '@modelcontextprotocol/client';
2
+ import type { McpServer } from '@modelcontextprotocol/server';
3
+ /** Connects an in-memory client to `server`, runs `run` with it, then closes both. */
4
+ export declare function withClient<T>(server: McpServer, run: (client: Client) => Promise<T>): Promise<T>;
5
+ //# sourceMappingURL=in-memory-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-client.d.ts","sourceRoot":"","sources":["../../src/testing/in-memory-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,8BAA8B,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAE7D,sFAAsF;AACtF,wBAAsB,UAAU,CAAC,CAAC,EAC9B,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACpC,OAAO,CAAC,CAAC,CAAC,CAYZ"}
@@ -0,0 +1,15 @@
1
+ import { Client, InMemoryTransport } from '@modelcontextprotocol/client';
2
+ /** Connects an in-memory client to `server`, runs `run` with it, then closes both. */
3
+ export async function withClient(server, run) {
4
+ const client = new Client({ name: 'mcp-core-testing', version: '1.0.0' });
5
+ const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
6
+ await Promise.all([server.connect(serverTransport), client.connect(clientTransport)]);
7
+ try {
8
+ return await run(client);
9
+ }
10
+ finally {
11
+ await client.close();
12
+ await server.close();
13
+ }
14
+ }
15
+ //# sourceMappingURL=in-memory-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"in-memory-client.js","sourceRoot":"","sources":["../../src/testing/in-memory-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAGxE,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,UAAU,CAC5B,MAAiB,EACjB,GAAmC;IAEnC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;IACzE,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,iBAAiB,CAAC,gBAAgB,EAAE,CAAA;IAE/E,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;IAErF,IAAI,CAAC;QACD,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,CAAA;IAC5B,CAAC;YAAS,CAAC;QACP,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACpB,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;AACL,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export { describeAdvertisedToolSchemas, listAdvertisedTools, type AdvertisedSchemasConfig, } from './advertised-schemas.js';
2
2
  export { describeOutputSchemaNullability, findNullablePaths } from './nullable-output.js';
3
+ export { describeServedSkills, type ServedSkillsConfig } from './served-skills.js';
3
4
  export { describeTokenFootprint, measureTokenFootprint, type CountTokens, type TokenFootprint, type TokenFootprintConfig, type ToolTokenCost, } from './token-footprint.js';
4
5
  export { describeToolAnnotations, type ExpectedToolAnnotations, type ToolAnnotationsConfig, } from './tool-annotations.js';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,6BAA6B,EAC7B,mBAAmB,EACnB,KAAK,uBAAuB,GAC/B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACzF,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC7B,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,6BAA6B,EAC7B,mBAAmB,EACnB,KAAK,uBAAuB,GAC/B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACzF,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,GACrB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,GAC7B,MAAM,uBAAuB,CAAA"}
@@ -1,5 +1,6 @@
1
1
  export { describeAdvertisedToolSchemas, listAdvertisedTools, } from './advertised-schemas.js';
2
2
  export { describeOutputSchemaNullability, findNullablePaths } from './nullable-output.js';
3
+ export { describeServedSkills } from './served-skills.js';
3
4
  export { describeTokenFootprint, measureTokenFootprint, } from './token-footprint.js';
4
5
  export { describeToolAnnotations, } from './tool-annotations.js';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,6BAA6B,EAC7B,mBAAmB,GAEtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACzF,OAAO,EACH,sBAAsB,EACtB,qBAAqB,GAKxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,uBAAuB,GAG1B,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,6BAA6B,EAC7B,mBAAmB,GAEtB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACzF,OAAO,EAAE,oBAAoB,EAA2B,MAAM,oBAAoB,CAAA;AAClF,OAAO,EACH,sBAAsB,EACtB,qBAAqB,GAKxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,uBAAuB,GAG1B,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { McpServer } from '@modelcontextprotocol/server';
2
+ import type { McpSkill } from '../skills/skills.js';
3
+ export type ServedSkillsConfig = {
4
+ /** Builds a fresh server with the skills registered. Called once per test. */
5
+ createServer: () => McpServer;
6
+ /** Every skill the server should serve. */
7
+ skills: readonly McpSkill[];
8
+ };
9
+ /**
10
+ * Registers tests that the server serves exactly `skills`, as a skills-aware client reads them:
11
+ *
12
+ * - every skill is listed, and no other;
13
+ * - every listed file reads back matching its listing, which a client checks before using it;
14
+ * - every tool a skill names in bold is one the server advertises, so a renamed or removed tool
15
+ * cannot leave a skill pointing at nothing (skills reserve bold for tool names);
16
+ * - the instructions never route to a skill, since only clients that support skills can load one,
17
+ * while every client reads the instructions.
18
+ */
19
+ export declare function describeServedSkills({ createServer, skills }: ServedSkillsConfig): void;
20
+ //# sourceMappingURL=served-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"served-skills.d.ts","sourceRoot":"","sources":["../../src/testing/served-skills.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAInD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,8EAA8E;IAC9E,YAAY,EAAE,MAAM,SAAS,CAAA;IAC7B,2CAA2C;IAC3C,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAA;CAC9B,CAAA;AAeD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,kBAAkB,GAAG,IAAI,CA+DvF"}
@@ -0,0 +1,72 @@
1
+ import { SkillsClient } from '@modelcontextprotocol/client/ext/skills';
2
+ import { describe, expect, it } from 'vitest';
3
+ import { readAdvertisedSurface } from './advertised-schemas.js';
4
+ import { withClient } from './in-memory-client.js';
5
+ /**
6
+ * A tool named in a skill, by the convention that skills reserve bold for tool names:
7
+ * **find-tasks**. Ordinary emphasis in bold reads as a tool name that does not exist.
8
+ */
9
+ const BOLD_NAME = /\*\*([a-z0-9][a-z0-9_-]*)\*\*/g;
10
+ function withSkillsClient(server, run) {
11
+ return withClient(server, (client) => run(new SkillsClient(client)));
12
+ }
13
+ /**
14
+ * Registers tests that the server serves exactly `skills`, as a skills-aware client reads them:
15
+ *
16
+ * - every skill is listed, and no other;
17
+ * - every listed file reads back matching its listing, which a client checks before using it;
18
+ * - every tool a skill names in bold is one the server advertises, so a renamed or removed tool
19
+ * cannot leave a skill pointing at nothing (skills reserve bold for tool names);
20
+ * - the instructions never route to a skill, since only clients that support skills can load one,
21
+ * while every client reads the instructions.
22
+ */
23
+ export function describeServedSkills({ createServer, skills }) {
24
+ describe('served skills', () => {
25
+ it('serves exactly these skills to a client that supports them', async () => {
26
+ const names = await withSkillsClient(createServer(), async (client) => {
27
+ expect(client.supported).toBe(true);
28
+ const { skills: entries } = await client.list();
29
+ return entries.map((entry) => entry.frontmatter.name);
30
+ });
31
+ expect(names.sort()).toEqual(skills.map((skill) => skill.name).sort());
32
+ });
33
+ it('serves every listed file exactly as its listing describes', async () => {
34
+ const files = await withSkillsClient(createServer(), async (client) => {
35
+ const { skills: entries } = await client.list();
36
+ const read = [];
37
+ for (const entry of entries) {
38
+ // createSkillsRegistrar lists every file; a dynamic listing cannot be checked.
39
+ if (entry.resources === 'dynamic') {
40
+ throw new Error(`${entry.frontmatter.name} lists its files dynamically`);
41
+ }
42
+ for (const resource of entry.resources) {
43
+ const file = await client.read(entry, resource.uri);
44
+ read.push({ uri: file.uri, verified: file.verified });
45
+ }
46
+ }
47
+ return read;
48
+ });
49
+ expect(files.map((file) => file.uri).sort()).toEqual(skills
50
+ .flatMap((skill) => Object.keys(skill.files).map((path) => `skill://${skill.name}/${path}`))
51
+ .sort());
52
+ expect(files.filter((file) => !file.verified)).toEqual([]);
53
+ });
54
+ it('names only tools the server advertises', async () => {
55
+ const { tools } = await readAdvertisedSurface(createServer());
56
+ const advertised = new Set(tools.map((tool) => tool.name));
57
+ const named = skills.flatMap((skill) => Object.values(skill.files).flatMap((text) => [...text.matchAll(BOLD_NAME)].map((match) => match[1] ?? '')));
58
+ expect(named.filter((name) => !advertised.has(name))).toEqual([]);
59
+ });
60
+ // A skill named with an ordinary word ("templates") can only be caught by the
61
+ // instructions mentioning skills at all.
62
+ it('is not routed to from the server instructions', async () => {
63
+ const { instructions = '' } = await readAdvertisedSurface(createServer());
64
+ const hyphenated = skills
65
+ .map((skill) => skill.name)
66
+ .filter((name) => name.includes('-'));
67
+ expect(instructions).not.toMatch(/\bskills?\b/i);
68
+ expect(hyphenated.filter((name) => instructions.includes(name))).toEqual([]);
69
+ });
70
+ });
71
+ }
72
+ //# sourceMappingURL=served-skills.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"served-skills.js","sourceRoot":"","sources":["../../src/testing/served-skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AAEtE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AASlD;;;GAGG;AACH,MAAM,SAAS,GAAG,gCAAgC,CAAA;AAElD,SAAS,gBAAgB,CACrB,MAAiB,EACjB,GAAyC;IAEzC,OAAO,UAAU,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,MAAM,CAA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  {
2
2
  "name": "@todoist/mcp-core",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Shared core for the Doist MCP servers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,6 +14,10 @@
14
14
  "types": "./dist/host/index.d.ts",
15
15
  "import": "./dist/host/index.js"
16
16
  },
17
+ "./skills": {
18
+ "types": "./dist/skills/index.d.ts",
19
+ "import": "./dist/skills/index.js"
20
+ },
17
21
  "./testing": {
18
22
  "types": "./dist/testing/index.d.ts",
19
23
  "import": "./dist/testing/index.js"
@@ -64,8 +68,8 @@
64
68
  "@types/node": "25.9.9",
65
69
  "conventional-changelog-conventionalcommits": "9.3.1",
66
70
  "lefthook": "2.2.2",
67
- "oxfmt": "0.79.0",
68
- "oxlint": "1.94.0",
71
+ "oxfmt": "0.80.0",
72
+ "oxlint": "1.95.0",
69
73
  "semantic-release": "25.0.9",
70
74
  "typescript": "7.0.2",
71
75
  "vitest": "5.1.1",