@slatesvideo/mcp-server 0.6.2 → 0.6.3

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
@@ -75,9 +75,9 @@ No environment variables, no API keys to paste into config files.
75
75
 
76
76
  ## What the agent can do
77
77
 
78
- <!-- gen:tool-count -->157<!-- /gen:tool-count --> tools covering the full workspace: project, folder, character, location, look, and board management (create / update / delete), image generation and surgical image editing (<!-- gen:image-roster -->Nano Banana 2 (Gemini 3.1 Flash Image), Nano Banana 2 Lite, Nano Banana Pro, GPT Image 2.5 Flare, GPT Image 2.5 Sunburst, FLUX.2 Max, Seedream 5 Lite<!-- /gen:image-roster --> — with project-asset reference images), video generation (<!-- gen:video-roster -->kling-v3.0-std, kling-v3.0-pro, kling-v3.0-omni, veo-3.1-fast, veo-3.1-standard, Seedance 2.0, Seedance 2.5, Gemini Omni Flash, MiniMax H3, MiniMax H3 Max, MiniMax H3 Max Turbo, LTX-2.5, LTX-2.5 Pro<!-- /gen:video-roster -->), audio generation (<!-- gen:audio-roster -->Seed Audio 1.0, ElevenLabs Sound Effects v2, Inworld Realtime TTS-2<!-- /gen:audio-roster -->), lip sync, motion transfer, background generation with status polling, timeline assembly (add / reorder / remove clips), MP4 export and FCP7 XML export for DaVinci Resolve, cost estimation, and credit balance. Bundled prompting/workflow guides are readable at runtime via the `slates_get_prompting_guide` tool — no skill installation needed for MCP-only clients.
78
+ <!-- gen:tool-count -->180<!-- /gen:tool-count --> tools covering the full workspace: project, folder, character, location, look, and board management (create / update / delete), image generation and surgical image editing (<!-- gen:image-roster -->Nano Banana 2.1, GPT Image 2.5 Flare, GPT Image 2.5 Sunburst, FLUX 3 Image, Seedream 5 Lite<!-- /gen:image-roster --> — with project-asset reference images), video generation (<!-- gen:video-roster -->kling-v3.0-std, kling-v3.0-pro, kling-v3.0-omni, Seedance 2.0, Seedance 2.5, Gemini Omni Flash 1.1, Wan 3.0, Kling 4.0, MiniMax H3, MiniMax H3 Max, MiniMax H3 Max Turbo, LTX-2.5, LTX-2.5 Pro<!-- /gen:video-roster -->), audio generation (<!-- gen:audio-roster -->Seed Audio 1.0, ElevenLabs Sound Effects v2, Inworld Realtime TTS-2<!-- /gen:audio-roster -->), lip sync, motion transfer, background generation with status polling, timeline assembly (add / reorder / remove clips), MP4 export and FCP7 XML export for DaVinci Resolve, cost estimation, and credit balance. Bundled prompting/workflow guides are readable at runtime via the `slates_get_prompting_guide` tool — no skill installation needed for MCP-only clients.
79
79
 
80
- Generation tools estimate cost first and ask for confirmation on anything over <!-- gen:confirm-credits -->17<!-- /gen:confirm-credits --> credits, so the agent cannot silently burn credits. Every tool also carries MCP annotations, so a host can auto-approve a read and warn on a delete; the <!-- gen:skill-count -->37<!-- /gen:skill-count --> bundled skills are exposed as MCP **prompts**, and the manual, the model capability table and the live price list as **resources**.
80
+ Generation tools estimate cost first and ask for confirmation on anything over <!-- gen:confirm-credits -->17<!-- /gen:confirm-credits --> credits, so the agent cannot silently burn credits. Every tool also carries MCP annotations, so a host can auto-approve a read and warn on a delete; the <!-- gen:skill-count -->44<!-- /gen:skill-count --> bundled skills are exposed as MCP **prompts**, and the manual, the model capability table and the live price list as **resources**.
81
81
 
