Files
webstudio/packages
Oleg Isonen af29a0cef7 fix: Improve shared Slot selector guidance for MCP agents (#5910)
## What changed

- documents `extract-slot.instanceSelector` as a leaf-to-root occurrence
path
- provides valid examples for sections directly under Body and nested in
a page wrapper
- exposes those examples through `meta.get_more_tools`
- makes invalid parent ordering errors explain how to recover using
`list-instances` IDs and `parentId`
- regenerates the public runtime schema with the selector contract

## Why

Agents could discover `extract-slot` but could not determine the
selector ordering expected by the runtime. Plausible selectors failed
with a generic direct-parent error, and focused MCP discovery returned
no working example.

## User impact

Agents can now reliably convert existing sections into shared Slots
without guessing the Navigator path format. Invalid selectors return
enough context to correct the call instead of repeatedly probing the
project.

## Verification

- project-build slot and MCP tests: 108 passed
- protocol operation docs and operation tests: 17 passed
- CLI MCP tests: 35 passed
- project-build, protocol, and CLI typechecks
- repository lint
- package-boundary check
- generated API and documentation checks
2026-07-18 02:35:10 +02:00
..
2026-07-12 11:27:58 +02:00