@kolbo/mcp 1.30.0 → 1.30.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolbo/mcp",
3
- "version": "1.30.0",
3
+ "version": "1.30.1",
4
4
  "description": "Kolbo AI MCP Server - Generate images, videos, music, speech, and sound effects from Claude Code",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/apps/index.js CHANGED
@@ -130,9 +130,64 @@ async function modelIcon(client, modelName) {
130
130
  return map.get(String(modelName).toLowerCase()) || null;
131
131
  }
132
132
 
133
+ /* ------------------------------------------------------------------ */
134
+ /* Declaration-level widget metadata */
135
+ /* ------------------------------------------------------------------ */
136
+
137
+ // Hosts (claude.ai) decide whether to prepare a widget iframe from the TOOL
138
+ // DECLARATION in tools/list — result-level `_meta` alone is not enough. The
139
+ // legacy server.tool() registration API has no _meta parameter, so we attach
140
+ // it post-registration via the SDK's registered-tool objects (tools/list
141
+ // serves `tool._meta` verbatim; verified against SDK 1.29.0).
142
+ const TOOL_WIDGETS = {
143
+ // generation card
144
+ generate_image: UI.generation,
145
+ generate_image_edit: UI.generation,
146
+ generate_creative_director: UI.generation,
147
+ generate_video: UI.generation,
148
+ generate_video_from_image: UI.generation,
149
+ generate_video_from_video: UI.generation,
150
+ generate_elements: UI.generation,
151
+ generate_first_last_frame: UI.generation,
152
+ generate_lipsync: UI.generation,
153
+ generate_music: UI.generation,
154
+ generate_speech: UI.generation,
155
+ generate_sound: UI.generation,
156
+ generate_3d: UI.generation,
157
+ edit_image: UI.generation,
158
+ edit_video: UI.generation,
159
+ shorts_render: UI.generation,
160
+ // transcript viewer
161
+ transcribe_audio: UI.transcript,
162
+ // model catalog
163
+ list_models: UI.catalog,
164
+ // media grid
165
+ list_media: UI.mediaGrid,
166
+ search_stock_media: UI.mediaGrid,
167
+ get_stock_collections: UI.mediaGrid,
168
+ search_music_library: UI.mediaGrid,
169
+ browse_music_library: UI.mediaGrid,
170
+ list_presets: UI.mediaGrid,
171
+ list_voices: UI.mediaGrid,
172
+ list_visual_dnas: UI.mediaGrid,
173
+ list_moodboards: UI.mediaGrid,
174
+ shorts_analyze: UI.mediaGrid,
175
+ };
176
+
177
+ function attachToolWidgetMeta(server) {
178
+ const registered = server && server._registeredTools;
179
+ if (!registered) return;
180
+ for (const [name, uri] of Object.entries(TOOL_WIDGETS)) {
181
+ const tool = registered[name];
182
+ if (!tool) continue;
183
+ tool._meta = { ...(tool._meta || {}), ...uiMeta(uri) };
184
+ }
185
+ }
186
+
133
187
  module.exports = {
134
188
  UI,
135
189
  registerApps,
190
+ attachToolWidgetMeta,
136
191
  uiMeta,
137
192
  uiResult,
138
193
  appsEnabled,
package/src/index.js CHANGED
@@ -73,7 +73,7 @@ const { registerVoiceTools } = require('./tools/voices');
73
73
  const { registerMusicLibraryTools } = require('./tools/music_library');
74
74
  const { registerStockLibraryTools } = require('./tools/stock_library');
75
75
  const { registerShortsCreatorTools } = require('./tools/shorts_creator');
76
- const { registerApps } = require('./apps');
76
+ const { registerApps, attachToolWidgetMeta } = require('./apps');
77
77
 
78
78
  /**
79
79
  * Build a fully-configured Kolbo MCP server (all tool groups registered)
@@ -123,6 +123,9 @@ function createServer(opts = {}) {
123
123
  // MCP Apps widget resources (ui://kolbo/*). Registering resources is inert
124
124
  // for text-only hosts — they never fetch them.
125
125
  registerApps(server);
126
+ // Declaration-level `_meta['ui/resourceUri']` on every widget-carrying tool —
127
+ // claude.ai prepares the widget iframe from tools/list, not from the result.
128
+ attachToolWidgetMeta(server);
126
129
 
127
130
  return server;
128
131
  }