82
82
  The timeline, export, background-generation, edit-image, and image-reference tools require a Slates desktop on agent API v2 — if a tool reports a version error, update Slates (Settings → Check for Updates) and retry.
83
83
 
@@ -92,10 +92,9 @@ The timeline, export, background-generation, edit-image, and image-reference too
92
92
  The server lists every tool, and the list stays the same for the whole connection. Your client
93
93
  decides how much of it to load: Claude Code and Codex send the model the tool names only and fetch a
94
94
  tool's full definition when it is needed. `slates_load_tools` with `query` finds a tool by task.
95
- `--tools=compact` starts with a small workspace/discovery set instead and adds tools through
96
- `tools/list_changed`, for a client that re-reads its list mid-chat (Claude Desktop, Claude Code in the
97
- Claude app and Codex do not).
95
+ Legacy `--tools=compact` and `--tools=flat` launch flags are accepted; both expose the full fixed list.
98
96
 
99
- `slates_get_prompting_guide` returns a short readable card by default. Use `query` for a section or
97
+ `slates_get_prompting_guide` with no topic discovers guides from a brief in `query`, or lists the
98
+ catalog without a query. With a topic it returns a short card by default. Use `query` for a section or
100
99
  cinematic technique ID, `depth: "index"` for headings, or `depth: "full"` for the complete guide.
101
100
  Both text and structured content include the actual guide body. No extra loading hook is required.
package/dist/server.js CHANGED
@@ -6,7 +6,7 @@ import { readFileSync } from 'node:fs';
6
6
  import { join, dirname } from 'node:path';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { z } from 'zod';
9
- import { ALL_OPERATIONS, SKILLS, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildAgentDoctrine, APP_MANUAL, defaultContext, toolDefinitions, STARTUP_TOOL_IDS, cachedLatestVersion, refreshLatestVersion, updateNotice, } from '@slatesvideo/shared';
9
+ import { ALL_OPERATIONS, SKILLS, parseSkillMetadata, MODEL_CAPABILITIES, MODEL_FACTS, SlatesCloudClient, buildMcpInstructions, APP_MANUAL, defaultContext, toolDefinitions, cachedLatestVersion, refreshLatestVersion, updateNotice, } from '@slatesvideo/shared';
10
10
  // Slates MCP server. Stdio transport. Wires every operation in
11
11
  // @slatesvideo/shared as an MCP tool. Both the desktop server and the
12
12
  // cloud API are reached through env-discovered creds in
@@ -39,25 +39,29 @@ const pkg = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url))
39
39
  // (@slatesvideo/shared → prompts/agent-doctrine.ts), surface-aware only where
40
40
  // the mechanism genuinely differs.
41
41
  //
42
- // ⚠️ SIZE IS DELIBERATE. This is injected into EVERY client session and some
43
- // clients truncate or ignore long instructions, so it ships the working method
44
- // + hard rules + guide index and leaves the long-form skills to
45
- // slates_get_prompting_guide. scripts/agent-surface-lockstep-check.mjs pins the
46
- // byte count so growth is a review decision, not an accident.
42
+ // ⚠️ SIZE IS DELIBERATE. This is injected into EVERY client session with no
43
+ // prompt cache, and some clients truncate long instructions, so it ships the
44
+ // Essentials and the every-request rules; the full working method and the guide
45
+ // index are a slates_get_prompting_guide call away (topic "working-method").
46
+ // scripts/agent-surface-lockstep-check.mjs pins the byte count so growth is a
47
+ // review decision, not an accident.
47
48
  const PKG_NAME = '@slatesvideo/mcp-server';
48
49
  // The first line names the running version so an agent can answer "what
49
50
  // version am I on"; the notice appears only when the on-disk cache (refreshed
50
51
  // in main(), for the NEXT launch) says a newer package is published. Read the
51
52
  // design note in @slatesvideo/shared update-check.ts before changing either.
