@statelyai/mcp 0.10.0 → 0.11.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/README.md CHANGED
@@ -133,8 +133,9 @@ Complete Stately sign-in when the client connects.
133
133
  <!-- shared machine input schemas from src/server.ts -->
134
134
 
135
135
  Most tools accept a machine config object or a source document. Conversion
136
- accepts XState, SCXML, XGraph, Mermaid, and D2 sources; target formats exclude
137
- Mermaid. Validation also supports JSON and YAML.
136
+ accepts XState, SCXML, XGraph, legacy Stately DigraphDef, Mermaid, and D2
137
+ sources; target formats exclude DigraphDef and Mermaid. Validation also supports
138
+ JSON and YAML.
138
139
 
139
140
  ## `validate_machine`
140
141
 
@@ -168,9 +169,9 @@ createMachine({
168
169
 
169
170
  <!-- convert_machine registration from src/server.ts and convert response contract -->
170
171
 
171
- Converts XState, SCXML, XGraph, Mermaid, or D2 input to XState, SCXML, XGraph,
172
- or D2. The response contains the target `format`, converted `content`, and any
173
- `warnings`.
172
+ Converts XState, SCXML, XGraph, legacy Stately DigraphDef, Mermaid, or D2 input
173
+ to XState, SCXML, XGraph, or D2. The response contains the target `format`,
174
+ converted `content`, and any `warnings`.
174
175
 
175
176
  <details>
176
177
  <summary>Summary: convert XState to SCXML</summary>
@@ -444,8 +445,8 @@ breadcrumbs, select/pan/structural-simulation controls, selection utilities,
444
445
  zoom, viewport recovery, keyboard shortcuts, and a host-mediated link to the
445
446
  same graph in Stately. It starts in pan mode; AI controls remain hidden.
446
447
  Pass XState source text (the default for strings), a JSON machine config, SCXML,
447
- XGraph, Mermaid, or D2; the server converts it once to canonical XGraph before
448
- rendering the app and PNG fallbacks.
448
+ XGraph, legacy Stately DigraphDef, Mermaid, or D2; the server converts it once
449
+ to canonical XGraph before rendering the app and PNG fallbacks.
449
450
  Other image-capable clients receive one PNG fallback per parent node. Structured
450
451
  content uses a required `schemaVersion: "2.0"` envelope with a canonical XGraph
451
452
  JSON string in `interactive.graphJson`. Every V2 field has a concrete JSON
@@ -467,6 +468,10 @@ Each returned image uses the MCP `ImageContent` shape:
467
468
  { type: 'image', data: pngBase64, mimeType: 'image/png' }
468
469
  ```
469
470
 
471
+ Use `visualize_stately_machine({ machineId, direction?, parentNodeIds? })` to
472
+ fetch and render a hosted machine in one call. It prefers the public `graph`,
473
+ then an XGraph-shaped stored `definition`, then legacy DigraphDef compatibility.
474
+
470
475
  <details>
471
476
  <summary>Summary: visualize a machine</summary>
472
477
 
@@ -517,7 +522,7 @@ export const player = createMachine({
517
522
 
518
523
  ## Hosted resource tools
519
524
 
520
- <!-- resource tool registrations from src/resourceTools.ts -->
525
+ <!-- hosted resource tool registrations from src/resourceTools.ts and src/server.ts -->
521
526
 
522
527
  These tools read hosted Stately projects and machines through the server-owned
523
528
  `/api/v1` resource contract. They are separate from the workspace tools
@@ -529,6 +534,7 @@ These tools read hosted Stately projects and machines through the server-owned
529
534
  | `get_stately_project` | One project, with its current project version id and machine ids. |
530
535
  | `list_stately_project_machines` | The machines in a project. |
531
536
  | `get_stately_machine` | One machine, with its definition. |
537
+ | `visualize_stately_machine` | Fetch and visualize one hosted machine in one call. |
532
538
 
533
539
  Inputs take a `projectId` or `machineId`, never a project version id.
534
540