@storybook/mcp 10.6.0-alpha.5 → 10.6.0-alpha.6
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 +8 -8
- package/dist/index.d.ts +467 -225
- package/dist/index.js +1427 -706
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -80,9 +80,9 @@ A fetch-compatible request handler for your `/mcp` endpoint.
|
|
|
80
80
|
##### Behavior
|
|
81
81
|
|
|
82
82
|
- Registers these MCP tools:
|
|
83
|
-
- [`list
|
|
84
|
-
- [`
|
|
85
|
-
- [`
|
|
83
|
+
- [`docs-list`](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-list)
|
|
84
|
+
- [`docs-show`](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-show)
|
|
85
|
+
- [`docs-show-story`](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-show-story)
|
|
86
86
|
- Uses HTTP transport from [`@tmcp/transport-http`](https://github.com/paoloricciuti/tmcp/).
|
|
87
87
|
- For each request, the handler always passes the current `Request` as `context.request`.
|
|
88
88
|
- Per-request `context` overrides handler-level `options` for:
|
|
@@ -203,7 +203,7 @@ Type:
|
|
|
203
203
|
}) => void | Promise<void>
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
Optional callback after `list
|
|
206
|
+
Optional callback after `docs-list` resolves successfully.
|
|
207
207
|
|
|
208
208
|
##### `onGetDocumentation`
|
|
209
209
|
|
|
@@ -225,7 +225,7 @@ Type:
|
|
|
225
225
|
) => void | Promise<void>
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
Optional callback after `
|
|
228
|
+
Optional callback after `docs-show` runs:
|
|
229
229
|
|
|
230
230
|
- When a component/docs entry is found, receives `foundDocumentation` and `resultText`.
|
|
231
231
|
- When not found, receives only `context` and `input`.
|
|
@@ -331,7 +331,7 @@ Type:
|
|
|
331
331
|
Promise<void>;
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
-
Registers the [list tool](https://storybook.js.org/docs/next/ai/mcp/overview/#list
|
|
334
|
+
Registers the [list tool](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-list) that returns all component/docs IDs from manifests.
|
|
335
335
|
|
|
336
336
|
#### `addGetDocumentationTool`
|
|
337
337
|
|
|
@@ -345,7 +345,7 @@ Type:
|
|
|
345
345
|
) => Promise<void>;
|
|
346
346
|
```
|
|
347
347
|
|
|
348
|
-
Registers [documentation lookup](https://storybook.js.org/docs/next/ai/mcp/overview/#
|
|
348
|
+
Registers [documentation lookup](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-show) by component/docs `id`.
|
|
349
349
|
|
|
350
350
|
When `options.multiSource` is `true`, the tool schema requires `storybookId` input.
|
|
351
351
|
|
|
@@ -361,4 +361,4 @@ Type:
|
|
|
361
361
|
) => Promise<void>;
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
Registers [story-level documentation lookup](https://storybook.js.org/docs/next/ai/mcp/overview/#
|
|
364
|
+
Registers [story-level documentation lookup](https://storybook.js.org/docs/next/ai/mcp/overview/#docs-show-story) for a specific story variant by `componentId` and `storyName`.
|