52
- const updateAdvice = updateNotice(PKG_NAME, pkg.version, cachedLatestVersion(PKG_NAME), 'Newer models and parameters are missing until it updates. Tell the user in your FIRST reply: fully quit and reopen the MCP client (Claude Desktop, Codex, Cursor) so npx fetches the new version; if it was installed globally, run `npm i -g @slatesvideo/mcp-server@latest` first.');
53
+ const updateAdvice = updateNotice(PKG_NAME, pkg.version, cachedLatestVersion(PKG_NAME), 'Newer models are missing until it updates. Tell the user in your FIRST reply: fully quit and reopen the MCP client so npx fetches it; a global install needs `npm i -g @slatesvideo/mcp-server@latest` first.');
54
+ const doctrine = buildMcpInstructions();
55
+ const firstParagraphEnd = doctrine.indexOf('\n\n');
53
56
  const instructions = [
54
57
  `Slates MCP server v${pkg.version} (${PKG_NAME}).`,
58
+ doctrine.slice(0, firstParagraphEnd),
55
59
  updateAdvice,
56
- buildAgentDoctrine({ surface: 'mcp' }),
60
+ doctrine.slice(firstParagraphEnd + 2),
57
61
  ].filter((part) => !!part).join('\n\n');
58
62
  const server = new Server({ name: 'slates-studio', version: pkg.version }, {
59
63
  capabilities: {
60
- tools: { listChanged: true },
64
+ tools: {},
61
65
  // Every bundled skill, offered in the host's own picker rather than
62
66
  // only through a tool call the model has to decide to make.
63
67
  prompts: {},
@@ -86,12 +90,9 @@ const server = new Server({ name: 'slates-studio', version: pkg.version }, {
86
90
  // "as a side effect of other requests on the connection". Hiding definitions is
87
91
  // the HOST's job: Claude Code and Codex send the model names only and fetch a
88
92
  // schema on use, so the full list cost about 3,100 tokens up front in Claude
89
- // Code and nothing measurable in Codex. `--tools=compact` keeps the old
90
- // nine-tool start for a host that honors list_changed; `--tools=flat` is
91
- // accepted as the default it now is.
93
+ // Code and nothing measurable in Codex. Legacy --tools=compact and
94
+ // --tools=flat flags remain accepted; every launch exposes the same full list.
92
95
  const TOOLS = toolDefinitions(ops, { surface: 'mcp' });
93
- const compactTools = process.argv.includes('--tools=compact');
94
- let selectedTools = new Set();
95
96
  /**
96
97
  * Output schemas for the ops whose result shape is STABLE.
97
98
  *
@@ -156,7 +157,7 @@ const OUTPUT_SCHEMAS = {
156
157
  },
157
158
  };
158
159
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
159
- tools: TOOLS.filter((t) => !compactTools || STARTUP_TOOL_IDS.has(t.name) || selectedTools.has(t.name)).map((t) => ({
160
+ tools: TOOLS.map((t) => ({
160
161
  name: t.name,
161
162
  description: t.description,
162
163
  inputSchema: t.inputSchema,
@@ -239,6 +240,10 @@ async function elicitConfirm(message) {
239
240
  return null;
240
241
  }
241
242
  }
243
+ // The guides this connection has read. One server process is one client session
244
+ // (stdio), so a generation is refused until its model's guide was served here:
245
+ // as a guide tool result, a prompt or a skill resource.
246
+ const guidesRead = new Set();
242
247
  server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
243
248
  const op = opsById.get(request.params.name);
244
249
  if (!op) {
@@ -289,17 +294,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
289
294
  }
290
295
  let result;
291
296
  try {
292
- result = await op.run(args, { ...defaultContext(), signal: extra?.signal });
297
+ result = await op.run(args, { ...defaultContext(), signal: extra?.signal, guidesRead });
293
298
  }
294
299
  finally {
295
300
  if (ticker)
296
301
  clearInterval(ticker);
297
302
  }
298
303
  let data = result.data;
299
- if (compactTools && op.id === 'slates_load_tools' && Array.isArray(data?.tools)) {
300
- selectedTools = new Set(data.tools.map((t) => t.name));
301
- await server.sendToolListChanged().catch(() => { });
302
- }
303
304
  // The one place the server can ask the USER instead of the model.
304
305
  //
305
306
  // 🚨 GATED ON THE OP HAVING A `confirm` INPUT, not merely on the flag.
@@ -318,6 +319,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
318
319
  result = await op.run({ ...args, ...fingerprint, confirm: true }, {
319
320
  ...defaultContext(),
320
321
  signal: extra?.signal,
322
+ guidesRead,
321
323
  });
322
324
  data = result.data;
323
325
  }
@@ -364,10 +366,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
364
366
  // it, which is a completely different actor making the decision.
365
367
  /** First sentence of the frontmatter description — the picker's one-liner. */
366
368
  function skillSummary(name) {
367
- const body = SKILLS[name] ?? '';
368
- const fm = /^---\n([\s\S]*?)\n---/.exec(body);
369
- const desc = fm ? /^description:\s*(.+)$/m.exec(fm[1])?.[1] : undefined;
370
- const first = (desc ?? name).split(/(?<=\.)\s/)[0];
369
+ const { description } = parseSkillMetadata(SKILLS[name], name);
370
+ const first = description.split(/(?<=\.)\s/)[0];
371
371
  return first.length > 300 ? `${first.slice(0, 297)}…` : first;
372
372
  }
373
373
  const SKILL_NAMES = Object.keys(SKILLS).sort();
@@ -384,6 +384,7 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
384
384
  if (content === undefined) {
385
385
  throw new Error(`Unknown prompt: ${name}. Available: ${SKILL_NAMES.join(', ')}`);
386
386
  }
387
+ guidesRead.add(name);
387
388
  return {
388
389
  description: skillSummary(name),
389
390
  messages: [{ role: 'user', content: { type: 'text', text: content } }],
@@ -490,6 +491,7 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
490
491
  const content = SKILLS[decodeURIComponent(skill[1])];
491
492
  if (content === undefined)
492
493
  throw new Error(`Unknown skill: ${skill[1]}`);
494
+ guidesRead.add(decodeURIComponent(skill[1]));
493
495
  return content;
494
496
  }
495
497
  const shots = /^slates:\/\/project\/([^/]+)\/shots$/.exec(uri);
@@ -513,6 +515,8 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
513
515
  };
514
516
  });
515
517
  async function main() {
518
+ if (process.argv.includes('--tools=compact'))
519
+ console.error('[slates-mcp] --tools=compact is deprecated; the server always exposes the full fixed tool list. Clients control selective loading.');
516
520
  const transport = new StdioServerTransport();
517
521
  await server.connect(transport);
518
522
  if (updateAdvice)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slatesvideo/mcp-server",
3
3
  "mcpName": "io.github.EricDisero/slates",
4
- "version": "0.6.2",
4
+ "version": "0.6.3",
5
5
  "description": "MCP server for the Slates desktop app. Your AI agent (ChatGPT via Codex, Claude, Cursor, or another local MCP client) drives a local AI video studio: projects, characters, storyboards, image and video generation. Files land on disk.",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -41,7 +41,6 @@
41
41
  "claude-desktop",
42
42
  "cursor",
43
43
  "slates",
44
- "veo",
45
44
  "kling",
46
45
  "seedance",
47
46
  "storyboard"
@@ -50,8 +49,8 @@
50
49
  "node": ">=18"
51
50
  },
52
51
  "dependencies": {
53
- "@modelcontextprotocol/sdk": "^1.0.0",
54
- "@slatesvideo/shared": "^0.7.2",
52
+ "@modelcontextprotocol/sdk": "^1.32.1",
53
+ "@slatesvideo/shared": "^0.7.7",
55
54
  "zod": "^3.23.0"
56
55
  },
57
56
  "devDependencies": {